/* =============================================================
   WowCodes Portal — auth-v6.css
   The sign-in pages in the store look (homepage v6): login,
   register, forgot/reset password and the two-step code page.

   Loaded AFTER auth-theme.css and only by pages whose <body>
   carries .auth-v6, so every rule is scoped to that class and the
   other pages on auth-theme.css (verify-email, unsubscribe,
   link-site, authorize-install, ...) render exactly as before.

   Colours are the --store-* tokens (tokens.css); this sheet names
   none of its own (probe_portal_auth_v6.php). Logical properties
   only, so Arabic mirrors without an rtl.css rule.

   NOT HERE: .form-hint. auth-theme.css owns it (12px, --text2,
   #2508) and this sheet leaves it alone.
   ============================================================= */

body.auth-v6 {
  background: var(--store-bg);
  color: var(--store-ink);
  font-family: var(--store-body);
  padding-block: 88px 40px;
}
/* The marketing noise texture gives way to the store's dot grid. */
body.auth-v6::before { display: none; }

/* ── Background: the v6 hero's two glows, dot grid and shapes ── */
.auth-v6 .bg-ambient { isolation: isolate; }
.auth-v6 .bg-ambient::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(40rem 26rem at 85% 10%, var(--store-glow-a), transparent 70%),
    radial-gradient(30rem 22rem at 10% 95%, var(--store-glow-b), transparent 70%);
}
.auth-v6 .bg-ambient::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(var(--store-dot) 1.2px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, var(--store-mask) 0%, var(--store-mask-55) 55%, transparent 100%);
  mask-image: linear-gradient(180deg, var(--store-mask) 0%, var(--store-mask-55) 55%, transparent 100%);
}
/* The two drifting blobs become the hero's coin and ring. */
.auth-v6 .bg-blob { filter: none; animation: none; background: none; }
.auth-v6 .bg-blob-1 {
  top: 14%; bottom: auto; left: auto; right: auto; inset-inline-start: 9%;
  width: 120px; height: 120px;
  border: 2px solid var(--store-gold); opacity: .3;
}
.auth-v6 .bg-blob-1::after {
  content: ""; position: absolute; inset: 14px; border-radius: 50%;
  border: 1px dashed var(--store-gold);
}
.auth-v6 .bg-blob-2 {
  top: auto; bottom: -180px; left: auto; right: auto; inset-inline-end: -120px;
  width: 340px; height: 340px;
  border: 2px solid var(--store-brand); opacity: .22;
}
@media (max-width: 640px) {
  .auth-v6 .bg-blob-1 { display: none; }
  .auth-v6 .bg-blob-2 { width: 220px; height: 220px; bottom: -120px; inset-inline-end: -110px; }
}

/* ── Preloader in the store's colours ─────────────────────────── */
.auth-v6 #wc-preloader { background: var(--store-bg); }
.auth-v6 #wc-preloader::before { background: radial-gradient(ellipse 620px 420px at 50% 45%, var(--store-accent-soft), transparent 70%); }
.auth-v6 .wc-preloader-ring { border-color: var(--store-accent-soft); border-top-color: var(--store-accent); }

/* ── "Back to shop": the store header's button shape ─────────── */
.auth-v6 .auth-back-btn {
  height: 40px;
  padding-block: 0;
  padding-inline: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--store-line);
  background: var(--store-card);
  color: var(--store-ink);
  font: 600 .875rem/1 var(--store-body);
}
.auth-v6 .auth-back-btn:hover { background: var(--store-bg2); border-color: var(--store-line); color: var(--store-ink); }

/* ── Layout ───────────────────────────────────────────────────── */
.auth-v6 .auth-wrap { max-width: 440px; gap: 22px; }
.auth-v6 .auth-logo img, .auth-v6 .auth-logo svg { height: 28px; }

/* The old amber glow behind the card is not part of the store look. */
.auth-v6 .auth-glow { display: none; }

.auth-v6 .auth-card {
  background: var(--store-card);
  border: 1px solid var(--store-line);
  border-radius: var(--store-r);
  box-shadow: var(--store-shadow);
  padding: 36px;
  overflow: visible;
}
/* Phones (Theme lead, tl-1822): the logo and card sit 24px under
   "Back to shop" instead of centring in the screen, which left an empty
   band above the card and put the button under the keyboard. The button
   is 16px from the top plus 40px tall; the code page has no button, so its
   card starts 24px from the top. Desktop keeps the centring. */
@media (max-width: 599px) {
  body.auth-v6 {
    align-items: flex-start;
    padding-block: calc(80px + env(safe-area-inset-top, 0px)) 24px;
  }
  body.auth-v6:not(:has(.auth-back-btn)) { padding-block-start: calc(24px + env(safe-area-inset-top, 0px)); }
}
@media (max-width: 480px) {
  .auth-v6 .auth-card { padding: 24px 20px; }
  /* Tight enough that register's button clears a 360x640 screen. */
  .auth-v6 .auth-wrap { gap: 12px; }
}

