﻿/* Account Modal Styles - Matching Add Blog Modal */
.account-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10001;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

    .account-modal-overlay.show {
        display: flex;
    }

.account-modal {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalZoom 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

.account-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 2px solid #e5e7eb;
    background: linear-gradient(135deg, #022079 0%, #0048b3 100%);
}

    .account-modal-header h2 {
        color: white;
        font-size: 24px;
        font-weight: 700;
        margin: 0;
    }

.close-account-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

    .close-account-modal:hover {
        background: rgba(255, 255, 255, 0.3);
        transform: rotate(90deg);
    }

.account-modal-body {
    padding: 30px;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
    padding-bottom: 40px;
}

.account-section {
    margin-bottom: 28px;
}

    .account-section label {
        display: block;
        color: #022079;
        font-weight: 600;
        margin-bottom: 8px;
        font-size: 14px;
    }

.form-group-account {
    position: relative;
    min-height: 48px;
    margin-bottom: 8px;
}

.account-section:has(#account-password) .form-group-account {
    margin-bottom: 32px;
}

    .form-group-account input {
        width: 100%;
        padding: 12px 15px;
        border: 2px solid #e5e7eb;
        border-radius: 10px;
        font-size: 15px;
        transition: all 0.3s ease;
        box-sizing: border-box;
        color: #374151;
    }

    .form-group-account input.has-toggle {
        padding-right: 45px;
    }

    .form-group-account input.has-icon {
        padding-right: 45px;
    }

    .form-group-account input:focus {
        outline: none;
        border-color: #022079;
        box-shadow: 0 0 0 3px rgba(2, 32, 121, 0.1);
    }

.input-icon-account {
    position: absolute;
    right: 15px;
    top: 14px;
    color: #6b7280;
    font-size: 16px;
    pointer-events: none;
}

.toggle-password-account{
    position: absolute;
    right: 45px;
    top: 14px;
    color: #6b7280;
    font-size: 16px;
    cursor: pointer;
    pointer-events: all;
    z-index: 1;
}

    .toggle-password-account:hover {
        color: #022079;
    }

.verify-email-btn {
    position: absolute;
    right: 45px;
    top: 8px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .verify-email-btn:hover {
/*        transform: translateY(-50%) scale(1.05);*/
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    }

.email-verified-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    color: #10b981;
    font-size: 14px;
    font-weight: 600;
}

.email-verified-badge i {
    font-size: 16px;
}

.verification-actions-account {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.verify-code-btn,
.resend-code-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.verify-code-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    flex: 1;
}

.verify-code-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.resend-code-btn {
    background: #e5e7eb;
    color: #374151;
}

.resend-code-btn:hover {
    background: #d1d5db;
}

.password-strength-account {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin-top: 8px;
    margin-bottom: 4px;
    overflow: hidden;
    display: none;
}

.password-strength-account.show {
    display: block;
}

.strength-bar-account {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.strength-bar-account.weak {
    width: 33%;
    background: #ef4444;
}

.strength-bar-account.medium {
    width: 66%;
    background: #f59e0b;
}

.strength-bar-account.strong {
    width: 100%;
    background: #10b981;
}

.error-message-account {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    color: #ef4444;
    font-size: 12px;
    font-weight: 500;
    margin-top: 4px;
    animation: slideDown 0.3s ease;
    z-index: 10;
}

    .error-message-account.show {
        display: block;
    }

.account-section:has(#account-password) .password-strength-account.show ~ .error-message-account {
    margin-top: 20px;
}

.form-group-account input.input-error,
.form-group-account input.error {
    border: 2px solid #ef4444;
    background-color: #fef2f2;
}

    .form-group-account input.input-error:focus,
    .form-group-account input.error:focus {
        border-color: #ef4444;
        box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
    }

.form-group-account input.success {
    border: 2px solid #10b981;
    background-color: #f0fdf4;
}

    .form-group-account input.success:focus {
        border-color: #10b981;
        box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    }

.notifications-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f9fafb;
    border-radius: 10px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #374151;
    font-weight: 600;
}

    .toggle-label i {
        color: #022079;
        font-size: 18px;
    }

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

    .toggle-switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 26px;
}

    .toggle-slider:before {
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: 0.3s;
        border-radius: 50%;
    }

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #022079, #0048b3);
}

    .toggle-switch input:checked + .toggle-slider:before {
        transform: translateX(24px);
    }

.account-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

