/*
 * Zabarvan CyberPunk - Site Chrome: Compact Navigation & Command Center Footer
 * Aesthetic: Low-Profile Cyber-Deck Header (Compact & Separated) // Command Console Footer
 * Scoped to [data-theme="cyberpunk"]. All rules unlayered.
 */

/* ---------- 1. Site-Level Tokens ---------- */
[data-theme="cyberpunk"] {
  --cps-hair: rgba(0, 240, 255, 0.15);
  --cps-line: rgba(0, 240, 255, 0.3);
  --cps-line-strong: rgba(0, 240, 255, 0.7);
  --cps-panel: #070B14;
  --cps-void: #030508;
  --cps-glass: rgba(3, 5, 8, 0.92);
  --cps-text: #EDF2F7;
  --cps-body: #A0AEC0;
  --cps-yellow: #FCEE0A;
  --cps-yellow-rgb: 252, 238, 10;
  --cps-cyan: #00F0FF;
  --cps-magenta: #FF003C;
}

/* ---------- 2. Compact Cyber-Deck Header ---------- */
[data-theme="cyberpunk"] .cp-nav {
  background-color: var(--cps-glass) !important;
  backdrop-filter: blur(14px) !important;
  border-bottom: 1px solid rgba(0, 240, 255, 0.22) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.85);
  height: auto !important;
}

/* 72px Navbar Row (still under the 80px page offset used by pages) */
[data-theme="cyberpunk"] .cp-nav-row {
  height: 72px !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
}

/* Glowing Laser Line at Bottom of Header */
[data-theme="cyberpunk"] .cp-nav::after,
[data-theme="cyberpunk"] .cp-chk-nav::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 240, 255, 0.5) 25%,
    var(--cps-yellow) 50%,
    rgba(0, 240, 255, 0.5) 75%,
    transparent 100%
  );
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

/* Logo: Compact, Crisp Orbitron with Right Divider */
[data-theme="cyberpunk"] .cp-nav-logo {
  font-family: var(--font-orbitron), sans-serif !important;
  font-size: 1.6rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.16em !important;
  color: var(--cps-yellow) !important;
  text-shadow: 0 0 12px rgba(252, 238, 10, 0.45);
  padding-right: 24px;
  border-right: 1px solid rgba(0, 240, 255, 0.22);
  display: inline-flex;
  align-items: center;
  height: 34px;
  transition: text-shadow 0.2s ease;
}

[data-theme="cyberpunk"] .cp-nav-logo:hover {
  text-shadow: 0 0 18px rgba(252, 238, 10, 0.7);
}

/* Pages without the site menu (auth, cart, checkout, dashboards): no divider line after the logo.
   The homepage navbar keeps it, because its menu sits beside the logo. */
[data-theme="cyberpunk"] .cp-page-auth .cp-nav-logo,
[data-theme="cyberpunk"] .cp-chk-nav .cp-nav-logo,
[data-theme="cyberpunk"] .cp-topbar .cp-nav-logo,
[data-theme="cyberpunk"] .cp-account-topbar .cp-nav-logo {
  border-right: 0;
  padding-right: 0;
}

/* Dashboard topbars also have a plain divider element after the logo: hide it too */
[data-theme="cyberpunk"] .cp-nav-logo + .h-4 {
  display: none;
}

/* Desktop Navigation Links: Balanced & Clean */
[data-theme="cyberpunk"] .cp-nav-links {
  gap: 20px;
  margin-left: 6px;
}

/* Tailwind space-x-* adds margins on top of gap; zero them so gap alone sets spacing */
[data-theme="cyberpunk"] .cp-nav-links > *,
[data-theme="cyberpunk"] .cp-nav-tools > * {
  margin: 0 !important;
}

[data-theme="cyberpunk"] .cp-nav-links a {
  position: relative;
  font-family: var(--font-orbitron), sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8) !important;
  padding: 2px 0;
  transition: color 0.2s ease;
}

