/* ==========================================================================
   css/silver-auth.css  (AAA funnel pass, 2026-11-07)
   SilverMU funnel forms: register, login, recover (lost-password, reset).
   Loaded by register.php, account/login.php, recover/lost-password.php, recover/reset.php with
       $pageStyles[] = '/css/silver-auth.css';          (a silver-*.css sheet prints AFTER the skin)
       $bodyClass    = 'svp-auth svp-auth--register';   (--login | --recover; register adds --done / --sent)
   Mechanic = css/silver-inner.css: everything sits in @layer sv-auth and every declaration carries !important.
   A layered !important beats the unlayered !important of silver.css, citadel.css, register.css and the
   in-body <style> of register.php. A declaration without !important loses: never write one.
   NEVER: opacity / transform / transition / animation on section or .white-box (fx.js owns reveals);
          display / visibility / width on anything a script toggles ([hidden], .is-empty).
   ========================================================================== */
@layer sv-auth {

/* 1. Register layout --------------------------------------------------------------------------------------------- */
/* the card and the side panels start on one line (the card carried margin:2rem auto, the panels none) */
body.svp-auth--register .register-page .register-section { margin: 0 auto !important; max-width: 680px !important; }
@media (min-width: 1181px) {
  body.svp-auth--register .register-page .register-section { max-width: none !important; }
}
/* <= 1180px: card (max 680, centred) on top, the two panels side by side under it, two cards each */
@media (max-width: 1180px) {
  body.svp-auth--register .register-page .register-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-areas: "center center" "left right" !important;
    max-width: 920px !important;
    margin-inline: auto !important;
    gap: 16px !important;
  }
  body.svp-auth--register .register-page .register-side__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
}
@media (max-width: 760px) {
  body.svp-auth--register .register-page .register-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "center" "left" "right" !important;
  }
}

/* 2. Side panels: art figures with the caption ON the art (no black bands, no caption pill, nothing opens) ---------- */
body.svp-auth--register .register-side__title {
  margin: 0 0 12px !important;
  font: 600 13px/1.2 var(--sv-font-ui) !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: var(--sv-fire-1, #ffd27a) !important;
}
body.svp-auth--register .register-side__panel { padding: 16px !important; border-radius: 14px !important; }
body.svp-auth .svp-shot {
  position: relative !important; margin: 0 !important; overflow: hidden !important;
  border-radius: 10px !important; border: 1px solid rgba(195, 202, 216, 0.16) !important;
  background: #0a0e17 !important; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38) !important;
}
body.svp-auth .svp-shot__img {
  display: block !important; width: 100% !important; height: auto !important; max-width: none !important;
  aspect-ratio: 16 / 9 !important; object-fit: cover !important; object-position: 50% 30% !important;
  margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  filter: saturate(1.04) contrast(1.04) !important;
}
/* the Castle Siege tile is a dark red scene: CSS-only lift instead of a new file */
body.svp-auth .svp-shot__img[src*="slide-events-sm"] { filter: brightness(1.3) contrast(1.04) saturate(1.1) !important; }
body.svp-auth .svp-shot__cap {
  position: absolute !important; inset: auto 0 0 0 !important; margin: 0 !important; padding: 34px 12px 10px !important;
  background: linear-gradient(180deg, rgba(5, 7, 13, 0) 0, rgba(5, 7, 13, 0.78) 45%, rgba(5, 7, 13, 0.92) 100%) !important;
  color: #eef2f8 !important; font: 600 15px/1.25 var(--sv-font-display) !important; letter-spacing: 0.02em !important;
  text-align: left !important; text-wrap: balance !important; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6) !important;
}
@media (max-width: 560px) {
  body.svp-auth .svp-shot__cap { padding: 24px 8px 8px !important; font-size: 13px !important; }
}

