/* ============================================================================
   THE SIGN-IN LAYER — version B, "Under the fire" (Chiran, 27 Oct 2026). inc/rebrand/auth.php + sarisara-auth.js.
   The theme's own sign-in window (#st-login-form, style 9) and forgot-password window, dressed: the fire dancers
   fill the screen, a bar with only the logo and a cross sits exactly where the menu bar was, the story is on the
   left and the same 420px white form on the right. Phone: story on top, form below, both scroll.
   "html body #id.ssa" out-ranks the theme's "#st-login-form .modal-dialog …" rules without touching them.
   ============================================================================ */
html body .modal.ssa {
  --ssa-v: #7700FF; --ssa-v-dark: #5C00CC; --ssa-navy: #090920; --ssa-t2: #5A5A6E; --ssa-line: #E3E3EA;
  --ssa-top: 120px; --ssa-l: 64px; --ssa-r: 64px;
  padding: 0 !important; background: #090920; font-family: 'Google Sans', 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
html body .modal.ssa::before { content: ""; position: fixed; inset: 0; z-index: 0; background: #090920 url(../img/auth/fire.jpg) 50% 60% / cover no-repeat; }
html body .modal.ssa::after { content: ""; position: fixed; inset: 0; z-index: 0; background: linear-gradient(90deg, rgba(9,9,32,.84) 0%, rgba(9,9,32,.58) 45%, rgba(9,9,32,.3) 100%); }
html.ssa-open .modal-backdrop { opacity: 1 !important; background: #090920; }

/* the bar: the page's own logo and a cross, in the very same places */
.modal.ssa .ssa-bar { position: fixed; top: 0; left: 0; right: 0; height: 0; z-index: 3; }
.modal.ssa .ssa-logo { position: absolute; display: block; }
.modal.ssa .ssa-logo a { display: flex; align-items: center; gap: 11px; pointer-events: none; text-decoration: none; }
.modal.ssa .ssa-logo img, .modal.ssa .ssa-logo svg { display: block; }
.modal.ssa .ssa-x { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; margin: 0; border-radius: 999px;
  border: 1px solid #fff; background: #fff; color: var(--ssa-navy); cursor: pointer; box-shadow: 0 6px 18px -6px rgba(0,0,0,.45);
  transition: transform .2s ease, background .2s; animation: ssa-x-in .35s ease both; }
.modal.ssa .ssa-x:hover { transform: rotate(90deg); }
.modal.ssa .ssa-x svg { width: 18px; height: 18px; display: block; }
@keyframes ssa-x-in { from { transform: rotate(-90deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }

/* story left, form right */
.modal.ssa .ssa-wrap { position: relative; z-index: 1; min-height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: center; gap: 60px;
  padding: var(--ssa-top) var(--ssa-r) 32px var(--ssa-l); box-sizing: border-box; }
.modal.ssa .ssa-story { display: flex; flex-direction: column; gap: 14px; color: #fff; max-width: 560px; }
.modal.ssa .ssa-chip { display: inline-flex; align-items: center; gap: 7px; align-self: flex-start; padding: 7px 13px; border-radius: 999px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(8px); font-size: 13px; font-weight: 500; color: #fff; }
.modal.ssa .ssa-chip svg, .modal.ssa .ssa-cap svg { flex: none; display: block; }
.modal.ssa .ssa-chip svg { width: 15px !important; height: 15px !important; }
.modal.ssa .ssa-cap svg { width: 13px !important; height: 13px !important; }
html body .modal.ssa .ssa-h { margin: 0; font-family: inherit; font-size: clamp(36px, 3.6vw, 52px); line-height: 1.06; letter-spacing: -.025em; font-weight: 700; color: #fff; text-wrap: balance; }
html body .modal.ssa .ssa-p { margin: 0; font-size: 17px; line-height: 1.55; color: rgba(255,255,255,.86); max-width: 470px; padding: 0; }
html body .modal.ssa .ssa-cap { display: flex; align-items: center; gap: 7px; margin: 6px 0 0; font-size: 12px; line-height: 1.4; color: rgba(255,255,255,.66); }
.modal.ssa[data-tab="up"] .ssa-h--in, .modal.ssa[data-tab="up"] .ssa-p--in,
.modal.ssa:not([data-tab="up"]) .ssa-h--up, .modal.ssa:not([data-tab="up"]) .ssa-p--up { display: none; }
#st-forgot-form.ssa .ssa-h--up, #st-forgot-form.ssa .ssa-p--up { display: none; }

/* the card (the same 420px form in every state) */
html body .modal.ssa .modal-dialog { max-width: 420px !important; width: 100%; margin: 0 !important; transform: none; justify-self: end; }
html body .modal.ssa.fade .modal-dialog { transform: translateY(14px); transition: transform .4s ease; }
html body .modal.ssa.show .modal-dialog { transform: none; }
html body .modal.ssa .modal-content { border: 0 !important; border-radius: 20px !important; padding: 22px 28px 20px !important; background: #fff;
  box-shadow: 0 1px 2px rgba(9,9,32,.04), 0 20px 50px -18px rgba(9,9,32,.45) !important; }
html body .modal.ssa .modal-header { display: block !important; border: 0 !important; padding: 0 !important; margin: 0 0 16px !important; }
html body .modal.ssa .modal-header .close, html body .modal.ssa .modal-header .modal-close-btn { display: none !important; }
html body .modal.ssa .account-tabs { display: grid !important; grid-template-columns: 1fr 1fr; padding: 4px !important; margin: 0 !important; border-radius: 999px; background: #F2F1F6; }
html body .modal.ssa .account-tabs li { margin: 0 !important; padding: 8px 0; text-align: center; border-radius: 999px; font-size: 14px !important; line-height: 20px !important; font-weight: 500;
  color: var(--ssa-t2) !important; text-decoration: none !important; cursor: pointer; transition: background .15s, color .15s; }
html body .modal.ssa .account-tabs li.active { background: #fff; color: var(--ssa-navy) !important; box-shadow: 0 1px 3px rgba(9,9,32,.14); }
html body .modal.ssa .modal-body { padding: 0 !important; }
html body .modal.ssa .login-form-wrapper .heading { font-size: 24px !important; line-height: 1.2 !important; font-weight: 700 !important; letter-spacing: -.015em; margin: 0 !important; color: var(--ssa-navy) !important; }
html body .modal.ssa .register-component .heading { display: none !important; }
html body .modal.ssa p.ssa-sub { margin: 4px 0 14px; padding: 0; font-size: 14px; line-height: 1.5; color: var(--ssa-t2); }
html body .modal.ssa .login-form-wrapper form { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; }
html body .modal.ssa .login-form-wrapper form > * { grid-column: 1 / -1; }
html body .modal.ssa .login-form-wrapper form .row { margin: 0 0 0 -6px; margin-right: -6px; }
html body .modal.ssa .login-form-wrapper form .row > [class*="col-"] { padding: 0 6px; }
html body .modal.ssa .login-form-wrapper form .form-group { position: relative; margin: 0 0 10px !important; }
html body .modal.ssa label.ssa-l { display: block; margin: 0 0 5px; font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--ssa-navy); }
html body .modal.ssa .login-form-wrapper form .form-group input.form-control,
html body .modal.ssa .login-form-wrapper form .sarisara-phone__row { height: 44px; border: 1px solid var(--ssa-line) !important; border-radius: 12px !important; background: #fff;
  font-size: 14.5px !important; line-height: 20px !important; color: var(--ssa-navy) !important; box-shadow: none; transition: border-color .15s, box-shadow .15s; }
html body .modal.ssa .login-form-wrapper form .form-group input.form-control { padding: 0 14px !important; }
html body .modal.ssa .login-form-wrapper form .form-group.ssa-g--ic input.form-control { padding-left: 42px !important; }
html body .modal.ssa .login-form-wrapper form .form-group.field-password input.form-control { padding-right: 42px !important; }
html body .modal.ssa .login-form-wrapper form .form-group input.form-control::placeholder { color: #A3A1B5; }
html body .modal.ssa .login-form-wrapper form .form-group input.form-control:focus,
html body .modal.ssa .login-form-wrapper form .sarisara-phone__row:focus-within { border-color: var(--ssa-v) !important; box-shadow: 0 0 0 4px rgba(119,0,255,.12) !important; outline: 0; }
.modal.ssa .ssa-ic { position: absolute; left: 14px; top: 35px; line-height: 0; color: #8C8AA0; pointer-events: none; }
.modal.ssa .ssa-ic svg { width: 18px; height: 18px; display: block; }
.modal.ssa .form-group:focus-within .ssa-ic { color: var(--ssa-v); }
html body .modal.ssa .login-form-wrapper form .form-group.field-password .stt-icon { top: 36px !important; bottom: auto; margin: 0 !important; right: 14px !important; }   /* from the top: messages under the box must not move the icons */
/* the phone field keeps its own country list; only its frame changes */
html body .modal.ssa .sarisara-phone__row { display: flex; align-items: stretch; overflow: visible; }
html body .modal.ssa .login-form-wrapper form .form-group .sarisara-phone__row input.form-control.sarisara-phone__national { flex: 1; min-width: 0; padding: 0 12px !important; border: 0 !important; border-radius: 0 12px 12px 0 !important; box-shadow: none !important; height: 42px !important; background: transparent; }
html body .modal.ssa .sarisara-phone__country { flex: none; }
html body .modal.ssa .sarisara-phone__trigger { width: auto !important; white-space: nowrap; padding: 0 12px !important; height: 42px; border: 0 !important; border-right: 1px solid var(--ssa-line) !important; border-radius: 12px 0 0 12px !important; background: transparent !important; font-size: 14px; font-weight: 500; color: var(--ssa-navy); }
html body .modal.ssa .sl-user-hint { display: block; margin-top: 4px; font-size: 12px; color: var(--ssa-t2); }
/* Who are you? — one line, two small tiles */
html body .modal.ssa .sl-role { margin: 2px 0 10px !important; padding: 0 !important; border: 0 !important; background: none !important; }
html body .modal.ssa .sl-role__head { margin: 0 0 5px !important; padding: 0 !important; border: 0 !important; }
html body .modal.ssa .sl-role__head::before, html body .modal.ssa .sl-role__head::after, html body .modal.ssa .sl-role__title::before, html body .modal.ssa .sl-role::before { display: none !important; }
html body .modal.ssa .sl-role__title { margin: 0 !important; padding: 0 !important; border: 0 !important; font-size: 13px !important; font-weight: 500; color: var(--ssa-navy); text-transform: none; letter-spacing: 0; }
html body .modal.ssa .sl-role__desc { display: none; }
html body .modal.ssa .sl-role__options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
html body .modal.ssa .sl-role__option { display: flex !important; align-items: center; gap: 9px; height: 44px; margin: 0 !important; padding: 0 12px !important; border: 1.5px solid var(--ssa-line); border-radius: 12px;
  background: #fff; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--ssa-navy); white-space: nowrap; }
html body .modal.ssa .sl-role__option input { position: absolute; opacity: 0; pointer-events: none; }
html body .modal.ssa .sl-role__option .ssa-role-ic { color: var(--ssa-v); line-height: 0; flex: none; }
html body .modal.ssa .sl-role__option .ssa-role-ic svg { width: 20px; height: 20px; display: block; }
html body .modal.ssa .sl-role__option.is-selected, html body .modal.ssa .sl-role__option:has(input:checked) { border-color: var(--ssa-v); background: #F8F4FF; }
html body .modal.ssa .sl-role__note { margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--ssa-t2); }
html body .modal.ssa .sl-role__error { margin: 6px 0 0; font-size: 12.5px; color: #FF0A1F; }
/* tick boxes, links, the button */
html body .modal.ssa .st-icheck { margin: 2px 0 12px !important; }
html body .modal.ssa .st-icheck-item label { font-size: 13.5px !important; line-height: 1.45 !important; color: var(--ssa-t2) !important; }
html body .modal.ssa .st-icheck-item label .checkmark { border-color: #C9C7D6 !important; border-radius: 6px !important; width: 18px !important; height: 18px !important; }
html body .modal.ssa .st-link, html body .modal.ssa .open-loss-password { color: var(--ssa-v) !important; font-weight: 500 !important; font-size: 13.5px !important; text-decoration: none !important; }
html body .modal.ssa .st-link:hover, html body .modal.ssa .open-loss-password:hover { text-decoration: underline !important; text-underline-offset: 3px; }
html body .modal.ssa .login-component .st-icheck { margin: 0 0 14px !important; align-items: center; justify-content: space-between; }
/* Remember me sits above the Sign in button, as in the design */
html body .modal.ssa .login-component form > .st-icheck { order: 1; }
html body .modal.ssa .login-component form > .form-group:has(input[type="submit"]) { order: 2; }
html body .modal.ssa .login-component form > .message-wrapper, html body .modal.ssa .login-component form > .resend-verification-wrapper { order: 3; }
html body .modal.ssa .login-component form > .advanced { order: 4; }
html body .modal.ssa .login-form-wrapper form .form-group input[type="submit"] { height: 48px; width: 100%; padding: 0 !important; border: 0 !important; border-radius: 999px !important;
  background: var(--ssa-v) !important; color: #fff !important; font-size: 15px !important; font-weight: 500 !important; box-shadow: 0 8px 20px -8px rgba(119,0,255,.7); cursor: pointer; transition: background .15s, transform .15s; }
html body .modal.ssa .login-form-wrapper form .form-group input[type="submit"]:hover { background: var(--ssa-v-dark) !important; transform: translateY(-1px); }
html body .modal.ssa .message-wrapper { margin-top: 0 !important; font-size: 13.5px; }
html body .modal.ssa .message-wrapper:empty { display: none; }
html body .modal.ssa .resend-verification-text { font-size: 13px; color: var(--ssa-t2); }

/* the forgot-password window: the same frame and card */
html body #st-forgot-form.ssa .modal-header .modal-title, html body #st-forgot-form.ssa .modal-title { font-size: 22px; font-weight: 700; color: var(--ssa-navy); }
html body #st-forgot-form.ssa .modal-header { display: flex !important; }
html body #st-forgot-form.ssa input.form-control { height: 44px; border: 1px solid var(--ssa-line); border-radius: 12px; padding: 0 14px; }
html body #st-forgot-form.ssa input[type="submit"] { height: 48px; width: 100%; border: 0; border-radius: 999px; background: var(--ssa-v); color: #fff; font-weight: 500; }

/* tablets and phones: the story above, the form below, everything scrolls together */
@media (max-width: 1100px) {
  html body .modal.ssa::before { background-image: url(../img/auth/fire-phone.jpg); background-position: 60% 50%; }
  html body .modal.ssa::after { background: linear-gradient(180deg, rgba(9,9,32,.55) 0%, rgba(9,9,32,.78) 45%, rgba(9,9,32,.94) 100%); }
  .modal.ssa .ssa-wrap { grid-template-columns: minmax(0, 1fr); align-items: start; gap: 22px; padding: var(--ssa-top) 12px 28px; max-width: 560px; margin: 0 auto; }
  .modal.ssa .ssa-story { padding: 0 8px; }
  html body .modal.ssa .modal-dialog { max-width: none !important; justify-self: stretch; }
  html body .modal.ssa .ssa-h { font-size: 30px; }
  html body .modal.ssa .ssa-p { font-size: 14.5px; }
  html body .modal.ssa .ssa-cap { display: none; }
}
@media (max-width: 600px) {
  html body .modal.ssa .modal-content { padding: 20px 18px 18px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .modal.ssa .ssa-x { animation: none; transition: none; }
  html body .modal.ssa.fade .modal-dialog { transition: none; transform: none; }
}

/* the theme's "Login Failed" / message box over the window: our violet button, not the old gold one */
html.ssa-open .login-message-popup .btn-ok-login, html.ssa-open .login-message-popup button { background: #7700FF !important; color: #fff !important; font-weight: 500 !important; font-family: 'Google Sans', 'DM Sans', sans-serif; }
html.ssa-open .login-message-popup .btn-ok-login:hover { background: #5C00CC !important; }
html.ssa-open .login-message-popup .popup-content { border-radius: 20px; font-family: 'Google Sans', 'DM Sans', sans-serif; }

/* round 2 (Chiran, 27 Oct 2026): Username and Password each on their own row; the form sits higher, right under the bar */
html body .modal.ssa .modal-dialog { align-self: start; }
@media (max-width: 1100px) { html body .modal.ssa .modal-dialog { align-self: auto; } }

/* wrong details: the red half-pill under the password box (Chiran, 27 Oct 2026) */
html body .modal.ssa .login-form-wrapper form .form-group input.form-control.ssa-bad { border-color: #FF0A1F !important; box-shadow: 0 0 0 4px rgba(255,10,31,.08) !important; }
html body .modal.ssa .ssa-oops { grid-column: 1 / -1; order: 0; display: flex; gap: 8px; align-items: flex-start; margin: -14px 10px 12px; padding: 12px 14px 9px; border-radius: 0 0 14px 14px;
  background: linear-gradient(90deg, #B8001A, #FF3B4E); color: #fff; font-size: 13px; font-weight: 500; line-height: 1.4; animation: ssa-shake .5s ease 1; position: relative; z-index: 0; }
html body .modal.ssa .ssa-oops__a { color: #fff !important; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
@keyframes ssa-shake { 0%,100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

/* the email-check plugin's own line under a box ("Please enter a valid email") takes the same red half-pill look */
html body .modal.ssa .field-feedback.error { display: inline-flex !important; margin: -2px 0 0 12px; padding: 7px 13px 6px 12px; border-radius: 0 0 12px 12px; background: linear-gradient(90deg, #B8001A, #FF3B4E); color: #fff !important; font-size: 12.5px; font-weight: 500; line-height: 1.35; }
html body .modal.ssa .ssd-tag { margin-top: 0; }

/* tick box and Who are you?: the message sits under the whole row (Chiran, 27 Oct 2026); signup-role's own line takes the same look */
html body .modal.ssa .st-icheck + .ssd-tag { margin: -6px 0 12px 28px; border-radius: 12px; grid-column: 1 / -1; justify-self: start; }
html body .modal.ssa .sl-role__options + .ssd-tag { margin: 0 0 4px 12px; }
html body .modal.ssa .sl-role__error { display: table; margin: 0 0 0 12px; padding: 6px 12px 5px; border-radius: 0 0 12px 12px; background: linear-gradient(90deg, #B8001A, #FF3B4E); color: #fff; font-size: 12.5px; font-weight: 500; }
html body .modal.ssa .sl-role__options + .ssd-tag ~ .sl-role__error { display: none !important; }
/* phone and tablet: the form scrolls under the logo and the cross, so they sit on a dark strip (27 Oct 2026) */
@media (max-width: 1100px) {
  .modal.ssa .ssa-bar::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: calc(var(--ssa-top) - 4px); background: linear-gradient(180deg, rgba(9,9,32,.96) 72%, rgba(9,9,32,0)); pointer-events: none; }
}

/* /login/ and /register/: the old page form never shows; the layer opens over a night-blue page */
body.ssa-page { background: #090920 !important; }
body.ssa-page #st-login-form-page, body.ssa-page .st-login-class-wrapper, body.ssa-page #st-content-wrapper { display: none !important; }

/* "WHO ARE YOU?" AS A REAL CHOICE (Chiran, 6 Nov 2026): it sat like two labels, so people only learnt they had to
   pick one when Create my account refused them. A round choice button (the verification form's radio: 18px,
   1.5px grey ring, violet ring + dot when chosen) replaces the icon, and the words are a little smaller.
   The choice now also comes first on the form (signup-role.js). */
html body .modal.ssa .sl-role { margin: 0 0 14px !important; }
html body .modal.ssa .sl-role__option .ssa-role-ic { display: none !important; }
html body .modal.ssa .sl-role__option { font-size: 13.5px !important; gap: 10px; }
html body .modal.ssa .sl-role__option input[type="radio"] { position: relative !important; opacity: 1 !important; pointer-events: auto !important;
  -webkit-appearance: none; appearance: none; width: 18px !important; height: 18px !important; min-width: 18px; margin: 0 !important; padding: 0 !important;
  border: 1.5px solid #C9C6D6 !important; border-radius: 50% !important; background: #fff !important; box-shadow: none !important; cursor: pointer; flex: none; display: inline-block !important; }
html body .modal.ssa .sl-role__option input[type="radio"]:checked { border-color: var(--ssa-v) !important; }
html body .modal.ssa .sl-role__option input[type="radio"]:checked::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--ssa-v); }
html body .modal.ssa .sl-role__option input[type="radio"]:focus-visible { outline: 2px solid var(--ssa-v); outline-offset: 2px; }
html body .modal.ssa .sl-role__option span { color: var(--ssa-navy) !important; }
