/*
 * Zabarvan CyberPunk - Terminal Authentication & Security Gate
 * Aesthetic: Netrunner Security Terminal, Biometric Access, Cyber-Gate
 * Layout: one HUD panel on phones and tablets. On desktop (1024px+) the page splits into
 * brand copy and feature list on the left and the form panel on the right.
 * Scoped to [data-theme="cyberpunk"] .cp-page-auth. All rules unlayered.
 */

/* ---------- 1. Auth Tokens ---------- */
[data-theme="cyberpunk"] .cp-page-auth {
  --au-yellow: #FCEE0A;
  --au-yellow-rgb: 252, 238, 10;
  --au-cyan: #00F0FF;
  --au-cyan-rgb: 0, 240, 255;
  --au-magenta: #FF003C;
  --au-ink: #EDF2F7;
  --au-muted: #9AAECB;
  --au-faint: #7388A8;
  --au-panel: #070B14;
  --au-field: #04070D;
  --au-line: rgba(0, 240, 255, 0.28);
  --au-clip-lg: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  --au-clip-md: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  --au-clip-sm: polygon(0 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 7px 100%, 0 calc(100% - 7px));
  background-color: #030508;
  color: var(--au-ink);
}

/* Readable secondary copy on the dark panels (the base steel scale is too dim for body text) */
[data-theme="cyberpunk"] .cp-page-auth .text-zinc-500 { color: var(--au-muted); }
[data-theme="cyberpunk"] .cp-page-auth .text-zinc-400 { color: #B4C4DA; }
[data-theme="cyberpunk"] .cp-page-auth .text-zinc-600 { color: var(--au-faint); }

/* ---------- 2. Header wordmark: uses the shared .cp-nav-logo (cyberpunk-site.css), same as the homepage ---------- */

/* ---------- 3. Eyebrow, Title & Copy ---------- */
[data-theme="cyberpunk"] .cp-page-auth .cp-auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--au-cyan) !important;
  border-radius: 0 !important;
  background: rgba(0, 240, 255, 0.08) !important;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--au-cyan) !important;
  clip-path: var(--au-clip-sm);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
}

[data-theme="cyberpunk"] .cp-page-auth h1.cp-hero-title {
  font-family: var(--font-orbitron), sans-serif !important;
  font-size: clamp(34px, 9vw, 64px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
}

[data-theme="cyberpunk"] .cp-page-auth .cp-auth-copy {
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- 4. Panel (phones & tablets: one frame around brand + form) ---------- */
[data-theme="cyberpunk"] .cp-page-auth .cp-auth-wrap {
  filter: drop-shadow(0 0 1px rgba(var(--au-cyan-rgb), 0.55)) drop-shadow(0 18px 36px rgba(0, 0, 0, 0.6));
}

[data-theme="cyberpunk"] .cp-page-auth .cp-auth-card {
  position: relative;
  padding: 22px 20px 24px !important;
  background: linear-gradient(165deg, #0C1424 0%, var(--au-panel) 55%, #05080F 100%) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  clip-path: var(--au-clip-lg);
}

[data-theme="cyberpunk"] .cp-page-auth .cp-auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--au-cyan), var(--au-yellow) 60%, transparent);
  box-shadow: 0 0 10px rgba(var(--au-cyan-rgb), 0.6);
  pointer-events: none;
}

/* The form area inside the panel is plain: no second frame, no second padding */
[data-theme="cyberpunk"] .cp-page-auth .cp-auth-body {
  position: relative;
  margin-top: 22px !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  clip-path: none;
}

[data-theme="cyberpunk"] .cp-page-auth form {
  background: none !important;
  border: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  clip-path: none !important;
}

/* ---------- 5. Form Fields ---------- */
[data-theme="cyberpunk"] .cp-page-auth .group > label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #A9BCD6;
}

[data-theme="cyberpunk"] .cp-page-auth .group:focus-within > label {
  color: var(--au-yellow);
}

