/* =====================================================================
   auth-extra.css — rules shared by /forgot, /create and /change_password
   Loaded AFTER login.css. Scoped under .auth-page; new classes are ax-.
   The password-feedback block (#password-feedback) is rewritten by inline
   JS with the class names .password-security.{weak|secure|compromised},
   .strength-bar and .strength-fill.strength-*, so those are styled here
   too (overriding the global ones in pages.css).
   ===================================================================== */

/* back link above the heading (change_password) */
.auth-page .ax-back {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 44px; margin: -8px 0 -8px -6px; padding: 0 6px;
    font-size: 14px; font-weight: 600; color: var(--gray); text-decoration: none; border-radius: 8px;
}
.auth-page .ax-back:hover { color: var(--dark); }
.auth-page .ax-back svg { width: 18px; height: 18px; }

/* verified e-mail chip (create) */
.auth-page .ax-verified {
    display: flex; align-items: center; gap: 12px;
    max-width: 360px; margin: 0 auto; padding: 12px 14px;
    border: 1px solid #bbf7d0; background: #f0fdf4; border-radius: 10px;
}
.auth-page .ax-verified svg { width: 20px; height: 20px; color: var(--success); flex: none; }
.auth-page .ax-verified .ax-verified-label { display: block; font-size: 12px; color: #166534; line-height: 1.2; }
.auth-page .ax-verified .ax-verified-email { display: block; font-size: 15px; font-weight: 600; color: var(--dark); overflow-wrap: anywhere; line-height: 1.3; }

/* helper text under a field group */
.auth-page .ax-hint { font-size: 13px; color: var(--gray); line-height: 1.5; max-width: 360px; margin: 8px auto 0; }

/* floating-label fields: auth.js hides the input after a forgot submit — hide the label with it */
.auth-page .field:has(> .form-input[style*="display: none"]) { display: none; }

/* info box with an icon column (forgot) */
.auth-page .message-box.ax-info { background: #f8fafc; }
.auth-page .message-box.ax-info .message-icon { color: var(--primary); }
.auth-page .message-box.verifying { align-items: center; }
.auth-page .message-box .loading-dots { display: flex; gap: 4px; align-items: center; }
.auth-page .message-box .loading-dot { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }

/* toggle rows (agree / offers / remember) reuse .toggle-switch from login.css */
.auth-page .ax-toggles { max-width: 360px; margin: 16px auto 0; display: flex; flex-direction: column; gap: 4px; }
.auth-page .ax-toggle { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 6px 0; }
.auth-page .ax-toggle .toggle-switch { margin-top: 2px; cursor: pointer; }
.auth-page .ax-toggle .toggle-label { flex: 1; min-width: 0; white-space: normal; font-size: 14px; font-weight: 500; color: var(--dark); line-height: 1.45; cursor: pointer; }
.auth-page .ax-toggle .ax-toggle-help { display: block; font-size: 12px; color: var(--gray); font-weight: 400; margin-top: 2px; }
.auth-page .ax-toggle .ax-req { color: var(--error); font-weight: 700; }

/* password strength / HIBP feedback (innerHTML written by the page JS) */
.auth-page .password-security {
    max-width: 360px; margin: 16px auto 0; padding: 12px 14px;
    border-radius: 10px; border: 1px solid var(--border); background: #f8fafc;
    font-size: 14px; line-height: 1.5; color: var(--dark);
}
.auth-page .password-security.weak { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.auth-page .password-security.secure { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.auth-page .password-security.compromised { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.auth-page .password-security small { font-size: 12px; }
.auth-page .strength-meter { margin-top: 10px; }
.auth-page .strength-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin: 0; }
.auth-page .strength-fill { display: block; height: 100%; border-radius: 3px; transition: width .25s ease, background .25s ease; }
.auth-page .strength-fill.strength-weak   { width: 25%;  background: var(--error); }
.auth-page .strength-fill.strength-fair   { width: 50%;  background: #f59e0b; }
.auth-page .strength-fill.strength-good   { width: 75%;  background: var(--primary); }
.auth-page .strength-fill.strength-strong { width: 100%; background: var(--success); }

/* actions row (change_password): ghost cancel + primary save */
.auth-page .ax-actions { display: flex; gap: 12px; max-width: 360px; margin: 16px auto 0; }
.auth-page .ax-actions .btn-auth-primary { margin: 0; flex: 1.5; height: auto; min-height: 48px; padding: 8px 12px; line-height: 1.2; }
.auth-page .ax-btn-ghost {
    flex: 1; display: inline-flex; align-items: center; justify-content: center;
    height: 48px; border: 1px solid var(--border); border-radius: 10px; background: #fff;
    font: inherit; font-size: 15px; font-weight: 600; color: var(--dark); text-decoration: none;
    transition: background .15s, border-color .15s;
}
.auth-page .ax-btn-ghost:hover { background: var(--light-gray); border-color: #cbd5e1; }

/* security tips list */
.auth-page .ax-tips { max-width: 360px; margin: 0 auto; }
.auth-page .ax-tips h2 { font-size: 15px; font-weight: 700; margin: 0 0 10px; color: var(--dark); }
.auth-page .ax-tips ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.auth-page .ax-tips li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--dark); }
.auth-page .ax-tips li svg { width: 18px; height: 18px; flex: none; color: var(--success); margin-top: 2px; }

/* a second stacked card (tips) */
.auth-page .auth-container + .auth-container { margin-top: 16px; }
.auth-page .ax-card-body { padding: 24px; }

/* invalid-link state (create without hash) */
.auth-page .ax-empty { text-align: center; padding: 8px 0 0; }
.auth-page .ax-empty .ax-empty-icon { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 50%; background: #fef2f2; color: #b91c1c; display: flex; align-items: center; justify-content: center; }
.auth-page .ax-empty .ax-empty-icon svg { width: 24px; height: 24px; }
.auth-page .ax-empty h1 { font-size: 20px; font-weight: 700; margin: 0 0 6px; }
.auth-page .ax-empty p { font-size: 14px; color: var(--gray); margin: 0; line-height: 1.5; }

/* text links under the CTA */
.auth-page .ax-links { text-align: center; font-size: 14px; margin: 16px auto 0; max-width: 360px; }
.auth-page .ax-links a { color: var(--dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; }
.auth-page .ax-links a:hover { color: var(--primary-dark); }

@media (min-width: 960px) {
    .auth-page .ax-card-body { padding: 32px 40px; }
}
