/* auth.css — form-specific styling for 1gambling.online auth flow.
 *
 * Companion to shared/modal/modal.css. Modal contains chrome
 * (overlay/backdrop/card/close/header/title/banner/tabs/body); this
 * file contains everything inside the body of an auth form: inputs,
 * password-eye toggle, Google Identity Services slot, native date
 * input + custom hint overlay.
 *
 * Stab 69 split: extracted verbatim from modal.css's Stab-67 contents
 * (which was itself a verbatim port of 7X3 game.css :945-1350) so each
 * file does one job. Form rules NEVER lived in 7X3's game.css under a
 * separate concern — they were inline because that codebase has one
 * stylesheet per game.
 *
 * Independent versioning: import as ?v=auth-1.0.5.
 *
 * What lives here:
 *   .gam-form, .gam-form-row, .gam-form-label
 *   .gam-form-input (+ ::placeholder, :focus, :disabled, [type="date"] variants)
 *   .gam-form-note (+ b)
 *   .gam-form-msg (+ .ok, .err)
 *   .gam-form-submit (+ :active, :disabled)
 *   .gam-form-links
 *   .gam-form-link (+ :hover)
 *   .gam-pw-wrap (+ .gam-form-input child rule)
 *   .gam-pw-eye (+ :active, svg, eye-off, [aria-pressed="true"] states)
 *   .gam-google-row (+ .shown, > div, > div > div)
 *   .gam-google-divider (+ .shown, ::before, ::after)
 *   .gam-dob-wrap (+ .is-empty variants)
 *   .gam-dob-hint
 */

/* CSS custom properties — defensive declaration so the form renders
 * correctly when auth.css is imported into a game whose own :root
 * doesn't define the luxury palette. Modal.css declares the same vars;
 * duplicating here is harmless (later import wins, values are
 * identical). */
:root {
  --gam-cyan-soft:  #8fcdff;
  --gam-gold:       #c98f1f;
  --gam-gold-lt:    #f0c252;
  --gam-gold-glow:  #ffe39a;
  --gam-cream:      #fff5d8;
}

/* ── Form chassis ──────────────────────────────────────────────────── */
.gam-form { display: flex; flex-direction: column; gap: 8px; }

.gam-form-row { display: flex; flex-direction: column; gap: 4px; }
.gam-form-label {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.10em; text-transform: uppercase;
  color: var(--gam-cyan-soft);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}
.gam-form-input {
  width: 100%; padding: 10px 12px;
  font-size: 14px; font-family: inherit;
  color: var(--gam-cream);
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(95, 183, 255, 0.10) 0%, transparent 70%),
    linear-gradient(180deg, rgba(2, 6, 15, 0.55) 0%, rgba(2, 6, 15, 0.75) 100%);
  border: 1px solid rgba(240, 194, 82, 0.45);
  border-radius: 10px;
  outline: none;
  -webkit-appearance: none; appearance: none;
  box-shadow: inset 0 1px 0 rgba(200, 230, 255, 0.10);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.gam-form-input::placeholder { color: rgba(200, 230, 255, 0.45); }
.gam-form-input:focus {
  border-color: var(--gam-gold-glow);
  box-shadow:
    inset 0 1px 0 rgba(200, 230, 255, 0.16),
    0 0 0 2px rgba(255, 227, 154, 0.18),
    0 0 12px rgba(95, 183, 255, 0.20);
}
.gam-form-input:disabled { opacity: 0.55; }

.gam-form-note {
  font-size: 13px; line-height: 1.45;
  color: rgba(234, 242, 255, 0.78);
  margin: 2px 0 6px;
}
.gam-form-note b { color: var(--gam-gold-glow); }

