/* =============================================================
   Forgot Password V2 -- redesigned reset-request + reset-set pages.
   Shared by ForgotPassword.razor and ForgotPasswordReset.razor.
   Matches the Register/Login V2 design system. Selectors use the
   shared .rv2-* prefix (and a .rv2 wrapper) so they line up with the
   other V2 auth pages and never collide with the legacy
   forgotpassword.css / forgotpasswordreset.css classes, which stay
   loaded but are dormant for these pages.
   Tokens come from brand-tokens.css. Dark mode via body.dark-mode.

   These are focused single-action utility pages, so they use a
   centered single card (no two-panel value side).
   ============================================================= */

.rv2 {
    --rv2-blue: var(--brand-primary, #00B4FF);
    --rv2-blue-deep: var(--brand-secondary, #0174B1);
    --rv2-tint: var(--brand-bg, #F6FBFF);
    --rv2-charcoal: var(--brand-charcoal, #222222);
    --rv2-orange: var(--brand-cta, #FFAA00);
    --rv2-gray: var(--brand-divider, #E0E0E0);
    --rv2-ink-60: #5A6472;
    --rv2-field-border: #D6DEE8;
    --rv2-card: #FFFFFF;

    font-family: 'Inter', system-ui, sans-serif;
    color: var(--rv2-charcoal);
    -webkit-font-smoothing: antialiased;
}
.rv2 *, .rv2 *::before, .rv2 *::after { box-sizing: border-box; }
.rv2 .sr-only {
    position: absolute !important; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

/* SHELL -- centered card --------------------------------------- */
.rv2-shell {
    min-height: 100vh; min-height: 100dvh;
    width: 100%;
    background: var(--rv2-tint);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 96px 24px 48px;
}
.rv2-form-card {
    background: var(--rv2-card);
    border: 1px solid var(--rv2-gray);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(2, 32, 71, 0.10);
    padding: 36px 32px;
    width: 100%;
    max-width: 440px;
    text-align: center;
}

/* Header */
.rv2-form-head { margin-bottom: 24px; }
.rv2-title { font-weight: 700; font-size: 26px; letter-spacing: -0.02em; margin: 0 0 8px; color: var(--rv2-charcoal); }
.rv2-subtitle { font-size: 15px; line-height: 1.5; color: var(--rv2-ink-60); margin: 0; }

/* Form (left-aligned fields inside the centered card) */
.rv2-form { display: flex; flex-direction: column; gap: 16px; text-align: left; }
.rv2-field { display: flex; flex-direction: column; gap: 6px; }
.rv2-label { font-size: 13px; font-weight: 600; color: var(--rv2-charcoal); }
.rv2-input {
    width: 100%;
    font-family: inherit; font-size: 15px;
    color: var(--rv2-charcoal); background: #FFFFFF;
    border: 1px solid var(--rv2-field-border);
    border-radius: 10px; padding: 12px 14px;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.rv2-input::placeholder { color: #9AA6B2; }
.rv2-input:focus { outline: none; border-color: var(--rv2-blue); box-shadow: 0 0 0 3px rgba(0, 180, 255, 0.18); }
.rv2-hint { font-size: 12px; color: var(--rv2-ink-60); }

.rv2-password-wrap { position: relative; display: flex; }
.rv2-password-wrap .rv2-input { padding-right: 44px; }
.rv2-password-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    appearance: none; border: 0; background: transparent; cursor: pointer;
    width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    color: var(--rv2-ink-60); border-radius: 8px;
}
.rv2-password-toggle:hover { color: var(--rv2-charcoal); }
.rv2-password-toggle svg { width: 20px; height: 20px; display: block; }

/* Inline validation summary */
.rv2-validation { background: #FDECEC; color: #B42318; border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.4; }

/* Buttons */
.rv2-btn {
    appearance: none; border: 0; cursor: pointer;
    font-family: inherit; font-size: 16px; font-weight: 700;
    border-radius: 12px; padding: 14px 20px;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    transition: transform 80ms ease, box-shadow 120ms ease, background 120ms ease;
}
.rv2-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.rv2-btn svg { width: 18px; height: 18px; }
.rv2-btn-primary { background: var(--rv2-blue); color: #FFFFFF; box-shadow: 0 8px 20px rgba(0, 180, 255, 0.28); width: 100%; }
.rv2-btn-primary:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(0, 180, 255, 0.34); }
.rv2-btn-ghost { background: transparent; color: var(--rv2-blue-deep); border: 1px solid var(--rv2-field-border); }
.rv2-btn-ghost:hover { background: var(--rv2-tint); }

.rv2-spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.45); border-top-color: #FFFFFF; border-radius: 50%; animation: rv2-spin 0.7s linear infinite; }
@keyframes rv2-spin { to { transform: rotate(360deg); } }

/* Bottom prompt (sign-up / help) */
.rv2-prompt { margin-top: 22px; font-size: 14px; color: var(--rv2-ink-60); }
.rv2-prompt-link {
    appearance: none; border: 0; background: transparent; cursor: pointer;
    color: var(--rv2-blue-deep); font-weight: 700; font-family: inherit; font-size: 14px;
    margin-left: 6px; padding: 0; text-decoration: none;
}
.rv2-prompt-link:hover { text-decoration: underline; }

/* Status panels (loading / success / error) ------------------- */
.rv2-status { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0; }
.rv2-status-ico { width: 56px; height: 56px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.rv2-status-ico svg { width: 30px; height: 30px; }
.rv2-status-ico.success { background: #E6F8EE; color: #1B9E55; }
.rv2-status-ico.error { background: #FDECEC; color: #B42318; }
.rv2-status-title { font-size: 20px; font-weight: 700; margin: 0; color: var(--rv2-charcoal); }
.rv2-status-text { font-size: 14px; line-height: 1.5; color: var(--rv2-ink-60); margin: 0; }
.rv2-status-text a { color: var(--rv2-blue-deep); font-weight: 600; text-decoration: none; }
.rv2-status-text a:hover { text-decoration: underline; }
.rv2-status .rv2-btn { margin-top: 12px; }

/* Loading spinner (large, centered) */
.rv2-loading-spinner { width: 40px; height: 40px; border: 3px solid var(--rv2-gray); border-top-color: var(--rv2-blue); border-radius: 50%; animation: rv2-spin 0.8s linear infinite; margin-bottom: 8px; }

/* RESPONSIVE */
@media (max-width: 560px) {
    .rv2-shell { padding: 84px 16px 32px; }
    .rv2-form-card { padding: 28px 20px; border-radius: 16px; }
}

/* DARK MODE */
body.dark-mode .rv2 {
    --rv2-tint: #15181D;
    --rv2-charcoal: #E8EAED;
    --rv2-ink-60: #9AA6B2;
    --rv2-gray: #2C313A;
    --rv2-field-border: #3A4250;
    --rv2-card: #1C2026;
    --rv2-blue: var(--brand-primary-light, #4DB8FF);
}
body.dark-mode .rv2-shell { background: #121212; }
body.dark-mode .rv2-title,
body.dark-mode .rv2-status-title { color: #F5F5F5; }
body.dark-mode .rv2-input { background: #11151A; color: #E8EAED; }
body.dark-mode .rv2-input::placeholder { color: #66707C; }
body.dark-mode .rv2-btn-ghost { background: #1C2026; color: #E8EAED; }
body.dark-mode .rv2-validation { background: #3A1B1A; color: #FCA29A; }
body.dark-mode .rv2-status-ico.success { background: #16321F; color: #74D89B; }
body.dark-mode .rv2-status-ico.error { background: #3A1B1A; color: #FCA29A; }
