/* ===================================================================
   V-Sport theme — override layer for 1King template.
   Loaded AFTER style.css so its rules win.
   Design system source: docs/V-SPORT-DESIGN-SYSTEM.md
   =================================================================== */

:root {
  /* ---------- Brand core ---------- */
  --brand-primary:         #1D5EDB;
  --brand-primary-hover:   #3C79EE;
  --brand-primary-active:  #1449AD;
  --brand-secondary:       #0F1D3C;
  --brand-accent:          #FFB020;
  --brand-accent-hover:    #FFC24F;

  /* ---------- Backgrounds / surfaces ---------- */
  --bg-base:               #0A1428;
  --bg-secondary:          #0F1D3C;
  --bg-tertiary:           #1D3560;
  --bg-surface:            #152949;
  --bg-header:             #08111F;
  --bg-header-hover:       #152949;
  --bg-hover:              #152949;
  --bg-banner:             rgba(8, 17, 31, 0.5);
  --bg-modal:              rgba(4, 10, 20, 0.72);
  --bg-main:               var(--bg-base);

  --surface-1:             #152949;
  --surface-2:             #1D3560;
  --surface-hover:         #20406E;
  --surface-active:        #2A5089;

  /* ---------- Controls (buttons / CTA) ---------- */
  --accent:                var(--brand-primary);
  --control-primary:       var(--brand-primary);
  --control-primary-hover: var(--brand-primary-hover);
  --control-secondary:     var(--surface-1);
  --control-secondary-hover: var(--surface-2);

  /* ---------- Text ---------- */
  --text-white:            #ffffff;
  --text-title:            #F5F9FF;
  --text-body:             #C7D3E6;
  --text-subtitle:         rgba(199, 211, 230, 0.9);
  --text-muted:            #8AA0BF;
  --text-disabled:         #5C7091;
  --text-on-accent:        #ffffff;                /* accent is now blue, white text */
  --text-on-primary:       #ffffff;
  --text-on-amber:         #0A1428;                /* amber accent → dark text */
  --text-link:             #5CA5FF;
  --text-link-hover:       #8EC5FF;

  /* ---------- Icons ---------- */
  --icon-main:             #8AA0BF;
  --icon-on-accent:        #ffffff;

  /* ---------- Borders ---------- */
  --border-default:        #22406C;
  --border-subtle:         rgba(255, 255, 255, 0.06);
  --border-hover:          #2E5A99;
  --border-active:         var(--brand-primary);
  --divider:               rgba(255, 255, 255, 0.08);

  /* ---------- Semantic ---------- */
  --success:               #22C55E;
  --success-bg:            #0F3B21;
  --success-text:          #4BE38A;
  --warning:               #F59E0B;
  --warning-bg:            #3D2A05;
  --warning-text:          #FFC661;
  --error:                 #EF4444;
  --error-bg:              #3E1214;
  --error-text:            #FF7B7B;
  --info:                  #38BDF8;
  --info-bg:               #0A2F44;
  --info-text:             #7CD8FF;

  --live:                  #FF3B3B;

  /* ---------- Gradients ---------- */
  --gradient-brand:        linear-gradient(135deg, #1D5EDB 0%, #3C79EE 100%);
  --gradient-hero:         linear-gradient(180deg, #0F1D3C 0%, #0A1428 100%);
  --gradient-promo:        linear-gradient(135deg, #1D5EDB 0%, #7A3CF0 100%);
  --gradient-jackpot:      linear-gradient(135deg, #FFB020 0%, #FF7A18 100%);

  /* ---------- Shadows / glow ---------- */
  --shadow-card:           0 8px 24px rgba(0, 0, 0, .40);
  --shadow-dropdown:       0 12px 32px rgba(0, 0, 0, .50);
  --shadow-modal:          0 20px 60px rgba(0, 0, 0, .60);
  --glow-primary:          0 0 24px rgba(29, 94, 219, .35);
  --glow-live:             0 0 12px rgba(255, 59, 59, .55);
  --glow-jackpot:          0 0 20px rgba(255, 176, 32, .40);
}

/* -------------------------------------------------------------------
   Overrides for hardcoded hex values that were baked into style.css
   (they don't come from the :root above).
   ------------------------------------------------------------------- */

/* 1King warm tint used in decorative highlights / bg-tertiary variants */
[style*="#37332d"], [style*="#37332D"] { background-color: var(--surface-2) !important; }

/* Global fallback: components with hardcoded gray/beige backgrounds */
.k3, .k3-cats, .k3-wins, .k3-pay, .k3-adv {
  --k3-surface: var(--bg-surface);
  --k3-nav-bg: var(--surface-2);
  --k3-nav-icon: var(--text-body);
  --k3-nav-shadow: var(--shadow-dropdown);
  --k3-hot: var(--error);
  --k3-cool: var(--brand-primary);
}

/* Deposit-button green / success accents originally #00d68f → keep them green,
   but slightly aligned with our success token so it reads within the palette. */
[class*="deposit"], .btn--success, .cta--success {
  background: var(--success) !important;
  color: var(--text-on-primary) !important;
}

/* -------------------------------------------------------------------
   Component fine-tuning
   ------------------------------------------------------------------- */

body { background: var(--bg-base); color: var(--text-body); }

/* Header (uses --bg-header from :root; nothing else needed) */
.header, .head-bar { background: var(--bg-header); }

/* Primary CTA — override the yellow-on-black look with V-Sport blue gradient */
.btn--primary, .cta, .promo-hero__cta, .games-rail__more,
.k3-cats__link .k3-cats__badge, .btn.btn-primary {
  color: var(--text-on-primary);
}
.promo-hero__cta,
.btn--primary {
  background: var(--gradient-brand);
  color: var(--text-on-primary);
  border: none;
  box-shadow: var(--glow-primary);
  transition: filter .15s ease, transform .15s ease;
}
.promo-hero__cta:hover,
.btn--primary:hover { filter: brightness(1.08); }
.promo-hero__cta:active,
.btn--primary:active { filter: brightness(0.94); transform: translateY(1px); }

/* Amber badges (jackpot / live-score / favorite active) */
.badge--jackpot, .k3-pay__badge--hot .k3-pay__mult { color: var(--brand-accent); }
.badge--live, .live-dot { background: var(--live); box-shadow: var(--glow-live); }

/* Category active state — subtle blue overlay + colored icon */
.k3-cats__link:hover,
.k3-cats__link:focus-visible,
.k3-cats__link.is-active {
  background: rgba(29, 94, 219, .12);
}
.k3-cats__link.is-active .k3-cats__label { color: var(--text-link); }

/* Sports odds cells */
.odds, .odds-cell, [class*="odds"] {
  background: var(--surface-1);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  transition: background .12s ease, border-color .12s ease;
}
.odds:hover, .odds-cell:hover { background: var(--surface-hover); border-color: var(--border-hover); }
.odds.is-selected, .odds-cell.is-selected {
  background: var(--brand-primary);
  color: var(--text-on-primary);
  border-color: var(--brand-primary-hover);
  box-shadow: var(--glow-primary);
}

/* Forms */
input, textarea, select {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: 8px;
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:hover, textarea:hover, select:hover { border-color: var(--border-hover); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(29, 94, 219, .28);
}

/* Legal pages typography */
body.legal-page { background: var(--bg-base); }
.lgl { background: var(--bg-base); }
.lgl__aside { background: var(--bg-secondary); }
.lgl__title { color: var(--text-title); }
.lgl__text, .lgl__text--privacy { color: var(--text-body); }
.lgl__text h2, .lgl__text h3 { color: var(--text-title); }
.lgl__text h2 {
  font-size: 22px; line-height: 1.3; margin: 28px 0 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--divider);
}
.lgl__text h3 { font-size: 18px; line-height: 1.3; margin: 20px 0 8px; }
.lgl__text p { margin: 0 0 12px; }
.lgl__text ul { margin: 0 0 16px; padding-left: 20px; }
.lgl__text ul li { list-style: disc; margin-bottom: 6px; color: var(--text-body); }
.lgl__text strong { color: var(--text-title); }
.lgl__text a { color: var(--text-link); }
.lgl__text a:hover { color: var(--text-link-hover); text-decoration: underline; }
.lgl__text table {
  width: 100%; margin: 12px 0 20px;
  border-collapse: collapse;
  background: var(--surface-1);
  border-radius: 12px;
  overflow: hidden;
}
.lgl__text th, .lgl__text td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--divider);
  text-align: left;
}
.lgl__text th {
  background: var(--surface-2);
  color: var(--text-title);
  font-weight: 600;
}

/* V-Sport hero on legal pages */
.vs-hero {
  position: relative;
  padding: 28px 24px;
  background: var(--gradient-hero);
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--border-default);
}
.vs-hero::after {
  content: "";
  position: absolute; inset: auto -80px -140px auto;
  width: 320px; height: 320px;
  background: radial-gradient(circle at center, rgba(29,94,219,.35), transparent 70%);
  pointer-events: none;
}
.vs-hero h1 {
  color: var(--text-title);
  font-size: 28px; line-height: 1.15;
  margin: 0 0 10px;
  font-weight: 700;
}
.vs-hero p { color: var(--text-body); max-width: 720px; margin: 0; }
.vs-hero .vs-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  margin-top: 18px;
  background: var(--gradient-brand);
  color: var(--text-on-primary);
  border-radius: 999px;
  box-shadow: var(--glow-primary);
  font-weight: 600;
  transition: filter .15s ease;
}
.vs-hero .vs-hero__cta:hover { filter: brightness(1.08); }

