/* wwwroot/css/auth.css
   Login modal + header profile dropdown — state rules only.

   The full look of the login modal, profile button, avatar and dropdown now
   lives in style.css (sections 5 and 6) so the whole site shares one theme.
   This file keeps only the classes the login scripts toggle at runtime
   (auth.js / login-otp-ui.js), styled with the same tokens.

   Loaded after style.css in _Layout.cshtml, so nothing here should restyle
   the base components — only states. */

/* ── OTP boxes: states set by login-otp-ui.js ─────────────────────── */
.otp-box { caret-color: var(--gold-500, #c9a55a); }

.otp-box.filled {
    border-color: var(--gold-500, #c9a55a);
    border-bottom-color: var(--gold-600, #b08d43);
    background: #fff;
    box-shadow: 0 6px 14px -8px rgba(176, 141, 67, .7);
}

.otp-box.otp-error {
    border-color: var(--danger, #b3261e) !important;
    background: #fff6f5;
    box-shadow: 0 0 0 4px rgba(179, 38, 30, .12);
    animation: otp-shake .35s ease;
}

@keyframes otp-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ── Inline error messages (#mobileError, #otpError, #nameError) ──── */
#loginModal .text-danger.small {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    background: rgba(179, 38, 30, .07);
    border: 1px solid rgba(179, 38, 30, .18);
    border-left: 3px solid var(--danger, #b3261e);
    border-radius: 0 var(--r-sm, 6px) var(--r-sm, 6px) 0;
    padding: .55rem .8rem;
    font-weight: 600;
    color: var(--danger, #b3261e) !important;
}

    #loginModal .text-danger.small.d-none { display: none !important; }

/* ── Resend timer + link ──────────────────────────────────────────── */
.login-resend-row .resend-timer { color: var(--slate-600, #566174); }
    .login-resend-row .resend-timer strong { color: var(--navy-900, #0f1f3a); font-variant-numeric: tabular-nums; }

#resendOtpLink.is-disabled {
    pointer-events: none;
    color: var(--slate-400, #8b95a7) !important;
    text-decoration-color: var(--slate-300, #dfe4ec) !important;
    font-weight: 600;
}

.login-change-number { text-align: center; margin-top: .45rem; }

    .login-change-number a {
        color: var(--slate-600, #566174);
        font-size: .82rem;
        font-weight: 600;
        text-decoration: none;
    }

        .login-change-number a:hover {
            color: var(--navy-900, #0f1f3a);
            text-decoration: underline;
            text-decoration-color: var(--gold-500, #c9a55a);
        }

/* ── Step change animation ────────────────────────────────────────── */
#loginStepMobile,
#loginStepOtp,
#loginStepName { animation: login-step-fade .3s cubic-bezier(.2, .7, .2, 1); }

@keyframes login-step-fade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* ── Buttons: loading state while OTP is being sent / verified ───── */
#loginModal .btn-gold:disabled {
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    #loginStepMobile, #loginStepOtp, #loginStepName, .otp-box.otp-error { animation: none; }
}

.login-step-desc strong { color: var(--navy-900, #0f1f3a); font-weight: 800; letter-spacing: .02em; }