[data-theme="cyberpunk"] .cp-nav-links a:hover,
[data-theme="cyberpunk"] .cp-nav-links a:focus-visible {
  color: var(--cps-yellow) !important;
  text-shadow: 0 0 8px rgba(252, 238, 10, 0.5);
}

[data-theme="cyberpunk"] .cp-nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--cps-cyan);
  box-shadow: 0 0 8px var(--cps-cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s ease;
}

[data-theme="cyberpunk"] .cp-nav-links a:hover::after {
  transform: scaleX(1);
}

/* Nav Action Tools: Clean, Unboxed (Faithful to Default) */
[data-theme="cyberpunk"] .cp-nav-tools {
  gap: 16px;
}

[data-theme="cyberpunk"] .cp-nav-tools svg {
  width: 21px !important;
  height: 21px !important;
}

/* Narrower laptop widths: scale the row down so it fits */
@media (max-width: 1199px) {
  [data-theme="cyberpunk"] .cp-nav-logo {
    font-size: 1.3rem !important;
    height: 28px;
  }
  [data-theme="cyberpunk"] .cp-nav-links {
    gap: 16px;
  }
  [data-theme="cyberpunk"] .cp-nav-links a {
    font-size: 11.5px;
  }
}

@media (max-width: 1023px) {
  [data-theme="cyberpunk"] .cp-nav-logo {
    font-size: 1.2rem !important;
    height: 24px;
  }
  [data-theme="cyberpunk"] .cp-nav-links {
    gap: 14px;
  }
  [data-theme="cyberpunk"] .cp-nav-links a {
    font-size: 11px;
  }
}

[data-theme="cyberpunk"] .cp-nav-tools > button,
[data-theme="cyberpunk"] .cp-nav-tools > a {
  background: transparent !important;
  border: none !important;
  clip-path: none !important;
  width: auto !important;
  height: auto !important;
  padding: 2px;
  color: rgba(255, 255, 255, 0.8) !important;
  transition: color 0.2s ease, filter 0.2s ease;
}

[data-theme="cyberpunk"] .cp-nav-tools > button:hover,
[data-theme="cyberpunk"] .cp-nav-tools > a:hover {
  color: var(--cps-yellow) !important;
  filter: drop-shadow(0 0 8px rgba(252, 238, 10, 0.6));
}

/* Nav breakpoint: the full link row needs ~1280px. From 768px to 1279px the hamburger drawer takes over.
   Scoped to the cyberpunk theme so the default navbar keeps its own breakpoints. */
@media (min-width: 768px) and (max-width: 1279px) {
  [data-theme="cyberpunk"] .cp-nav-links {
    display: none !important;
  }
  [data-theme="cyberpunk"] .cp-nav-burger {
    display: inline-block !important;
  }
  [data-theme="cyberpunk"] .cp-nav-scrim {
    display: block !important;
  }
  [data-theme="cyberpunk"] .cp-nav-drawer {
    display: flex !important;
  }
}

/* Desktop: hide the hamburger once the full link row fits */
@media (min-width: 1280px) {
  [data-theme="cyberpunk"] .cp-nav-burger {
    display: none !important;
  }
}

/* Small phones (320px to 379px): tighten the navbar so the logo and icons all fit on screen */
@media (max-width: 379px) {
  [data-theme="cyberpunk"] .cp-nav-row {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  [data-theme="cyberpunk"] .cp-nav-tools {
    gap: 10px;
  }
  [data-theme="cyberpunk"] .cp-nav-logo {
    font-size: 1rem !important;
    letter-spacing: 0.1em;
  }
}

/* Cart Count Badge */
[data-theme="cyberpunk"] .cp-nav-tools .cp-nav-count,
[data-theme="cyberpunk"] .cp-nav-tools span.bg-brand {
  background: var(--cps-yellow) !important;
  color: #030508 !important;
  font-family: var(--font-mono) !important;
  font-weight: 900 !important;
  font-size: 10px !important;
  border-radius: 999px !important;
  box-shadow: 0 0 8px rgba(252, 238, 10, 0.6) !important;
}

/* ---------- 3. Panels & Search Terminal Modal ---------- */
[data-theme="cyberpunk"] .cp-com-panel,
[data-theme="cyberpunk"] .cp-card,
[data-theme="cyberpunk"] .cp-shop-side {
  background-color: var(--cps-panel) !important;
  border: 1px solid var(--cps-line) !important;
  border-radius: 0px !important;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.9), inset 0 0 20px rgba(0, 240, 255, 0.03);
}

