/*
 * Zabarvan CyberPunk Theme - Core Tokens, Typography & Global Geometry
 * Aesthetic: High-Tech Cybernetics // Neon Yellow (#FCEE0A), Electric Cyan (#00F0FF), Crimson (#FF003C)
 * Scoped to html[data-theme="cyberpunk"]. All rules unlayered to override utility cascade.
 */

/* ---------- 1. Tokens & Color System ---------- */
html[data-theme="cyberpunk"] {
  color-scheme: dark;

  --background: #030508;
  --foreground: #EDF2F7;

  /* Typography */
  --font-display: var(--font-orbitron), ui-sans-serif, system-ui, sans-serif;
  --font-mono: var(--font-geist-mono), ui-monospace, monospace;

  /* Cyberpunk Primary Brand: Iconic High-Voltage Yellow & Electric Cyan */
  --cp-yellow: #FCEE0A;
  --cp-yellow-rgb: 252, 238, 10;
  --cp-cyan: #00F0FF;
  --cp-cyan-rgb: 0, 240, 255;
  --cp-magenta: #FF003C;
  --cp-magenta-rgb: 255, 0, 60;
  --cp-green: #00FF66;
  --cp-green-rgb: 0, 255, 102;

  --cp-brand: #FCEE0A;
  --cp-brand-strong: #FFF23D;
  --cp-brand-rgb: 252, 238, 10;
  --cp-heading: #FFFFFF;
  --cp-void: #030508;
  --cp-void-deep: #010204;
  --cp-surface: #070B12;
  --cp-card: #0A0F1A;
  --cp-card-hi: #101726;
  --cp-panel: #0D1322;
  --cp-border: rgba(0, 240, 255, 0.22);
  --cp-border-bright: rgba(0, 240, 255, 0.7);

  --color-white: #FFFFFF;
  --color-black: #030508;

  /* Cyber Steel & Obsidian Tonal Scale */
  --color-zinc-50: #F4F7FB;
  --color-zinc-100: #E6EDF5;
  --color-zinc-200: #D0DBE8;
  --color-zinc-300: #A6B8CF;
  --color-zinc-400: #788EA6;
  --color-zinc-500: #485C7E;
  --color-zinc-600: #293852;
  --color-zinc-700: #1A2438;
  --color-zinc-800: #101726;
  --color-zinc-900: #070B12;
  --color-zinc-950: #030508;

  --color-gray-50: #F4F7FB;
  --color-gray-100: #E6EDF5;
  --color-gray-200: #D0DBE8;
  --color-gray-300: #A6B8CF;
  --color-gray-400: #788EA6;
  --color-gray-500: #485C7E;
  --color-gray-600: #293852;
  --color-gray-700: #1A2438;
  --color-gray-800: #101726;
  --color-gray-900: #070B12;
  --color-gray-950: #030508;

  /* Red/Crimson: Combat/Alert/Discount */
  --color-red-50: #FFF0F3;
  --color-red-100: #FFE2E7;
  --color-red-200: #FFC9D3;
  --color-red-300: #FFA3B3;
  --color-red-400: #FF6685;
  --color-red-500: #FF003C;
  --color-red-600: #D90033;
  --color-red-700: #A80028;
  --color-red-800: #73001C;
  --color-red-900: #470011;
  --color-red-950: #260009;

  /* Amber/Yellow: High-Hazard Cyberpunk 2077 Signature */
  --color-amber-50: #FEFEE6;
  --color-amber-100: #FEFDC0;
  --color-amber-200: #FDFB80;
  --color-amber-300: #FDF940;
  --color-amber-400: #FCF41A;
  --color-amber-500: #FCEE0A;
  --color-amber-600: #D6CA07;
  --color-amber-700: #9E9504;
  --color-amber-800: #6B6502;
  --color-amber-900: #3D3A01;
  --color-amber-950: #201E00;

  --color-yellow-50: #FEFEE6;
  --color-yellow-100: #FEFDC0;
  --color-yellow-200: #FDFB80;
  --color-yellow-300: #FDF940;
  --color-yellow-400: #FCF41A;
  --color-yellow-500: #FCEE0A;
  --color-yellow-600: #D6CA07;
  --color-yellow-700: #9E9504;
  --color-yellow-800: #6B6502;
  --color-yellow-900: #3D3A01;
  --color-yellow-950: #201E00;

  /* Emerald/Green: Matrix Terminal Status */
  --color-emerald-400: #33FF85;
  --color-emerald-500: #00FF66;
  --color-emerald-600: #00D656;
  --color-green-400: #33FF85;
  --color-green-500: #00FF66;
  --color-green-600: #00D656;

  /* Blue: Electric Cyan Hologram */
  --color-blue-400: #33F3FF;
  --color-blue-500: #00F0FF;
  --color-blue-600: #00C8D6;
  --color-blue-700: #009BA6;
}