.gam-form-msg { min-height: 16px; font-size: 12.5px; line-height: 1.4; padding: 0 2px; }
.gam-form-msg.ok  { color: #8ee6b0; }
/* Warm rose-gold instead of bright red — readable as an error
   without screaming. Matches the luxury palette. */
.gam-form-msg.err { color: #ffb89f; }

.gam-form-submit {
  /* Stab 104: bumped from `padding: 11px 0` + 13.5px to
     `padding: 14px 28px` + 15px so wider labels like
     "CONFIRM & PAY" no longer overflow the rounded pill at narrow
     viewports. min-height guarantees a comfortable tap target. */
  margin-top: 4px;
  padding: 14px 28px;
  min-height: 52px;
  font-size: 15px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gam-cream);
  background:
    radial-gradient(ellipse 80% 100% at 50% 100%, rgba(95, 183, 255, 0.55) 0%, transparent 70%),
    radial-gradient(ellipse 100% 50% at 50% 0%, rgba(255, 227, 154, 0.30) 0%, transparent 70%),
    linear-gradient(180deg, #1f4ea8 0%, #0e1f4a 60%, #050d24 100%);
  border: 1px solid rgba(255, 227, 154, 0.85);
  border-radius: 100px;
  cursor: pointer; outline: none;
  font-family: inherit;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.55), 0 0 8px rgba(255, 227, 154, 0.45);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 0 14px rgba(255, 227, 154, 0.35),
    0 0 22px -4px rgba(95, 183, 255, 0.40),
    inset 0 1px 0 rgba(255, 245, 216, 0.40),
    inset 0 -2px 4px rgba(0, 0, 0, 0.55);
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s, box-shadow 0.20s;
}
.gam-form-submit:active { transform: translateY(2px); }
.gam-form-submit:disabled { opacity: 0.5; cursor: default; transform: none; }

.gam-form-links {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(240, 194, 82, 0.20);
}
.gam-form-link {
  background: none; border: none; padding: 4px 0;
  color: var(--gam-gold-lt);
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.04em;
  font-family: inherit;
  cursor: pointer; outline: none;
  text-decoration: underline;
  text-decoration-color: rgba(240, 194, 82, 0.45);
  text-underline-offset: 2px;
  -webkit-tap-highlight-color: transparent;
}
.gam-form-link:hover { color: var(--gam-cream); text-decoration-color: var(--gam-gold-lt); }

/* ── Password input + eye toggle ───────────────────────────────────── */
/* The wrap is position:relative so the eye button can absolute-position
   over the right edge of the input without affecting the form's flex
   layout. The eye is a styled button (not a default browser control). */
.gam-pw-wrap { position: relative; display: block; }
.gam-pw-wrap .gam-form-input { padding-right: 44px; }
.gam-pw-eye {
  position: absolute;
  top: 50%; right: 6px;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(circle at 35% 30%, rgba(95, 183, 255, 0.30) 0%, transparent 60%),
    linear-gradient(180deg, rgba(20, 42, 100, 0.85) 0%, rgba(5, 13, 36, 0.95) 100%);
  border: 1px solid rgba(240, 194, 82, 0.55);
  border-radius: 8px;
  color: var(--gam-gold-glow);
  cursor: pointer; outline: none;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  padding: 0;
}
.gam-pw-eye:active { transform: translateY(-50%) translateY(1px); }
.gam-pw-eye svg { display: block; width: 18px; height: 18px; pointer-events: none; }
.gam-pw-eye .eye-off { display: none; }
.gam-pw-eye[aria-pressed="true"] .eye-on  { display: none; }
.gam-pw-eye[aria-pressed="true"] .eye-off { display: block; }

/* ── Google Identity Services slot ─────────────────────────────────── */
/* Hidden by default — auth module only adds the "shown" class when
   /me reports a real GOOGLE_CLIENT_ID. The button is the official GIS
   widget; we just leave a neutral container that GIS renders into. */
.gam-google-row {
  display: none;
  margin-top: 6px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.gam-google-row.shown {
  display: flex;
  justify-content: center;
  align-items: center;
}
.gam-google-row > div {
  /* GIS injects a wrapper div containing its iframe. Make the
     wrapper a pill that exactly hugs the official Google button
     and put the gold rim + glow on it. Padding is 2px so the rim
     visibly sits OUTSIDE the button without leaving a gap. */
  display: inline-block;
  width: auto !important;
  padding: 2px;
  border-radius: 9999px;
  border: 1.5px solid var(--gam-gold-glow);
  background: rgba(255, 227, 154, 0.08);
  box-shadow:
    0 0 12px rgba(255, 227, 154, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.45);
}
.gam-google-row > div > div {
  /* The next-level GIS wrapper sometimes also wants min-width;
     keep the outer pill snug to the actual button. */
  display: block;
}
.gam-google-divider {
  display: none;
  align-items: center; gap: 10px;
  margin: 12px 0 2px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--gam-cyan-soft);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
}
.gam-google-divider.shown { display: flex; }
.gam-google-divider::before,
.gam-google-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(240, 194, 82, 0.45) 50%, transparent 100%);
}

/* 2026-05-22 KYC-1c follow-up: locked Google-button placeholder.
   Replaces the earlier muted-text <p> with a button-shaped element
   that visually matches the real GIS button — white pill, dark text,
   4-color Google "G". When the DOB field becomes a valid 18+ date,
   ensureGoogleButton() overwrites this with the real GIS widget.

   The OUTER wrap is .gam-google-fake-wrap, a <div>. The existing
   .gam-google-row > div selector (further up this file) matches
   it and gives it the gold-rim pill chrome — identical to the
   wrap GIS gets — so swapping placeholder ↔ real button preserves
   the gold-rim surround visually.

   The button is type="button" so the form is never submitted; the
   onBodyClick handler in auth.js also preventDefaults belt-and-
   suspenders. Click triggers a flash-red animation on the inner
   text via .gam-google-fake-text.flash. */