/* Content cards inside legal-page (for FAQ etc.) */
.vs-card {
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 12px;
}
.vs-card__title {
  font-size: 16px;
  color: var(--text-title);
  margin: 0 0 6px;
}
.vs-card__body { color: var(--text-body); font-size: 14px; }

/* Tabbar / bottom navigation */
.footer-tabbar, .tabbar { background: var(--bg-header); border-top: 1px solid var(--divider); }
.tabbar__item.is-active, .footer-tabbar__item.is-active { color: var(--text-link); }
.tabbar__item.is-active svg, .footer-tabbar__item.is-active svg { color: var(--brand-primary); }

/* Focus visibility (a11y) */
:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* Inline figures inside article body (15 legal pages) */
.vs-figure {
  margin: 20px 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border-default);
}
.vs-figure img {
  width: 100%;
  height: auto;
  display: block;
}
.vs-figure figcaption {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border-top: 1px solid var(--divider);
}

/* -------------------------------------------------------------------
   V-Sport specific components (added on top of 1King template).
   ------------------------------------------------------------------- */

/* V-Sport wordmark logo (replaces 1King image logo) */
.vs-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-family: var(--font-display, 'Montserrat', sans-serif);
  text-decoration: none;
}
.vs-logo__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: var(--gradient-brand);
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  font-style: italic;
  letter-spacing: -0.5px;
  box-shadow: var(--glow-primary);
}
.vs-logo__wordmark {
  color: var(--text-title);
  font-weight: 800;
  font-size: 20px;
  font-style: italic;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.vs-logo:hover .vs-logo__wordmark { color: var(--text-link); }

/* Home hero section */
.vs-home-hero { padding: 20px 0 8px; }
.vs-home-hero .vs-hero { padding: 44px 32px; }
.vs-home-hero .vs-hero h1 { font-size: 36px; letter-spacing: -0.5px; }
@media (max-width: 640px) {
  .vs-home-hero .vs-hero { padding: 28px 20px; }
  .vs-home-hero .vs-hero h1 { font-size: 26px; }
}

/* Category cards on home */
.vs-cats { padding: 20px 0 8px; }
.vs-cats__title {
  font-size: 22px;
  margin: 0 0 16px;
  color: var(--text-title);
}
.vs-cats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.vs-cat {
  display: block;
  padding: 20px;
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.vs-cat:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.vs-cat__icon { font-size: 34px; line-height: 1; margin-bottom: 12px; }
.vs-cat__label {
  font-size: 18px;
  color: var(--text-title);
  font-weight: 600;
  margin-bottom: 4px;
}
.vs-cat__meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* V-Sport article wrapper on home + hero on legal pages */
.vs-article { padding: 24px 0 40px; }
.vs-article .lgl__text {
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 32px;
}
@media (max-width: 640px) {
  .vs-article .lgl__text { padding: 20px; border-radius: 12px; }
}

/* Restore visibility of legal aside on wide layout */
.lgl__grid {
  display: grid;
  grid-template-columns: minmax(200px, 320px) 1fr;
  gap: 24px;
  padding: 24px 20px;
}
@media (max-width: 900px) {
  .lgl__grid {
    grid-template-columns: 1fr;
  }
  .lgl__aside {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
  }
  .lgl__aside .lgl__art { display: none; }
  .lgl__aside .lgl__title { font-size: 22px; margin: 0; }
}
.lgl__aside {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 24px;
  position: sticky;
  top: 80px;
  align-self: start;
}
.lgl__back {
  display: inline-flex;
  width: 36px; height: 36px;
  align-items: center;
  justify-content: center;
  background: var(--surface-1);
  border-radius: 10px;
  color: var(--text-body);
  margin-bottom: 16px;
  transition: background .15s;
}
.lgl__back:hover { background: var(--surface-hover); color: var(--text-title); }
.lgl__title { font-size: 24px; line-height: 1.2; color: var(--text-title); margin: 16px 0 0; }
.lgl__content {
  background: var(--surface-1);
  border: 1px solid var(--border-default);
  border-radius: 16px;
  padding: 32px;
}
@media (max-width: 640px) {
  .lgl__content { padding: 20px; border-radius: 12px; }
}
.lgl__art { border-radius: 12px; margin-bottom: 12px; }

/* Header buttons */
.head-bar__btn {
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background .15s, color .15s, transform .1s;
}
.head-bar__btn--secondary {
  background: var(--surface-1);
  color: var(--text-title);
  border: 1px solid var(--border-default);
}
.head-bar__btn--secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}
.head-bar__btn--primary {
  background: var(--gradient-brand);
  color: var(--text-on-primary);
  box-shadow: var(--glow-primary);
}
.head-bar__btn--primary:hover { filter: brightness(1.08); }
.head-bar__btn--primary:active { transform: translateY(1px); }

/* Header nav item active blue underline */
.head-bar__item--active {
  color: var(--text-link);
}
.head-bar__item--active .head-bar__label { color: var(--text-link); }
.head-bar__item--active svg { color: var(--brand-primary); }

/* Footer restyle */
.f07 {
  background: var(--bg-header);
  color: var(--text-body);
  padding: 40px 0 28px;
  border-top: 1px solid var(--divider);
}
.f07__panel {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 32px;
}
@media (max-width: 900px) {
  .f07__panel { grid-template-columns: 1fr; }
}
.f07__columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 640px) {
  .f07__columns { grid-template-columns: 1fr; gap: 24px; }
}
.f07__column-title {
  color: var(--text-title);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 12px;
}
.f07__column-list li { margin: 6px 0; }
.f07__link {
  color: var(--text-body);
  font-size: 14px;
  text-decoration: none;
  transition: color .15s;
}
.f07__link:hover { color: var(--text-link); }
.f07__cell--brand .f07__cell-title {
  font-size: 22px;
  color: var(--text-title);
  margin: 0 0 8px;
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-style: italic;
  letter-spacing: 0.5px;
}
.f07__cell-text { color: var(--text-body); font-size: 13px; line-height: 1.5; margin: 0 0 10px; }
.f07__cell-text--muted { color: var(--text-muted); font-size: 12px; margin-top: 12px; }
.f07__divider {
  height: 1px;
  background: var(--divider);
  margin: 24px 0;
  grid-column: 1 / -1;
}

