/*
 * Zabarvan CyberPunk - Athlete Terminal & Performance Metrics
 * Aesthetic: Cyber-Athlete HUD Dashboard, Biometrics, Tactical Roster Console
 * Scoped to [data-theme="cyberpunk"] .cp-page-athlete. All rules unlayered.
 */

/* ---------- 1. Athlete Tokens ---------- */
[data-theme="cyberpunk"] .cp-page-athlete {
  --at-yellow: #FCEE0A;
  --at-yellow-rgb: 252, 238, 10;
  --at-cyan: #00F0FF;
  --at-cyan-rgb: 0, 240, 255;
  --at-magenta: #FF003C;
  --at-card: #070B14;
  --at-card-hi: #0E1524;
  --at-well: #060912;
  --at-line: rgba(0, 240, 255, 0.25);
  --at-line-soft: rgba(0, 240, 255, 0.14);
  --at-body: #9AAECB;
  --at-faint: #7388A8;
  --at-clip-sm: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  --at-clip-md: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  background-color: #030508;
  color: #EDF2F7;
}

/* Readable secondary text on the black console (static text only, hover states untouched) */
[data-theme="cyberpunk"] .cp-page-athlete [class*="text-zinc-5"]:not([class*="hover:"]),
[data-theme="cyberpunk"] .cp-page-athlete [class*="text-zinc-6"]:not([class*="hover:"]),
[data-theme="cyberpunk"] .cp-page-athlete [class*="text-zinc-7"]:not([class*="hover:"]) {
  color: var(--at-faint);
}
[data-theme="cyberpunk"] .cp-page-athlete [class*="text-zinc-4"]:not([class*="hover:"]) {
  color: var(--at-body);
}

/* ---------- 2. Console Headings ---------- */
[data-theme="cyberpunk"] .cp-page-athlete h1 {
  font-family: var(--font-orbitron), sans-serif !important;
  font-size: clamp(28px, 4.5vw, 48px);
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #FFFFFF;
  text-shadow: 0 0 16px rgba(0, 240, 255, 0.35);
}

[data-theme="cyberpunk"] .cp-page-athlete h2,
[data-theme="cyberpunk"] .cp-page-athlete h3 {
  font-family: var(--font-orbitron), sans-serif !important;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #FFFFFF;
}