.gam-google-fake {
  /* Match the official GIS large-pill geometry as closely as we can
     without controlling Google's iframe: same border-radius, similar
     width, Google's grey outline color (#dadce0). Multi-line text is
     allowed (guiding messages are longer than "Sign up with Google")
     so min-height grows naturally; the gold-rim wrap follows. */
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 280px;
  max-width: 100%;
  min-height: 40px;
  padding: 8px 14px;
  background: #ffffff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 9999px;
  font-family: 'Roboto', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
  font-size: 12.5px;
  line-height: 1.30;
  text-align: left;
  cursor: pointer;
  outline: none;
  transition: transform 0.06s;
  -webkit-tap-highlight-color: transparent;
}
.gam-google-fake:active { transform: translateY(1px); }
.gam-google-fake-icon {
  flex: 0 0 18px;
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
}
.gam-google-fake-icon svg { width: 100%; height: 100%; display: block; }
.gam-google-fake-text {
  flex: 1 1 auto;
  /* color is on the parent so the flash animation can override the
     text color via this element's own animation rule below. */
  color: inherit;
}

/* Flash-red animation. Two pulses over ~700ms — long enough to
   register, short enough to not feel obnoxious. After the two pulses
   the text STAYS red (animation-fill-mode: forwards + a static
   color rule on .flash that survives once the animation completes),
   so the red persists as long as the locked button is on screen.
   Once the DOB becomes valid 18+, paintGoogleSlotForSignup runs
   ensureGoogleButton() which replaces the row contents with the
   real GIS pill — the .flash class is gone with the element.
   2026-05-22 fix: no font-weight changes in the keyframes — bold
   shifts character widths and the surrounding pill geometry, which
   the user reported as visible layout jiggling. Color-only now. */
.gam-google-fake-text.flash {
  animation: gamGoogleFakeFlash 0.70s ease-in-out forwards;
  color: #d83025;   /* sticky red post-animation */
}
@keyframes gamGoogleFakeFlash {
  0%   { color: #3c4043; }
  20%  { color: #d83025; }   /* Google red */
  40%  { color: #3c4043; }
  60%  { color: #d83025; }
  80%  { color: #3c4043; }
  100% { color: #d83025; }   /* end on red — fill-mode forwards keeps it */
}

/* ── Native date input + custom hint overlay ───────────────────────── */
/* Native picker opens on tap. While the input is EMPTY, the OS-default
   text (e.g. "dd ---- yyyy" in red on Chromium) is hidden via
   color: transparent, and a custom "YYYY-MM-DD" hint overlay is shown
   instead in luxury colors. */
.gam-form-input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  text-align: left;
}
.gam-form-input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.gam-form-input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.5);
  cursor: pointer;
  opacity: 0.85;
}
/* Hide OS-default empty-state text while there's no value, and show
   our luxury "YYYY-MM-DD" hint instead. Driven by an .is-empty class
   that JS sets on the wrap based on input.value (Chromium does NOT
   match :placeholder-shown on type="date" inputs). */
.gam-dob-wrap {
  position: relative;
  display: block;
}
.gam-dob-wrap .gam-form-input { width: 100%; }
.gam-dob-wrap.is-empty .gam-form-input[type="date"] {
  color: transparent;
}
.gam-dob-wrap.is-empty .gam-form-input[type="date"]::-webkit-datetime-edit {
  color: transparent;
}
.gam-dob-hint {
  position: absolute;
  left: 14px; top: 50%; right: 40px;
  transform: translateY(-50%);
  pointer-events: none;
  display: none;
  color: var(--gam-cyan-soft);
  font-size: 14px;
  letter-spacing: 0.10em;
  font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
  opacity: 0.85;
}
.gam-dob-wrap.is-empty .gam-dob-hint { display: block; }

/* ── Stab 103: signup form additions ──────────────────────────────── */

/* Two-column row used by the signup form's First/Last name pair.
   On phone-width viewports the form is already narrow enough that
   the two inputs read comfortably side-by-side; on very narrow
   (<340px) screens the @media rule collapses to one column. */
.gam-form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.gam-form-row-2 .gam-form-row { gap: 0; }
@media (max-width: 339px) {
  .gam-form-row-2 { grid-template-columns: 1fr; gap: 4px; }
}

/* Checkbox row used by the Terms acceptance + Marketing consent
   checkboxes added in Stab 102. The Terms checkbox's label embeds
   <a> tags pointing at /terms/ and /privacy/ — those links are
   recoloured white + underline so they read against the cobalt
   modal card background (the inherited link color was blue, which
   was invisible against the same-hue background — Stab 103). */
.gam-form-check-row {
  margin-top: 2px;
}
.gam-form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--gam-cream);
  cursor: pointer;
}
.gam-form-check input[type="checkbox"] {
  flex: 0 0 auto;
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--gam-gold-lt);
  cursor: pointer;
}
.gam-form-check-label { flex: 1 1 auto; }
.gam-form-check-label a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.gam-form-check-label a:hover { color: var(--gam-gold-glow); }