[data-theme="cyberpunk"] .cp-page-auth input:not([type="checkbox"]):not([type="radio"]) {
  height: 48px;
  padding: 0 14px !important;
  background: var(--au-field) !important;
  border: 1px solid var(--au-line) !important;
  border-radius: 0 !important;
  color: #FFFFFF !important;
  font-family: var(--font-mono) !important;
  font-size: 14px !important;
  clip-path: var(--au-clip-sm);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

[data-theme="cyberpunk"] .cp-page-auth input::placeholder {
  color: #4F6485;
  opacity: 1;
}

[data-theme="cyberpunk"] .cp-page-auth input:not([type="checkbox"]):not([type="radio"]):focus {
  outline: none;
  border-color: var(--au-cyan) !important;
  background: #061220 !important;
  box-shadow: none;
}

[data-theme="cyberpunk"] .cp-page-auth input:disabled {
  opacity: 0.5;
}

[data-theme="cyberpunk"] .cp-page-auth .cp-auth-input-error {
  border-color: var(--au-magenta) !important;
}

[data-theme="cyberpunk"] .cp-page-auth input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--au-yellow);
}

/* ---------- 6. Account Type Selector (Customer / Athlete) ---------- */
[data-theme="cyberpunk"] .cp-page-auth .cp-auth-options {
  gap: 12px;
  margin-top: 20px;
}

[data-theme="cyberpunk"] .cp-page-auth .cp-auth-option {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  color: inherit;
  background: rgba(4, 8, 15, 0.9) !important;
  border: 1px solid rgba(0, 240, 255, 0.22) !important;
  border-radius: 0 !important;
  clip-path: var(--au-clip-md);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

[data-theme="cyberpunk"] .cp-page-auth .cp-auth-option:hover,
[data-theme="cyberpunk"] .cp-page-auth .cp-auth-option:focus-visible {
  outline: none;
  border-color: var(--au-yellow) !important;
  background: rgba(252, 238, 10, 0.06) !important;
}

[data-theme="cyberpunk"] .cp-page-auth .cp-auth-option-icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(0, 240, 255, 0.35) !important;
  border-radius: 0 !important;
  background: rgba(0, 240, 255, 0.06) !important;
  clip-path: var(--au-clip-sm);
}

[data-theme="cyberpunk"] .cp-page-auth .cp-auth-option-text {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

[data-theme="cyberpunk"] .cp-page-auth .cp-auth-option-text > p:first-child {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFFFFF;
}

[data-theme="cyberpunk"] .cp-page-auth .cp-auth-option-text > p:last-child {
  margin-top: 4px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--au-muted);
}

/* Action label: visually hidden on phones (the arrow tile carries it), but still read by screen readers */
[data-theme="cyberpunk"] .cp-page-auth .cp-auth-option-action {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  color: var(--au-yellow);
}

[data-theme="cyberpunk"] .cp-page-auth .cp-auth-option-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  background: var(--au-yellow) !important;
  color: #030508 !important;
  clip-path: var(--au-clip-sm);
  transition: background-color 0.2s ease;
}

[data-theme="cyberpunk"] .cp-page-auth .cp-auth-option:hover .cp-auth-option-arrow,
[data-theme="cyberpunk"] .cp-page-auth .cp-auth-option:focus-visible .cp-auth-option-arrow {
  background: var(--au-cyan) !important;
}

/* Tablet & desktop: the two options sit side by side as tall tiles */
@media (min-width: 640px) {
  [data-theme="cyberpunk"] .cp-page-auth .cp-auth-option {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 24px 18px 22px;
    text-align: center;
  }

  [data-theme="cyberpunk"] .cp-page-auth .cp-auth-option-text {
    text-align: center;
  }

  [data-theme="cyberpunk"] .cp-page-auth .cp-auth-option-action {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
    margin-top: 2px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  [data-theme="cyberpunk"] .cp-page-auth .cp-auth-option-arrow {
    display: none;
  }
}

/* Selected-state glow used by the date/option pickers (matches class token, not "hover:border-brand/30") */
[data-theme="cyberpunk"] .cp-page-auth button[aria-checked="true"],
[data-theme="cyberpunk"] .cp-page-auth button[class~="border-brand"] {
  background: rgba(0, 240, 255, 0.1) !important;
  border-color: var(--au-yellow) !important;
  box-shadow: 0 0 16px rgba(var(--au-yellow-rgb), 0.35) !important;
}

[data-theme="cyberpunk"] .cp-page-auth button[aria-checked="true"] * {
  color: var(--au-yellow) !important;
}

/* ---------- 7. Submit CTA ---------- */
[data-theme="cyberpunk"] .cp-page-auth button[type="submit"],
[data-theme="cyberpunk"] .cp-page-auth .cp-cta {
  width: 100%;
  min-height: 50px;
  padding: 14px 28px;
  background: var(--au-yellow) !important;
  color: #030508 !important;
  font-family: var(--font-orbitron) !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  border: none !important;
  border-radius: 0 !important;
  clip-path: var(--au-clip-md) !important;
  box-shadow: 0 0 20px rgba(var(--au-yellow-rgb), 0.5) !important;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="cyberpunk"] .cp-page-auth button[type="submit"]:hover:not(:disabled),
[data-theme="cyberpunk"] .cp-page-auth .cp-cta:hover:not(:disabled) {
  background: var(--au-cyan) !important;
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.7) !important;
}

