/* ==========================================================================
   Sainfoxiya Gift Cards - Indian Law Compliant Auth Styles (assets/css/authModal.css)
   DPDP Act 2023 & IT Act 2000 Compliant Sign In / Sign Up Styling
   ========================================================================== */

.auth-page-section {
    padding: 3rem 1rem 5rem;
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
}

.auth-card-hero {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.auth-modal-box {
    max-width: 480px;
    width: 100%;
    border-radius: var(--radius-lg);
    padding: 2.25rem 2rem 2rem;
    background: #ffffff;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    transition: var(--transition);
}

/* Legal Compliance Header Badge */
.auth-legal-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-full);
    margin-bottom: 1.25rem;
    text-align: center;
}

.auth-legal-badge i {
    font-size: 0.9rem;
    color: #15803d;
}

/* Auth Tabs Header Switcher */
.auth-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 0.35rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    gap: 0.35rem;
}

.auth-tab-btn {
    flex: 1;
    padding: 0.7rem 1rem;
    font-size: 0.925rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    background: transparent;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

.auth-tab-btn.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Auth Method Switcher Pills (Email OTP vs Password) */
.auth-method-switcher {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    background: #f8fafc;
    padding: 0.3rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.auth-method-switcher .btn {
    flex: 1;
    padding: 0.55rem 0.75rem;
    font-size: 0.825rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.auth-method-switcher .btn.active {
    box-shadow: var(--shadow-sm);
}

/* Auth Input Groups */
.auth-form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.auth-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.auth-form-group label .required-asterisk {
    color: #ef4444;
    margin-left: 0.2rem;
}

.auth-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
}

.auth-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.6rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: #ffffff;
    transition: var(--transition);
}

.auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
    outline: none;
}

/* Phone Number Country Code Prefix Pill (+91 India) */
.phone-prefix-pill {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-right: none;
    border-top-left-radius: var(--radius-md);
    border-bottom-left-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    height: 48px;
    user-select: none;
}

.phone-input-group .auth-input {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding-left: 0.85rem;
    height: 48px;
}

/* Password Toggle Visibility Button */
.password-toggle-btn {
    position: absolute;
    right: 0.85rem;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    padding: 0.25rem;
    cursor: pointer;
}

.password-toggle-btn:hover {
    color: var(--primary);
}

/* Forgot Password Link */
.forgot-pass-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.35rem;
}

.forgot-pass-link {
    font-size: 0.825rem;
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
}

.forgot-pass-link:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

/* Password Strength Indicator Meter */
.password-strength-bar {
    height: 4px;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    margin-top: 0.4rem;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    background: #ef4444;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.password-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    display: block;
}

/* DPDP Act Legal Checkboxes Card */
.dpdp-consent-box {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.9rem;
    margin: 1.2rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.consent-checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    font-size: 0.825rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.consent-checkbox-row input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
    margin-top: 0.15rem;
    cursor: pointer;
    flex-shrink: 0;
}

.consent-checkbox-row label {
    cursor: pointer;
    margin-bottom: 0;
    font-weight: 500;
}

.consent-checkbox-row label a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
}

/* Auth Switch Bottom Prompt Link */
.auth-switch-prompt {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.auth-switch-prompt a {
    color: var(--primary);
    font-weight: 700;
    margin-left: 0.25rem;
}

.auth-switch-prompt a:hover {
    text-decoration: underline;
}

/* Trust Badges Under Card */
.auth-trust-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.75rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.auth-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

/* Modal Overlay & Modal Boxes (HIDDEN BY DEFAULT) */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    display: none !important;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    position: relative;
    max-width: 440px;
    width: 90%;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-box {
    transform: translateY(0);
}

.close-modal-btn {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 1.5rem;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.close-modal-btn:hover {
    color: var(--text-primary);
}

/* OTP Verification Modal Box */
.otp-modal-box {
    text-align: center;
}

.otp-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: #e0e7ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 0 auto 1.25rem;
}

.otp-notice-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 0.825rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    margin: 0.85rem 0 1rem;
    text-align: center;
    line-height: 1.45;
}