/* ---------- 2. Typography & Text Effects ---------- */
[data-theme="cyberpunk"] body {
  font-family: var(--font-geist-sans), Arial, sans-serif;
  background-color: var(--cp-void);
  color: var(--foreground);
}

[data-theme="cyberpunk"] :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

[data-theme="cyberpunk"] .font-black,
[data-theme="cyberpunk"] .font-extrabold,
[data-theme="cyberpunk"] .font-bold {
  font-family: var(--font-display);
  font-weight: 800;
}

/* Two-Tone Cyberpunk Hero Title: Crisp Electric Cyan to Cyberpunk Yellow */
[data-theme="cyberpunk"] .cp-hero-title {
  width: fit-content;
  background-image: linear-gradient(180deg, #FFFFFF 0%, #00F0FF 55%, #FCEE0A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 16px rgba(0, 240, 255, 0.35));
}

/* Brand Text: Glowing Cyan / Yellow Contrast */
[data-theme="cyberpunk"] .text-brand {
  color: var(--cp-yellow) !important;
  text-shadow: 0 0 10px rgba(var(--cp-yellow-rgb), 0.45);
}

/* ---------- 3. Cybernetic Geometry & Cut Corners ---------- */
/* Elimination of all soft pill bubbles; Cyberpunk uses chamfered cuts (45° angle) */
[data-theme="cyberpunk"] .rounded,
[data-theme="cyberpunk"] .rounded-sm,
[data-theme="cyberpunk"] .rounded-md,
[data-theme="cyberpunk"] .rounded-lg,
[data-theme="cyberpunk"] .rounded-xl,
[data-theme="cyberpunk"] .rounded-2xl,
[data-theme="cyberpunk"] .rounded-3xl,
[data-theme="cyberpunk"] .rounded-full {
  border-radius: 0px !important;
}

/* Primary Chamfered Cut-Corner Utility */
[data-theme="cyberpunk"] .cp-chamfer {
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}

/* Chamfer for Cards and Panels */
[data-theme="cyberpunk"] .cp-chamfer-card {
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

/* Chamfer for Tabs & Badges */
[data-theme="cyberpunk"] .cp-chamfer-tab {
  clip-path: polygon(0 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
}

/* Input Fields: Tech Terminal Frame */
[data-theme="cyberpunk"] input:not([type="checkbox"]):not([type="radio"]),
[data-theme="cyberpunk"] select,
[data-theme="cyberpunk"] textarea {
  border-radius: 0px !important;
  border: 1px solid rgba(0, 240, 255, 0.25);
  background-color: #050810;
  color: #EDF2F7;
  font-family: var(--font-mono);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

[data-theme="cyberpunk"] input:not([type="checkbox"]):not([type="radio"]):focus,
[data-theme="cyberpunk"] select:focus,
[data-theme="cyberpunk"] textarea:focus {
  outline: none;
  border-color: var(--cp-cyan);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.4), inset 0 0 8px rgba(0, 240, 255, 0.1);
}

/* Checkboxes & Radios: Tech Matrix */
[data-theme="cyberpunk"] input[type="checkbox"] {
  border-radius: 0px !important;
  accent-color: var(--cp-yellow);
}

/* ---------- 4. Primary & Secondary CTA Buttons ---------- */
/* High-Impact Cyber Yellow Chamfered Buttons */
[data-theme="cyberpunk"] a.bg-brand,
[data-theme="cyberpunk"] button.bg-brand,
[data-theme="cyberpunk"] .cp-cta {
  background: var(--cp-yellow) !important;
  color: #030508 !important;
  border-radius: 0px !important;
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
  box-shadow: 0 0 18px rgba(var(--cp-yellow-rgb), 0.42), inset 0 0 10px rgba(255, 255, 255, 0.3) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  border: none !important;
}

[data-theme="cyberpunk"] a.bg-brand:hover:not(:disabled),
[data-theme="cyberpunk"] button.bg-brand:hover:not(:disabled),
[data-theme="cyberpunk"] .cp-cta:hover:not(:disabled) {
  background: #00F0FF !important;
  color: #030508 !important;
  box-shadow: 0 0 26px rgba(0, 240, 255, 0.65), inset 0 0 12px rgba(255, 255, 255, 0.4) !important;
  transform: none;
}

[data-theme="cyberpunk"] a.bg-brand:active,
[data-theme="cyberpunk"] button.bg-brand:active,
[data-theme="cyberpunk"] .cp-cta:active {
  background: var(--cp-magenta) !important;
  color: #FFFFFF !important;
}

/* Secondary Ghost CTA: Cyber Wireframe */
[data-theme="cyberpunk"] .cp-ghost-cta {
  background: rgba(7, 11, 18, 0.8) !important;
  color: var(--cp-cyan) !important;
  border: 1px solid var(--cp-cyan) !important;
  border-radius: 0px !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  box-shadow: inset 0 0 8px rgba(0, 240, 255, 0.12);
  transition: all 0.2s ease;
}

[data-theme="cyberpunk"] .cp-ghost-cta:hover {
  background: rgba(0, 240, 255, 0.15) !important;
  border-color: var(--cp-yellow) !important;
  color: var(--cp-yellow) !important;
  box-shadow: 0 0 16px rgba(var(--cp-yellow-rgb), 0.35);
}

/* ---------- 5. Global HUD Lighting & Borders ---------- */
[data-theme="cyberpunk"] .border-brand {
  border-color: var(--cp-yellow) !important;
  box-shadow: 0 0 14px rgba(var(--cp-yellow-rgb), 0.25);
}

/* Selection Highlight */
[data-theme="cyberpunk"] ::selection {
  background: var(--cp-yellow);
  color: #030508;
}

/* Custom Cyberpunk Scrollbar */
[data-theme="cyberpunk"]::-webkit-scrollbar,
html[data-theme="cyberpunk"] body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  background-color: #030508;
}

[data-theme="cyberpunk"]::-webkit-scrollbar-track,
html[data-theme="cyberpunk"] body::-webkit-scrollbar-track {
  background: #070B12;
  border-left: 1px solid rgba(0, 240, 255, 0.1);
}

[data-theme="cyberpunk"]::-webkit-scrollbar-thumb,
html[data-theme="cyberpunk"] body::-webkit-scrollbar-thumb {
  background: #00F0FF;
  border-radius: 0px;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

[data-theme="cyberpunk"]::-webkit-scrollbar-thumb:hover,
html[data-theme="cyberpunk"] body::-webkit-scrollbar-thumb:hover {
  background: var(--cp-yellow);
  box-shadow: 0 0 14px rgba(var(--cp-yellow-rgb), 0.7);
}

/* ---------- 6. Cyber Hologram & Matrix Grid Background ---------- */
[data-theme="cyberpunk"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 30%, black 40%, transparent 95%);
}

/* Photography Grade: High contrast, cool steel, sharp saturation */
[data-theme="cyberpunk"] img {
  filter: contrast(1.05) saturate(1.02);
}