/* ---------- 8. Links ---------- */
[data-theme="cyberpunk"] .cp-page-auth a {
  color: var(--au-cyan);
  transition: color 0.2s ease;
}

[data-theme="cyberpunk"] .cp-page-auth a:hover {
  color: var(--au-yellow);
  text-shadow: 0 0 8px rgba(var(--au-yellow-rgb), 0.5);
}

[data-theme="cyberpunk"] .cp-page-auth button.text-zinc-600:hover {
  color: var(--au-yellow);
}

/* ---------- 9. Decor (desktop & tablet only) ---------- */
[data-theme="cyberpunk"] .cp-page-auth .cp-auth-deco {
  display: none;
}

[data-theme="cyberpunk"] .cp-page-auth .cp-auth-highlights {
  display: none;
}

@media (min-width: 768px) {
  [data-theme="cyberpunk"] .cp-page-auth .cp-auth-deco {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.85;
  }
}

/* ---------- 10. Desktop Split Layout (1024px+) ---------- */
@media (min-width: 1024px) {
  /* Brand column on the left, form panel on the right */
  [data-theme="cyberpunk"] .cp-page-auth .cp-auth-wrap {
    max-width: 1100px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    gap: 80px;
    align-items: center;
  }

  [data-theme="cyberpunk"] .cp-page-auth-wide .cp-auth-wrap {
    max-width: 1180px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  }

  /* The card wrapper disappears so its children (brand, body) become grid columns */
  [data-theme="cyberpunk"] .cp-page-auth .cp-auth-card {
    display: contents;
  }

  [data-theme="cyberpunk"] .cp-page-auth .cp-auth-card::before {
    display: none;
  }

  [data-theme="cyberpunk"] .cp-page-auth .cp-auth-body {
    margin-top: 0 !important;
    padding: 34px 34px 30px !important;
    background: linear-gradient(165deg, #0C1424 0%, var(--au-panel) 55%, #05080F 100%) !important;
    clip-path: var(--au-clip-lg);
  }

  [data-theme="cyberpunk"] .cp-page-auth .cp-auth-body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--au-cyan), var(--au-yellow) 60%, transparent);
    box-shadow: 0 0 10px rgba(var(--au-cyan-rgb), 0.6);
    pointer-events: none;
  }

  [data-theme="cyberpunk"] .cp-page-auth .cp-auth-brand {
    padding-right: 8px;
  }

  [data-theme="cyberpunk"] .cp-page-auth .cp-auth-copy {
    font-size: 16px;
    max-width: 36ch;
  }

  /* Feature list: three HUD rows under the copy */
  [data-theme="cyberpunk"] .cp-page-auth .cp-auth-highlights {
    display: grid;
    gap: 18px;
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
  }

  [data-theme="cyberpunk"] .cp-page-auth .cp-auth-highlight {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 240, 255, 0.16);
  }

  [data-theme="cyberpunk"] .cp-page-auth .cp-auth-highlight-icon {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(252, 238, 10, 0.45);
    background: rgba(252, 238, 10, 0.06);
    color: var(--au-yellow);
    clip-path: var(--au-clip-sm);
  }

  [data-theme="cyberpunk"] .cp-page-auth .cp-auth-highlight-icon svg {
    width: 18px;
    height: 18px;
  }

  [data-theme="cyberpunk"] .cp-page-auth .cp-auth-highlight-title {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #FFFFFF;
  }

  [data-theme="cyberpunk"] .cp-page-auth .cp-auth-highlight-text {
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--au-muted);
  }
}

/* ---------- 11. Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  [data-theme="cyberpunk"] .cp-page-auth *,
  [data-theme="cyberpunk"] .cp-page-auth *::before {
    transition-duration: 0.01ms !important;
  }
}