.otp-digits-container {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin: 1.25rem 0;
}

.otp-digit-input {
    width: 48px;
    height: 54px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 800;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #ffffff;
    transition: var(--transition);
}

.otp-digit-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    outline: none;
}

.resend-otp-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.resend-otp-btn {
    background: none;
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.resend-otp-btn:disabled {
    color: var(--text-muted);
    text-decoration: none;
    cursor: not-allowed;
}

/* User Account Profile Badge Dropdown on Navbar */
.user-nav-dropdown {
    position: relative;
}

.user-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}

.user-profile-btn:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.user-avatar-circle {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
}

.user-dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 230px;
    padding: 0.5rem 0;
    display: none;
    z-index: 2000;
    animation: fadeIn 0.2s ease;
}

.user-dropdown-menu.active {
    display: block;
}

.dropdown-user-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-user-header .user-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.dropdown-user-header .user-phone {
    font-size: 0.775rem;
    color: var(--text-muted);
}

.user-dropdown-menu a, .user-dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    background: transparent;
    text-align: left;
    transition: var(--transition);
}

.user-dropdown-menu a:hover, .user-dropdown-menu button:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.user-dropdown-menu .signout-btn {
    color: #dc2626;
    border-top: 1px solid var(--border-color);
    margin-top: 0.25rem;
}

.user-dropdown-menu .signout-btn:hover {
    background: #fef2f2;
    color: #b91c1c;
}

/* ==========================================================================
   Mobile Responsive Rules for Auth Page & Modals (assets/css/authModal.css)
   ========================================================================== */

@media (max-width: 640px) {
    .auth-page-section {
        padding: 2rem 0.85rem 3rem;
    }

    .auth-modal-box {
        padding: 1.5rem 1.15rem 1.25rem;
        width: 100%;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-md);
    }

    .auth-legal-badge {
        font-size: 0.725rem;
        padding: 0.4rem 0.6rem;
        line-height: 1.35;
    }

    .auth-tabs {
        padding: 0.25rem;
        gap: 0.25rem;
    }

    .auth-tab-btn {
        padding: 0.55rem 0.5rem;
        font-size: 0.825rem;
        gap: 0.35rem;
    }

    .auth-method-switcher {
        gap: 0.35rem;
    }

    .auth-method-switcher .btn {
        padding: 0.55rem 0.5rem;
        font-size: 0.8rem;
    }

    .phone-prefix-pill {
        padding: 0 0.55rem;
        font-size: 0.85rem;
        height: 44px;
    }

    .phone-input-group .auth-input {
        height: 44px;
        font-size: 0.9rem;
    }

    .auth-input {
        padding: 0.7rem 0.85rem 0.7rem 2.4rem;
        font-size: 0.9rem;
    }

    .auth-input-icon {
        left: 0.85rem;
        font-size: 0.875rem;
    }

    .dpdp-consent-box {
        padding: 0.75rem 0.85rem;
        gap: 0.65rem;
        margin: 1rem 0;
    }

    .consent-checkbox-row {
        font-size: 0.78rem;
        gap: 0.55rem;
    }

    .consent-checkbox-row input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }

    .otp-modal-box {
        padding: 1.5rem 1rem;
        width: 95%;
    }

    .otp-icon-wrapper {
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
        margin-bottom: 0.85rem;
    }

    .otp-digits-container {
        gap: 0.35rem;
        margin: 1.15rem 0;
    }

    .otp-digit-input {
        width: 40px;
        height: 48px;
        font-size: 1.2rem;
        border-radius: var(--radius-sm);
    }
}

@media (max-width: 380px) {
    .auth-modal-box {
        padding: 1.25rem 0.85rem;
    }

    .auth-tab-btn {
        font-size: 0.775rem;
        padding: 0.5rem 0.35rem;
    }

    .auth-method-switcher {
        flex-direction: column;
    }

    .otp-digits-container {
        gap: 0.25rem;
    }

    .otp-digit-input {
        width: 35px;
        height: 44px;
        font-size: 1.1rem;
    }
}
