/* =====================================================================
   antepost.css — Antepost (outright / futures) page. Namespaced .gbx-ante-*.
   Reuses the board's design tokens (--c-*, --sp-*, --fs-*) so it is theme-aware
   (dark/light) and reads as one system with the sports board. Loaded by
   views/partials/antepost-v2.php.
   ===================================================================== */

.gbx-ante { padding: 10px 12px 40px; }
.gbx-ante--embedded { padding: 4px 0 40px; }

/* View switching (no page reload): the match board and the antepost view both live in the centre
   column; the shell's .is-antepost class picks which one shows. gbx-antepost.js adds it, gbx-board.js
   removes it (any match nav click). */
.gbx-shell:not(.is-antepost) .gbx-view--ante  { display: none; }
.gbx-shell.is-antepost       .gbx-view--match { display: none; }

/* ---- left-nav "Antepost" section (sits above Odds format) ---- */
.gbx-antnav .gbx-nav__sec-head { display: flex; align-items: center; justify-content: space-between; }
.gbx-antnav .gbx-nav__sec-head i.fa-crown { color: var(--c-primary); }
.gbx-antnav__back {
  font-size: 11px; font-weight: 800; color: var(--c-primary); text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
}
.gbx-antnav__back:hover { text-decoration: underline; }
/* the sidebar sports list uses <a>; keep the shared .gbx-ante-sport look, kill link chrome */
a.gbx-ante-sport { text-decoration: none; color: var(--c-text); }

/* ---- hero banner ---- */
.gbx-ante-hero {
  position: relative;
  margin-bottom: 12px;
  padding: 16px 18px;
  border: 1px solid var(--c-border);
  border-radius: 14px;
  background:
    radial-gradient(120% 140% at 100% 0%, var(--c-primary-glow, rgba(120,140,170,.16)), transparent 55%),
    linear-gradient(180deg, var(--c-surface), var(--c-surface-2));
  overflow: hidden;
}
.gbx-ante-hero::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-primary-hover), transparent);
}
.gbx-ante-hero__title {
  display: flex; align-items: center; gap: 9px;
  font-size: 20px; font-weight: 900; letter-spacing: .01em; color: var(--c-text);
}
.gbx-ante-hero__title i { color: var(--c-primary); }
.gbx-ante-hero__sub {
  font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--c-text-muted); padding: 3px 8px; border: 1px solid var(--c-border-strong);
  border-radius: 999px;
}
.gbx-ante-hero__note { margin: 6px 0 0; font-size: 12.5px; color: var(--c-text-muted); }

/* ---- left sports list ---- */
.gbx-ante-sports { display: flex; flex-direction: column; gap: 3px; padding: 4px 6px 8px; }
.gbx-ante-sport {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 9px 11px;
  border: 1px solid transparent; border-radius: 10px;
  background: transparent; color: var(--c-text); cursor: pointer;
  font-size: 13.5px; font-weight: 600; text-align: left;
  transition: background .15s, border-color .15s;
}
.gbx-ante-sport i { width: 18px; text-align: center; font-size: 15px; color: var(--c-text-muted); }
.gbx-ante-sport__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gbx-ante-sport__cnt {
  min-width: 22px; padding: 1px 7px; border-radius: 999px;
  background: var(--c-surface-2); border: 1px solid var(--c-border);
  font-size: 11px; font-weight: 800; color: var(--c-text-muted);
  font-variant-numeric: tabular-nums; text-align: center;
}
.gbx-ante-sport:hover { background: var(--c-surface-2); }
.gbx-ante-sport.is-active { border-color: var(--c-primary); background: var(--c-surface); }
.gbx-ante-sport.is-active i { color: var(--c-primary); }
.gbx-ante-sport.is-active .gbx-ante-sport__cnt {
  background: var(--c-primary); border-color: var(--c-primary); color: var(--c-primary-ink);
}

/* top carousel chips reuse .gbx-sport; just harmonise the active accent to gold */
.gbx-ante .gbx-sportscar { margin-bottom: 12px; }

/* ---- country / competition grouping ---- */
.gbx-ante-country { margin-bottom: 16px; }
.gbx-ante-country__head {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 4px; margin-bottom: 8px;
  font-size: 14px; font-weight: 900; letter-spacing: .02em; color: var(--c-text);
  border-bottom: 2px solid var(--c-border-strong);
}
.gbx-ante-country__head .gbx-flag { width: 22px; height: 16px; }
.gbx-ante-comp {
  display: flex; align-items: center; gap: 7px;
  margin: 12px 2px 8px; font-size: 12px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase; color: var(--c-text-muted);
}
.gbx-ante-comp i { color: var(--c-primary); font-size: 11px; }

/* ---- market card ---- */
.gbx-ante-market {
  margin-bottom: 10px;
  border: 1px solid var(--c-border);
  border-radius: 12px;
  background: var(--c-surface);
  overflow: hidden;
}
.gbx-ante-market__head {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 12px 14px;
  background: linear-gradient(180deg, var(--c-surface), var(--c-surface-2));
  border: 0; border-bottom: 1px solid transparent; cursor: pointer; text-align: left;
}
.gbx-ante-market.is-open .gbx-ante-market__head { border-bottom-color: var(--c-border); }
.gbx-ante-market__title {
  flex: 1; font-size: 14px; font-weight: 800; color: var(--c-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gbx-ante-market__meta {
  font-size: 11px; color: var(--c-text-muted); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.gbx-ante-market__chev { color: var(--c-text-muted); font-size: 12px; transition: transform .2s; }
.gbx-ante-market:not(.is-open) .gbx-ante-market__chev { transform: rotate(180deg); }
.gbx-ante-market__body {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 7px; padding: 12px 14px;
}
.gbx-ante-market:not(.is-open) .gbx-ante-market__body { display: none; }

/* ---- competitor pick row (overrides .gbx-oc--ev's column layout to a full row) ---- */
.gbx-ante-oc.gbx-oc--ev {
  flex-direction: row; align-items: center; justify-content: space-between;
  height: auto; min-height: 44px; padding: 8px 12px; gap: 12px; text-align: left;
}
.gbx-ante-oc .gbx-oc__lbl {
  flex: 1; font-size: 13px; font-weight: 600; color: var(--c-text);
  white-space: normal; overflow: visible;
}
.gbx-ante-oc .gbx-num { font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.gbx-ante-oc.is-selected .gbx-oc__lbl { color: var(--c-primary-ink); opacity: 1; }
.gbx-ante-oc.is-locked { justify-content: space-between; }
.gbx-ante-oc.is-locked::before { content: none; }        /* row uses its own lock glyph, not the ::before pad */
.gbx-ante-oc__lock { color: var(--c-text-muted); font-size: 12px; }

/* ---- loading state on sport swap ---- */
.gbx-ante-list.is-loading { opacity: .5; pointer-events: none; transition: opacity .15s; }

@media (max-width: 640px) {
  .gbx-ante-market__body { grid-template-columns: 1fr; }
  .gbx-ante-hero__title { font-size: 17px; }
}