.auth-v6 .auth-card h1 {
  font-family: var(--store-display);
  font-weight: 500;
  font-size: 1.9rem;
  line-height: 1.1;
  letter-spacing: -.01em;
  color: var(--store-ink);
  margin-bottom: 20px;
  text-wrap: balance;
}
@media (max-width: 480px) {
  .auth-v6 .auth-card h1 { font-size: 1.6rem; margin-bottom: 16px; }
}
.auth-v6 .auth-subtitle,
.auth-v6 .auth-card p.auth-lede,
.auth-v6 .code-intro { color: var(--store-muted); font-size: .9rem; line-height: 1.55; }

/* ── Alerts ───────────────────────────────────────────────────── */
.auth-v6 .alert { border-width: 1px; border-radius: 10px; font-size: .85rem; }

/* ── Fields ───────────────────────────────────────────────────── */
.auth-v6 .form-group { gap: 7px; margin-bottom: 16px; }
@media (max-width: 480px) { .auth-v6 .form-group { margin-bottom: 14px; } }
.auth-v6 .form-group label { color: var(--store-ink); font-size: .85rem; font-weight: 600; }
.auth-v6 .auth-input {
  background: var(--store-card);
  border: 1px solid var(--store-line);
  border-radius: 10px;
  min-height: 46px;
  padding: 11px 14px;
  font-family: var(--store-body);
  font-size: 15px;
  color: var(--store-ink);
  transition: border-color .15s, box-shadow .15s;
}
.auth-v6 .auth-input:hover { border-color: var(--store-muted); }
.auth-v6 .auth-input:focus-visible {
  outline: none;
  border-color: var(--store-accent);
  box-shadow: 0 0 0 3px var(--store-accent-soft);
}
.auth-v6 .auth-input.has-toggle { padding-inline-end: 46px; }
.auth-v6 .pw-toggle {
  inset-inline-end: 6px;
  width: 36px; height: 36px; border-radius: 8px;
  justify-content: center; color: var(--store-muted);
}
.auth-v6 .pw-toggle:hover { color: var(--store-ink); background: var(--store-bg2); }
.auth-v6 .pw-toggle:focus-visible { outline: 3px solid var(--store-accent); outline-offset: 0; }
.auth-v6 .pw-toggle svg { width: 18px; height: 18px; }

.auth-v6 .strength-track { height: 4px; background: var(--store-bg2); }
/* Register: the bar stays out of sight until register.php's script first
   sizes it on input (it writes an inline style). visibility, not display,
   so the field below does not jump on the first keystroke. */
.auth-v6 .strength-track:not(:has(.strength-fill[style])) { visibility: hidden; }

.auth-v6 .remember-row { margin-bottom: 20px; }
.auth-v6 .remember-row input[type="checkbox"],
.auth-v6 .check-line input[type="checkbox"] { accent-color: var(--store-accent); width: 16px; height: 16px; }
.auth-v6 .remember-row label,
.auth-v6 .check-line { color: var(--store-ink); font-size: .875rem; }

/* ── Buttons: the store's 10px buttons, accent fill ───────────── */
.auth-v6 .btn-primary,
.auth-v6 .btn-secondary {
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--store-accent);
  background: var(--store-accent);
  color: var(--store-accent-ink);
  font: 600 .95rem/1.2 var(--store-body);
  letter-spacing: 0;
  box-shadow: none;
  transition: transform .15s, background .15s;
}
.auth-v6 .btn-primary:hover,
.auth-v6 .btn-secondary:hover { background: var(--store-accent); transform: translateY(-1px); }
.auth-v6 .btn-primary:active,
.auth-v6 .btn-secondary:active { transform: none; }
.auth-v6 .btn-primary:focus-visible,
.auth-v6 .btn-secondary:focus-visible,
.auth-v6 .auth-back-btn:focus-visible,
.auth-v6 .auth-links a:focus-visible,
.auth-v6 .auth-foot a:focus-visible { outline: 3px solid var(--store-accent); outline-offset: 2px; }
.auth-v6 .btn-ghost { border-radius: 10px; border: 1px solid var(--store-line); color: var(--store-ink); }
.auth-v6 .btn-ghost:hover { background: var(--store-bg2); border-color: var(--store-line); color: var(--store-ink); }

/* ── Links under the card body ────────────────────────────────── */
.auth-v6 .auth-links { gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.auth-v6 .auth-links a,
.auth-v6 .auth-foot a { color: var(--store-accent); font-weight: 600; font-size: .875rem; text-decoration: none; }
.auth-v6 .auth-links a:hover,
.auth-v6 .auth-foot a:hover { color: var(--store-accent); text-decoration: underline; text-underline-offset: 3px; }
.auth-v6 .auth-foot { color: var(--store-muted); font-size: .875rem; margin-top: 18px; }

/* ── Expired reset link ───────────────────────────────────────── */
.auth-v6 .expired-box p { color: var(--store-muted); }

/* ── The code page (login-code.php) ───────────────────────────── */
.auth-v6 .code-input { font-family: var(--store-mono); font-size: 18px; letter-spacing: .2em; }

/* The age line on register.php is a <label> inside .form-group, so the
   field-label weight above would reach it; it reads as body text. */
.auth-v6 .form-group label.check-line { font-weight: 400; }