/* Mobile tab-bar full styling (in case the template's own is not brought in) */
.tab-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 100;
  display: none;
  justify-content: space-around;
  background: var(--bg-header);
  border-top: 1px solid var(--divider);
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
}
@media (max-width: 900px) {
  .tab-bar { display: flex; }
  body { padding-bottom: 64px; }
}
.tab-bar__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 0;
  color: var(--text-muted);
  font-size: 10px;
  text-decoration: none;
  background: transparent;
  border: none;
}
.tab-bar__item .tab-bar__icon svg { width: 22px; height: 22px; }
.tab-bar__item--active { color: var(--text-link); }
.tab-bar__item--active svg { color: var(--brand-primary); }

/* Container */
.container {
  max-width: var(--container-max, 1200px);
  margin: 0 auto;
  padding: 0 max(16px, calc(var(--page-x, 36px) / 2));
}

/* Body padding compensation for the fixed header */
.page > main { padding-top: 12px; }

/* Header layout */
.head-bar {
  position: sticky; top: 0; z-index: var(--z-header, 100);
  background: var(--bg-header);
  border-bottom: 1px solid var(--divider);
  padding: 8px 0;
}
.head-bar__row {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: var(--container-max, 1200px);
  margin: 0 auto;
  padding: 0 16px;
}
.head-bar__side { display: flex; align-items: center; gap: 8px; }
.head-bar__nav {
  display: flex;
  gap: 6px;
  flex: 1;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.head-bar__nav::-webkit-scrollbar { display: none; }
@media (max-width: 900px) {
  .head-bar__nav { display: none; }
}
.head-bar__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  color: var(--text-body);
  border-radius: 10px;
  font-size: 14px;
  text-decoration: none;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
.head-bar__item:hover { background: var(--bg-header-hover); color: var(--text-title); }
.head-bar__item--active { background: rgba(29, 94, 219, .12); color: var(--text-link); }
.head-bar__glyph { display: inline-flex; align-items: center; width: 20px; height: 20px; }
.head-bar__glyph svg { width: 20px; height: 20px; }
.head-bar__actions { display: flex; gap: 8px; align-items: center; }
.head-bar__back, .head-bar__burger {
  display: inline-flex; width: 36px; height: 36px;
  align-items: center; justify-content: center;
  background: transparent; border: none;
  color: var(--text-body);
  border-radius: 10px;
  cursor: pointer;
}
.head-bar__back:hover, .head-bar__burger:hover { background: var(--bg-header-hover); color: var(--text-title); }
.head-bar__burger { display: none; }
@media (max-width: 900px) {
  .head-bar__burger { display: inline-flex; }
  .head-bar__back { display: none; }
}

/* Menu drawer */
.head-bar__menu {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: min(320px, 88vw);
  background: var(--bg-secondary);
  border-right: 1px solid var(--divider);
  transform: translateX(-100%);
  transition: transform .25s ease;
  z-index: var(--z-drawer, 200);
  overflow-y: auto;
}
.head-bar__menu.is-open { transform: translateX(0); }
.head-bar__menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--divider);
}
.head-bar__menu-title { color: var(--text-title); font-weight: 600; }
.head-bar__menu-close {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  color: var(--text-body);
  border-radius: 8px;
  cursor: pointer;
}
.head-bar__menu-close:hover { background: var(--surface-hover); }
.head-bar__menu-inner { padding: 12px; display: flex; flex-direction: column; gap: 20px; }
.head-bar__group { display: flex; flex-direction: column; gap: 2px; }
.head-bar__group-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0 8px 6px;
}
.head-bar__cell {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: var(--text-body);
  border-radius: 10px;
  text-decoration: none;
  transition: background .12s;
}
.head-bar__cell:hover { background: var(--surface-1); color: var(--text-title); }