[data-theme="cyberpunk"] [role="dialog"] > div {
  border-radius: 0px !important;
  background-color: #070B14 !important;
  border: 1px solid var(--cps-cyan) !important;
  box-shadow: 0 0 35px rgba(0, 240, 255, 0.3), inset 0 0 20px rgba(0, 240, 255, 0.05) !important;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

/* ---------- 4. Redesigned Cyberpunk Command Center Footer ---------- */
[data-theme="cyberpunk"] .cp-foot {
  background: radial-gradient(circle at 50% 0%, rgba(0, 240, 255, 0.06) 0%, transparent 60%), #030509 !important;
  border-top: 1px solid rgba(0, 240, 255, 0.35) !important;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.9);
  position: relative;
  padding-top: 80px;
  padding-bottom: 40px;
}

/* Top Laser Beacon */
[data-theme="cyberpunk"] .cp-foot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--cps-cyan) 25%, var(--cps-yellow) 50%, var(--cps-cyan) 75%, transparent 100%);
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.6);
}

/* Stats Telemetry Console */
[data-theme="cyberpunk"] .cp-foot-stats {
  background: rgba(7, 11, 20, 0.75) !important;
  border: 1px solid rgba(0, 240, 255, 0.2) !important;
  border-radius: 0px !important;
  padding: 32px 28px !important;
  margin-bottom: 64px !important;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.9), inset 0 0 20px rgba(0, 240, 255, 0.03);
}

[data-theme="cyberpunk"] .cp-foot-stats > div {
  border-color: rgba(0, 240, 255, 0.15) !important;
}

[data-theme="cyberpunk"] .cp-foot-stats h3 {
  font-family: var(--font-orbitron), sans-serif !important;
  font-weight: 900 !important;
  font-size: clamp(1.5rem, 2vw, 2rem) !important;
  line-height: 1.1;
  white-space: nowrap;
  color: var(--cps-yellow) !important;
  text-shadow: 0 0 16px rgba(252, 238, 10, 0.5);
  letter-spacing: -0.02em;
}

/* Stats grid: mobile packs cells densely (money and competitions span full row); desktop gives money the wider column */
[data-theme="cyberpunk"] .cp-foot-stats {
  grid-auto-flow: dense;
}
@media (min-width: 1024px) {
  [data-theme="cyberpunk"] .cp-foot-stats {
    grid-template-columns: 1fr 1.5fr 1fr 1fr !important;
  }
}

/* Money value: sized to stay on one line in its column; currency code as a smaller cyan unit */
[data-theme="cyberpunk"] .cp-foot-stats .cp-foot-money {
  font-size: clamp(1.25rem, 2vw, 2rem) !important;
}
[data-theme="cyberpunk"] .cp-foot-unit {
  font-size: 0.55em;
  letter-spacing: 0.14em;
  margin-left: 0.35em;
  color: var(--cps-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.45);
}

[data-theme="cyberpunk"] .cp-foot-stats p {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: var(--cps-cyan) !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase;
}

/* Newsletter Headline & Terminal Form */
[data-theme="cyberpunk"] .cp-foot h2 {
  font-family: var(--font-orbitron), sans-serif !important;
  font-size: clamp(1.85rem, 2.8vw, 2.6rem) !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  letter-spacing: 0.04em !important;
  background: linear-gradient(180deg, #FFFFFF 0%, #00F0FF 55%, var(--cps-yellow) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  text-shadow: none !important;
}

[data-theme="cyberpunk"] .cp-foot p.text-zinc-500 {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cps-cyan) !important;
  letter-spacing: 0.12em;
}