/* 3. Form states: focus ring in the skin's ice, flagged field after a rejection, Turnstile --------------------------- */
body.svp-auth .form-layout input:focus-visible { border-color: #7cc8ff !important; box-shadow: 0 0 0 3px rgba(124, 200, 255, 0.28) !important; outline: 0 !important; }
body.svp-auth .form-layout input[aria-invalid="true"] { border-color: #ff7a59 !important; box-shadow: 0 0 0 3px rgba(255, 122, 89, 0.2) !important; }
body.svp-auth .form-layout input[aria-invalid="true"]:focus-visible { border-color: #ff7a59 !important; box-shadow: 0 0 0 3px rgba(255, 122, 89, 0.38) !important; }
body.svp-auth .form-layout > .cf-turnstile { display: flex !important; justify-content: center !important; min-height: 65px !important; }

/* 4. Consent / remember checkbox: ember tick instead of the system grey ---------------------------------------------- */
body.svp-auth .form-check input[type="checkbox"] {
  -webkit-appearance: none !important; appearance: none !important;
  display: grid !important; place-content: center !important; flex: none !important;
  width: 22px !important; height: 22px !important; min-height: 0 !important; margin: 0.1em 0 0 !important; padding: 0 !important;
  border: 1px solid rgba(214, 222, 236, 0.5) !important; border-radius: 5px !important;
  background: #0a0e17 !important; box-shadow: none !important;
}
body.svp-auth .form-check input[type="checkbox"]::before {
  content: "" !important; width: 12px !important; height: 12px !important; transform: scale(0) !important;
  background: #fff9ef !important; clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%) !important;
}
body.svp-auth .form-check input[type="checkbox"]:checked { background: linear-gradient(180deg, #f2662a, #b8261a) !important; border-color: #ffd27a !important; }
body.svp-auth .form-check input[type="checkbox"]:checked::before { transform: scale(1) !important; }
body.svp-auth .form-check input[type="checkbox"]:focus-visible { outline: 2px solid #7cc8ff !important; outline-offset: 2px !important; box-shadow: none !important; }
body.svp-auth .form-check input[type="checkbox"][aria-invalid="true"] { border-color: #ff7a59 !important; box-shadow: 0 0 0 3px rgba(255, 122, 89, 0.3) !important; }

/* 5. Submit button: pressed + busy states (js/register.js sets .is-busy; it never uses [disabled]) -------------------- */
body.svp-auth .form-layout .button:active { transform: translateY(1px) !important; }
body.svp-auth .form-layout .button.is-busy,
body.svp-auth .form-layout .button[aria-disabled="true"] { filter: grayscale(0.5) brightness(0.82) !important; cursor: progress !important; transform: none !important; }
body.svp-auth .form-layout .button.is-busy::after {
  content: "" !important; flex: none !important; box-sizing: border-box !important; display: inline-block !important;
  width: 14px !important; height: 14px !important; margin-left: 10px !important; vertical-align: -2px !important; border-radius: 50% !important;
  border: 2px solid rgba(255, 249, 239, 0.35) !important; border-top-color: #fff9ef !important;
  animation: svp-auth-spin 0.8s linear infinite !important;
}
@keyframes svp-auth-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  body.svp-auth .form-layout .button.is-busy::after { animation: none !important; }
}

/* 6. Alerts: recover pages print one box (the wrapper no longer draws a second one); info = neutral note ------------ */
body.svp-auth .form-alert.info {
  border: 1px solid rgba(124, 200, 255, 0.32) !important;
  border-left: 3px solid #7cc8ff !important;
  background: linear-gradient(90deg, rgba(124, 200, 255, 0.12), rgba(10, 14, 23, 0.55)) !important;
  color: #d6e9fb !important;
}
body.svp-auth--recover #form-alert:empty { display: none !important; }
/* next-step actions under an alert (reset: success / spent / expired link) */
body.svp-auth .svp-auth-actions { display: grid !important; gap: 12px !important; margin: 8px 0 0 !important; }
body.svp-auth .svp-auth-actions .sv-btn { width: 100% !important; justify-content: center !important; white-space: normal !important; text-align: center !important; line-height: 1.25 !important; }

/* 7. Register success: what to do next; resend is a rescue action ONLY when the mail went out ---------------------- */
body.svp-auth--done .register-intro,
body.svp-auth--done .register-platform-note:not(.is-handheld) { display: none !important; }
body.svp-auth .svp-next { display: grid !important; gap: 10px !important; margin: 0 0 20px !important; padding: 0 !important; list-style: none !important; counter-reset: svpn !important; }
body.svp-auth .svp-next > li {
  counter-increment: svpn !important; position: relative !important; margin: 0 !important;
  padding: 12px 14px 12px 54px !important; border: 1px solid rgba(195, 202, 216, 0.14) !important; border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.028) !important; font: 400 16px/1.5 var(--sv-font-body) !important; color: #d0d7e3 !important;
}
body.svp-auth .svp-next > li::before {
  content: counter(svpn) !important; position: absolute !important; left: 14px !important; top: 11px !important;
  display: grid !important; place-content: center !important; width: 28px !important; height: 28px !important; border-radius: 50% !important;
  background: linear-gradient(180deg, #f2662a, #b8261a) !important; border: 1px solid rgba(255, 210, 122, 0.6) !important;
  color: #fff9ef !important; font: 600 13px/1 var(--sv-font-ui) !important;
}
body.svp-auth .svp-next b { color: #eef2f8 !important; font-weight: 700 !important; }
/* the Download CTA is an .sv-btn (nowrap by default): let it wrap at 320 */
body.svp-auth .svp-next__cta { margin: 0 0 24px !important; white-space: normal !important; text-align: center !important; line-height: 1.25 !important; padding-block: 14px !important; }
body.svp-auth--done .register-resend__title { margin: 0 0 8px !important; font: 600 13px/1.2 var(--sv-font-ui) !important; letter-spacing: 0.16em !important; text-transform: uppercase !important; color: #a3adbf !important; }
/* steel ONLY in the sent state: when the mail failed, resend is the one real action and keeps the fire plate */
body.svp-auth--sent .register-resend .button {
  background: var(--sv-steel) !important; border: 1px solid rgba(214, 222, 236, 0.42) !important; color: #dfe5ef !important; text-shadow: none !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.5) !important; min-height: 44px !important;
}

/* 8. Login: show/hide password, account links ----------------------------------------------------------------------- */
body.svp-auth--login .svp-pw { position: relative !important; }
body.svp-auth--login .svp-pw > input { padding-right: 56px !important; }
body.svp-auth--login .svp-pw__toggle {
  position: absolute !important; top: 50% !important; right: 4px !important; transform: translateY(-50%) !important;
  display: grid !important; place-items: center !important; width: 44px !important; height: 44px !important; min-height: 0 !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 6px !important; background: transparent !important;
  box-shadow: none !important; color: #a9b3c6 !important; cursor: pointer !important;
}
body.svp-auth--login .svp-pw__toggle svg { fill: none !important; stroke: currentColor !important; stroke-width: 1.7 !important; stroke-linecap: round !important; stroke-linejoin: round !important; }
body.svp-auth--login .svp-pw__off { display: none !important; }
body.svp-auth--login .svp-pw__toggle[aria-pressed="true"] .svp-pw__on { display: none !important; }
body.svp-auth--login .svp-pw__toggle[aria-pressed="true"] .svp-pw__off { display: block !important; }
body.svp-auth--login .svp-pw__toggle:hover { color: #f3f6fb !important; background: rgba(124, 200, 255, 0.1) !important; }
body.svp-auth--login .svp-pw__toggle:focus-visible { outline: 2px solid #7cc8ff !important; outline-offset: -2px !important; color: #f3f6fb !important; }
body.svp-auth--login .svp-pw__toggle[aria-pressed="true"] { color: #7cc8ff !important; }
body.svp-auth--login input[type="password"]::-ms-reveal { display: none !important; }
body.svp-auth--login .form-links { margin-top: 20px !important; display: grid !important; gap: 10px !important; }
body.svp-auth--login .form-links p { margin: 0 !important; }
body.svp-auth--login .svp-auth-or { font-size: 15px !important; }
body.svp-auth--login .svp-wrap { white-space: normal !important; text-align: center !important; line-height: 1.25 !important; padding-block: 12px !important; }
body.svp-auth--login .form-links p:last-child a { display: inline-flex !important; align-items: center !important; min-height: 44px !important; }

}