.save-changes-btn,
.delete-account-btn {
    width: 100%;
    padding: 12px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.save-changes-btn {
    background: linear-gradient(135deg, #022079, #0048b3);
    color: white;
    box-shadow: 0 4px 12px rgba(2, 32, 121, 0.3);
}

    .save-changes-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(2, 32, 121, 0.4);
    }

.delete-account-btn {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

    .delete-account-btn:hover {
        background: #dc2626;
        transform: translateY(-2px);
        box-shadow: 0 6px 18px rgba(239, 68, 68, 0.4);
    }

/* Dark Mode */
.dark-mode .account-modal {
    background: #1a1a2e;
}

.dark-mode .account-modal-header {
    background: linear-gradient(135deg, #faff04, #ffcc00);
}

    .dark-mode .account-modal-header h2 {
        color: #022079;
    }

.dark-mode .close-account-modal {
    background: rgba(2, 32, 121, 0.2);
    color: #022079;
}

    .dark-mode .close-account-modal:hover {
        background: rgba(2, 32, 121, 0.3);
    }

.dark-mode .account-section label {
    color: #faff04;
}

.dark-mode .form-group-account input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(250, 255, 4, 0.3);
    color: #e5e7eb;
}

    .dark-mode .form-group-account input:focus {
        border-color: #faff04;
        box-shadow: 0 0 0 3px rgba(250, 255, 4, 0.1);
    }

.dark-mode .input-icon-account,
.dark-mode .toggle-password-account {
    color: #9ca3af;
}

    .dark-mode .toggle-password-account:hover {
        color: #faff04;
    }

.dark-mode .notifications-toggle {
    background: rgba(255, 255, 255, 0.03);
}

.dark-mode .toggle-label {
    color: #e5e7eb;
}

    .dark-mode .toggle-label i {
        color: #faff04;
    }

.dark-mode .toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #faff04, #ffcc00);
}

.dark-mode .account-actions {
    border-top-color: rgba(250, 255, 4, 0.2);
}

.dark-mode .save-changes-btn {
    background: linear-gradient(135deg, #faff04, #ffcc00);
    color: #022079;
}

.dark-mode .form-group-account input.input-error,
.dark-mode .form-group-account input.error {
    border: 2px solid #ef4444;
    background-color: #fef2f2;
}

    .dark-mode .form-group-account input.input-error:focus,
    .dark-mode .form-group-account input.error:focus {
        border-color: #ef4444;
        box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
    }

.dark-mode .form-group-account input.success {
    border: 2px solid #10b981;
    background-color: #f0fdf4;
}

    .dark-mode .form-group-account input.success:focus {
        border-color: #10b981;
        box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    }

/* Scrollbar */
.account-modal-body::-webkit-scrollbar {
    width: 8px;
}

.account-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.account-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.dark-mode .account-modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.dark-mode .account-modal-body::-webkit-scrollbar-thumb {
    background: rgba(250, 255, 4, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.form-group-account input[type="text"][data-password-visible="false"] {
    -webkit-text-security: disc;
    text-security: disc;
    font-family: "Poppins", Arial, sans-serif;
}

.form-group-account input[type="text"][data-password-visible="true"] {
    -webkit-text-security: none;
    text-security: none;
    font-family: "Poppins", Arial, sans-serif;
}

/* Ensure placeholder is always visible */
.form-group-account input::placeholder {
    opacity: 1 !important;
    -webkit-text-security: none !important;
}

/* iOS specific fixes for consistent height */
.form-group-account input {
    min-height: 48px;
    height: 48px;
    line-height: 1.5;
    -webkit-appearance: none;
    appearance: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .account-modal {
        width: 95%;
        max-height: 95vh;
    }

    .account-modal-header {
        padding: 20px;
    }

        .account-modal-header h2 {
            font-size: 20px;
        }

    .account-modal-body {
        padding: 20px;
    }
}

@media (max-width: 500px) {
    .account-modal {
        width: 98%;
        max-height: 98vh;
        border-radius: 15px;
    }

    .account-modal-header {
        padding: 15px;
    }

        .account-modal-header h2 {
            font-size: 18px;
        }

    .close-account-modal {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }

    .account-modal-body {
        padding: 15px;
    }

    .account-section label {
        font-size: 13px;
    }

    .form-group-account input {
        padding: 10px 12px;
        font-size: 14px;
    }

        .form-group-account input.has-toggle,
        .form-group-account input.has-icon {
            padding-right: 40px;
        }

    .verify-email-btn {
        padding: 5px 10px;
        font-size: 11px;
        right: 40px;
    }

    .verification-actions-account {
        flex-direction: column;
    }

    .verify-code-btn,
    .resend-code-btn {
        width: 100%;
    }

    .account-actions {
        flex-direction: column;
        gap: 10px;
    }

    .save-changes-btn,
    .delete-account-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 15px;
    }
}

@media (max-width: 400px) {
    .account-modal-header h2 {
        font-size: 16px;
    }

    .account-modal-body {
        padding: 12px;
    }

    .form-group-account input {
        font-size: 13px;
    }
}