[data-theme="cyberpunk"] .cp-foot-news input {
  border-radius: 0px !important;
  background-color: #050812 !important;
  border: 1px solid rgba(0, 240, 255, 0.35) !important;
  color: #FFFFFF !important;
  font-family: var(--font-mono) !important;
  font-size: 13px !important;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
  padding: 12px 16px !important;
}

[data-theme="cyberpunk"] .cp-foot-news input:focus {
  border-color: var(--cps-cyan) !important;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.45) !important;
}

[data-theme="cyberpunk"] .cp-foot-news button {
  border-radius: 0px !important;
  background-color: var(--cps-yellow) !important;
  color: #030508 !important;
  font-family: var(--font-orbitron) !important;
  font-weight: 900 !important;
  font-size: 12px !important;
  letter-spacing: 0.16em !important;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  box-shadow: 0 0 18px rgba(var(--cps-yellow-rgb), 0.5) !important;
  transition: all 0.2s ease;
}

[data-theme="cyberpunk"] .cp-foot-news button:hover:not(:disabled) {
  background-color: var(--cps-cyan) !important;
  box-shadow: 0 0 26px rgba(0, 240, 255, 0.7) !important;
}

/* Footer Link Columns */
[data-theme="cyberpunk"] .cp-foot-cols h4 {
  font-family: var(--font-orbitron), sans-serif !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: 0.2em !important;
  color: var(--cps-cyan) !important;
  border-bottom: 1px solid rgba(0, 240, 255, 0.25);
  padding-bottom: 8px;
  margin-bottom: 20px;
  width: fit-content;
}

[data-theme="cyberpunk"] .cp-foot-cols a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #A0AEC0 !important;
  transition: all 0.2s ease;
  display: inline-block;
}

[data-theme="cyberpunk"] .cp-foot-cols a:hover {
  color: var(--cps-yellow) !important;
  text-shadow: 0 0 8px rgba(252, 238, 10, 0.5);
  transform: translateX(4px);
}

/* Bottom Terminal Bar */
[data-theme="cyberpunk"] .cp-foot-base {
  border-top: 1px solid rgba(0, 240, 255, 0.2) !important;
  padding-top: 32px;
}

/* Footer brand: yellow wordmark matching the header logo, with a chamfered monogram */
[data-theme="cyberpunk"] .cp-foot-mark {
  font-family: var(--font-orbitron), sans-serif !important;
  font-weight: 900 !important;
  font-size: 1.4rem !important;
  line-height: 1 !important;
  letter-spacing: 0.16em !important;
  margin: 0 !important;
  color: var(--cps-yellow) !important;
  text-shadow: 0 0 14px rgba(252, 238, 10, 0.45);
}

[data-theme="cyberpunk"] .cp-foot-monogram {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--cps-yellow);
  color: #030508;
  font-family: var(--font-orbitron), sans-serif;
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  box-shadow: 0 0 18px rgba(252, 238, 10, 0.55);
}

[data-theme="cyberpunk"] .cp-foot-base p {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #718096;
}

/* Social Icon Chamfered Pads */
[data-theme="cyberpunk"] .cp-foot-social a {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #080D1A !important;
  border: 1px solid rgba(0, 240, 255, 0.25) !important;
  border-radius: 0px !important;
  color: var(--cps-cyan) !important;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  transition: all 0.2s ease;
}

[data-theme="cyberpunk"] .cp-foot-social a:hover {
  background: var(--cps-yellow) !important;
  border-color: var(--cps-yellow) !important;
  color: #030508 !important;
  box-shadow: 0 0 16px rgba(var(--cps-yellow-rgb), 0.6);
  transform: translateY(-2px);
}

/* ---------- 5. Search Terminal (SearchModal: .cp-search root, .cp-search-panel frame) ---------- */
/* Backdrop: void with a faint cyan glow behind the panel */
[data-theme="cyberpunk"] .cp-search > div:first-child {
  background: radial-gradient(circle at 50% 25%, rgba(0, 240, 255, 0.1) 0%, transparent 55%), rgba(1, 2, 4, 0.9);
  backdrop-filter: blur(6px);
}