/* ---------- 3. Desktop rail ---------- */
[data-theme="cyberpunk"] .cp-page-athlete .cp-side {
  background: rgba(4, 7, 13, 0.92) !important;
  border-right: 1px solid var(--at-line-soft) !important;
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-side-profile,
[data-theme="cyberpunk"] .cp-page-athlete .cp-side-foot {
  border-color: var(--at-line-soft) !important;
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-side-profile [class*="ring-brand"] {
  --tw-ring-color: rgba(var(--at-yellow-rgb), 0.35);
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-side-profile > div > div:first-child {
  border-radius: 0;
  border: 1px solid var(--at-cyan) !important;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-side-profile > div > div:first-child > div {
  border-radius: 0;
  background: var(--at-yellow);
  color: #030508;
  font-family: var(--font-orbitron), sans-serif;
  font-weight: 900;
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-side-profile h3 {
  font-size: 13px;
  letter-spacing: 0.08em;
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-side-profile .font-mono,
[data-theme="cyberpunk"] .cp-page-athlete .cp-side-foot .font-mono {
  font-family: var(--font-mono), monospace;
  letter-spacing: 0.12em;
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-side-link {
  position: relative;
  border-radius: 0 !important;
  border: 1px solid var(--at-line-soft) !important;
  background: var(--at-well) !important;
  color: var(--at-body) !important;
  font-family: var(--font-orbitron), sans-serif;
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.14em;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  margin-bottom: 8px;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

/* The active highlight comes from the layout's motion element; keep it as a chamfered well */
[data-theme="cyberpunk"] .cp-page-athlete .cp-side-link > div[class*="absolute"] {
  border-radius: 0 !important;
  background: rgba(var(--at-yellow-rgb), 0.08) !important;
  border-color: rgba(var(--at-yellow-rgb), 0.85) !important;
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-side-link:hover {
  border-color: var(--at-cyan) !important;
  color: var(--at-cyan) !important;
  background: rgba(0, 240, 255, 0.05) !important;
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-side-link.cp-is-active {
  border-color: rgba(var(--at-yellow-rgb), 0.85) !important;
  color: #FFFFFF !important;
  box-shadow: inset 3px 0 0 var(--at-yellow);
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-side-link.cp-is-active svg {
  color: var(--at-yellow);
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-side-link.cp-is-locked {
  opacity: 0.5;
  border-style: dashed !important;
  background: transparent !important;
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-side-foot button {
  border-radius: 0;
  font-family: var(--font-orbitron), sans-serif;
  font-size: 11px;
  letter-spacing: 0.14em;
  border: 1px solid var(--at-line-soft);
  background: var(--at-well);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

/* ---------- 4. Mobile tab strip ---------- */
[data-theme="cyberpunk"] .cp-page-athlete .cp-tabs {
  scrollbar-width: none;
  padding: 12px 16px 14px !important;
  gap: 8px !important;
  scroll-padding-inline: 16px;
  scroll-snap-type: x proximity;
  padding-right: 48px !important;
  -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
  mask-image: linear-gradient(90deg, #000 85%, transparent);
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-chip {
  position: relative;
  scroll-snap-align: start;
  height: 40px;
  padding: 0 14px !important;
  border-radius: 0 !important;
  border: 1px solid var(--at-line) !important;
  background: var(--at-well) !important;
  color: var(--at-body) !important;
  font-family: var(--font-orbitron), sans-serif;
  font-size: 10px !important;
  letter-spacing: 0.14em;
  line-height: 1;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-chip.cp-is-active {
  background: var(--at-yellow) !important;
  border-color: var(--at-yellow) !important;
  color: #030508 !important;
  filter: drop-shadow(0 0 8px rgba(var(--at-yellow-rgb), 0.45));
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-chip.cp-is-locked {
  opacity: 0.45;
  border-style: dashed !important;
}

/* ---------- 5. Content header & body ---------- */
[data-theme="cyberpunk"] .cp-page-athlete .cp-content-head {
  background: rgba(3, 5, 8, 0.92) !important;
  border-bottom: 1px solid var(--at-line-soft) !important;
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-content-head h2 {
  font-family: var(--font-orbitron), sans-serif;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-shadow: 0 0 12px rgba(var(--at-cyan-rgb), 0.25);
}

/* On phones and tablets the tab strip is the sticky piece; the title row scrolls away */
@media (max-width: 1023px) {
  [data-theme="cyberpunk"] .cp-page-athlete .cp-content-head {
    position: relative;
    height: 56px;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
}

@media (max-width: 767px) {
  [data-theme="cyberpunk"] .cp-page-athlete .cp-body {
    padding: 20px 16px 40px !important;
  }
}

/* ---------- 6. Notification bell & dropdown (shared component) ---------- */
[data-theme="cyberpunk"] .cp-page-athlete .cp-notify-bell {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--at-line);
  background: var(--at-well);
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  color: var(--at-body);
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-notify-bell:hover,
[data-theme="cyberpunk"] .cp-page-athlete .cp-notify-bell:focus-visible {
  color: var(--at-yellow);
  border-color: var(--at-yellow);
  outline: none;
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-notify-bell > span {
  top: 8px !important;
  right: 8px !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 0 !important;
  background: var(--at-magenta) !important;
  border: 0 !important;
  box-shadow: 0 0 8px rgba(255, 0, 60, 0.7);
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-notify-panel {
  right: -4px;
  width: min(340px, calc(100vw - 32px));
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  filter: drop-shadow(0 0 1px rgba(var(--at-cyan-rgb), 0.6)) drop-shadow(0 18px 36px rgba(0, 0, 0, 0.7));
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-notify-panel > * {
  background: #070B14;
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-notify-panel > div:first-child {
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--at-cyan), var(--at-yellow) 60%, transparent) 1;
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-notify-panel > div:last-child {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-notify-panel h3 {
  font-size: 11px;
  letter-spacing: 0.16em;
}

/* ---------- 7. Telemetry: stat tiles ---------- */
[data-theme="cyberpunk"] .cp-page-athlete .cp-stat-card,
[data-theme="cyberpunk"] .cp-page-athlete .grid > div:has(> .cp-stat) {
  position: relative;
  padding: 20px 20px 18px !important;
  background: linear-gradient(165deg, #0C1424 0%, var(--at-card) 60%, #05080F 100%) !important;
  border: 0 !important;
  border-radius: 0 !important;
  clip-path: var(--at-clip-md);
  filter: drop-shadow(0 0 1px rgba(var(--at-cyan-rgb), 0.5)) drop-shadow(0 12px 24px rgba(0, 0, 0, 0.6));
  isolation: isolate;
}

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

[data-theme="cyberpunk"] .cp-page-athlete .cp-stat-card > p:first-child {
  font-family: var(--font-orbitron), sans-serif;
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--at-body) !important;
  padding-right: 44px;
}

/* Orbitron's zero is a slashed box, so telemetry numbers use the mono face */
[data-theme="cyberpunk"] .cp-page-athlete .cp-stat {
  display: block;
  font-family: var(--font-mono), ui-monospace, monospace !important;
  font-size: 36px !important;
  font-weight: 700 !important;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(var(--at-cyan-rgb), 0.25);
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-stat-card > div[class*="absolute"] {
  top: 16px !important;
  right: 16px !important;
  opacity: 0.12 !important;
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-stat-card > div[class*="absolute"] svg {
  stroke: var(--at-cyan);
}

/* Metric values elsewhere (text-3xl bold) follow the same mono rule */
[data-theme="cyberpunk"] .cp-page-athlete .text-3xl.font-bold,
[data-theme="cyberpunk"] .cp-page-athlete [class*="metric-value"] {
  font-family: var(--font-mono), ui-monospace, monospace !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums;
  color: var(--at-yellow) !important;
  text-shadow: 0 0 14px rgba(var(--at-yellow-rgb), 0.5);
}

/* ---------- 8. Panels, rows and lists ---------- */
[data-theme="cyberpunk"] .cp-page-athlete .cp-stack {
  position: relative;
  background: linear-gradient(165deg, #0C1424 0%, var(--at-card) 60%, #05080F 100%) !important;
  border: 1px solid var(--at-line-soft) !important;
  clip-path: var(--at-clip-md);
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-stack > .cp-row {
  border-color: var(--at-line-soft) !important;
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-row:hover {
  background: rgba(0, 240, 255, 0.04) !important;
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-row > div:first-child > div:first-child {
  border-radius: 0;
  background: var(--at-well) !important;
  border-color: var(--at-line) !important;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
}

/* Form panels */
[data-theme="cyberpunk"] .cp-page-athlete form,
[data-theme="cyberpunk"] .cp-page-athlete .border-zinc-800 {
  background: var(--at-card);
  border: 1px solid var(--at-line) !important;
  border-radius: 0 !important;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

/* ---------- 9. Empty states ---------- */
[data-theme="cyberpunk"] .cp-page-athlete .cp-empty {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 24px !important;
  background: linear-gradient(165deg, #0C1424 0%, var(--at-card) 60%, #05080F 100%);
  border: 1px dashed rgba(0, 240, 255, 0.28);
  clip-path: var(--at-clip-md);
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(var(--at-yellow-rgb), 0.6);
  background: rgba(var(--at-yellow-rgb), 0.06);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  color: var(--at-yellow);
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-empty-title {
  font-family: var(--font-orbitron), sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #FFFFFF;
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-empty-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--at-body);
  max-width: 34ch;
}

[data-theme="cyberpunk"] .cp-page-athlete .cp-empty-cta {
  border-radius: 0 !important;
  font-family: var(--font-orbitron), sans-serif;
  letter-spacing: 0.14em;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

/* ---------- 10. Status badges ---------- */
[data-theme="cyberpunk"] .cp-page-athlete [class*="badge"],
[data-theme="cyberpunk"] .cp-page-athlete .cp-tag {
  border-radius: 0 !important;
  font-family: var(--font-mono), monospace;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
}

/* ---------- 11. Progress bars ---------- */
[data-theme="cyberpunk"] .cp-page-athlete progress,
[data-theme="cyberpunk"] .cp-page-athlete [role="progressbar"],
[data-theme="cyberpunk"] .cp-page-athlete .bg-brand.h-2 {
  border-radius: 0px !important;
  background: var(--at-cyan) !important;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

/* ---------- 12. Action buttons ---------- */
[data-theme="cyberpunk"] .cp-page-athlete button.bg-brand,
[data-theme="cyberpunk"] .cp-page-athlete button[type="submit"] {
  background: var(--at-yellow) !important;
  color: #030508 !important;
  font-family: var(--font-orbitron) !important;
  font-weight: 900 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
  border-radius: 0px !important;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)) !important;
  box-shadow: 0 0 18px rgba(var(--at-yellow-rgb), 0.45) !important;
  border: none !important;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="cyberpunk"] .cp-page-athlete button.bg-brand:hover,
[data-theme="cyberpunk"] .cp-page-athlete button[type="submit"]:hover {
  background: var(--at-cyan) !important;
  box-shadow: 0 0 28px rgba(0, 240, 255, 0.65) !important;
}

[data-theme="cyberpunk"] .cp-page-athlete button:focus-visible,
[data-theme="cyberpunk"] .cp-page-athlete a:focus-visible {
  outline: 2px solid var(--at-cyan);
  outline-offset: 2px;
}

/* ---------- 13. Phone layout ---------- */
@media (max-width: 767px) {
  [data-theme="cyberpunk"] .cp-page-athlete .cp-stat-card,
  [data-theme="cyberpunk"] .cp-page-athlete .grid > div:has(> .cp-stat) {
    padding: 16px 16px 14px !important;
  }

  [data-theme="cyberpunk"] .cp-page-athlete .cp-stat {
    font-size: 30px !important;
  }

  [data-theme="cyberpunk"] .cp-page-athlete .cp-empty {
    padding: 28px 18px !important;
  }

  [data-theme="cyberpunk"] .cp-page-athlete .cp-notify-panel {
    right: -8px;
  }
}

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