/* Panel: chamfered cyan HUD frame with a laser edge along the top */
[data-theme="cyberpunk"] .cp-search-panel {
  background-color: #070B14;
  border: 1px solid rgba(0, 240, 255, 0.55);
  box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.04);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

[data-theme="cyberpunk"] .cp-search-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 0%, var(--cps-cyan) 30%, var(--cps-yellow) 50%, var(--cps-cyan) 70%, transparent 100%);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

/* Search bar row */
[data-theme="cyberpunk"] .cp-search-panel > div:first-child {
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.07), transparent);
  border-bottom: 1px solid rgba(0, 240, 255, 0.22);
}

[data-theme="cyberpunk"] .cp-search-panel > div:first-child:focus-within {
  box-shadow: inset 0 -1px 0 var(--cps-cyan), inset 0 0 18px rgba(0, 240, 255, 0.08);
}

[data-theme="cyberpunk"] .cp-search-panel > div:first-child > svg {
  color: var(--cps-cyan);
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.6));
}

/* Input: no inner frame, the row carries the HUD border instead */
[data-theme="cyberpunk"] .cp-search-panel input[type="text"] {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  clip-path: none;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: #FFFFFF;
  caret-color: var(--cps-cyan);
  transition: none;
}

[data-theme="cyberpunk"] .cp-search-panel input[type="text"]::placeholder {
  color: #5C6E8C;
  letter-spacing: 0.04em;
}

[data-theme="cyberpunk"] .cp-search-panel input[type="text"]:focus {
  border: none;
  box-shadow: none;
  outline: none;
}

/* Close button */
[data-theme="cyberpunk"] .cp-search-panel > div:first-child > button {
  color: rgba(160, 174, 192, 0.85);
  transition: color 0.2s ease, filter 0.2s ease;
}

[data-theme="cyberpunk"] .cp-search-panel > div:first-child > button:hover {
  color: var(--cps-yellow);
  filter: drop-shadow(0 0 8px rgba(252, 238, 10, 0.6));
}

/* Group headings: Orbitron with cyan glow */
[data-theme="cyberpunk"] .cp-search h3 {
  font-family: var(--font-orbitron), sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--cps-cyan);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

[data-theme="cyberpunk"] .cp-search h3 > svg {
  color: var(--cps-cyan);
}

[data-theme="cyberpunk"] .cp-search .divide-y > :not(:last-child) {
  border-color: rgba(0, 240, 255, 0.14);
}

/* Result rows: cyan wash and yellow edge on hover */
[data-theme="cyberpunk"] .cp-search a {
  border-left: 2px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

[data-theme="cyberpunk"] .cp-search a:hover,
[data-theme="cyberpunk"] .cp-search a:focus-visible {
  background: rgba(0, 240, 255, 0.07);
  border-left-color: var(--cps-yellow);
  outline: none;
}

[data-theme="cyberpunk"] .cp-search a p.text-sm {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #FFFFFF;
}

[data-theme="cyberpunk"] .cp-search a:hover p.text-sm {
  color: var(--cps-yellow);
  text-shadow: 0 0 8px rgba(252, 238, 10, 0.45);
}

[data-theme="cyberpunk"] .cp-search a p:not(.text-sm) {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(0, 240, 255, 0.7);
}

[data-theme="cyberpunk"] .cp-search a > span {
  font-family: var(--font-mono);
  color: var(--cps-yellow);
  text-shadow: 0 0 8px rgba(252, 238, 10, 0.35);
}

/* Empty, loading and no-results copy */
[data-theme="cyberpunk"] .cp-search p.cp-search-hint {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: #8EA3C0;
}

[data-theme="cyberpunk"] .cp-search p.cp-search-empty {
  font-family: var(--font-mono);
  color: #A6B8CF;
}

[data-theme="cyberpunk"] .cp-search p.cp-search-esc {
  font-family: var(--font-mono);
  letter-spacing: 0.22em;
  color: var(--cps-cyan);
  opacity: 0.6;
}
