/* ============================================================================
   Component styles — buttons, tabs, badges, probability bars, tables, cards.
   Reused by preview specimen cards AND the site UI kit. Requires tokens.
   ============================================================================ */

/* ---- BUTTONS ------------------------------------------------------------- */
.btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              background var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-glow); }

.btn-primary { background: var(--accent); color: var(--fg-on-accent); }
.btn-primary:hover { background: var(--accent-bright); }

.btn-secondary { background: var(--surface-2); color: var(--fg-1); border-color: var(--border-2); }
.btn-secondary:hover { background: var(--surface-3); border-color: var(--border-strong); }

.btn-ghost { background: transparent; color: var(--fg-2); }
.btn-ghost:hover { color: var(--fg-1); background: var(--surface-1); }

.btn.sm { padding: 7px 12px; font-size: 13px; }
.btn.lg { padding: 14px 24px; font-size: 16px; }

/* ---- TABS (segmented underline) ----------------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-1); }
.tab {
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-3); background: none; border: none; cursor: pointer;
  padding: 11px 14px; position: relative;
  transition: color var(--dur) var(--ease-out);
}
.tab:hover { color: var(--fg-2); }
.tab.active { color: var(--fg-1); }
.tab.active::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px;
  background: var(--accent); border-radius: 2px 2px 0 0;
}

/* ---- BADGES -------------------------------------------------------------- */
.badge {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: var(--r-xs);
  display: inline-flex; align-items: center; gap: 5px;
}
.badge-live { background: var(--wrong-soft); color: var(--live); }
.badge-live .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--live);
  animation: wc-pulse 1.4s var(--ease-in-out) infinite;
}
@keyframes wc-pulse { 0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255,66,66,0.5);} 50% { opacity: 0.55; box-shadow: 0 0 0 5px rgba(255,66,66,0);} }
.badge-final { background: var(--surface-2); color: var(--fg-3); }
.badge-group { background: var(--surface-2); color: var(--fg-2); }
.badge-soon { background: var(--accent-soft); color: var(--accent); }

/* tick / cross result glyphs */
.glyph { display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 700; }
.glyph.ok { background: var(--correct-soft); color: var(--correct); }
.glyph.no { background: var(--wrong-soft); color: var(--wrong); }

/* ---- PROBABILITY BAR (3-way stacked) ------------------------------------ */
.probbar { display: flex; height: 26px; border-radius: var(--r-xs); overflow: hidden;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; }
.probbar > span { display: flex; align-items: center; justify-content: center; min-width: 0; transition: width var(--dur-slow) var(--ease-out); }
.probbar .home { background: var(--home); color: #04121b; }
.probbar .draw { background: var(--draw); color: #0c0f12; }
.probbar .away { background: var(--away); color: #220b05; }
/* picked segment gets a lime ring */
.probbar > span.picked { box-shadow: inset 0 0 0 2px var(--accent); position: relative; z-index: 1; }

/* thin variant for dense rows */
.probbar.thin { height: 8px; }
.probbar.thin > span { font-size: 0; }

/* ---- CARD ---------------------------------------------------------------- */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border-1);
  border-radius: var(--r-md);
  padding: var(--sp-5);
}
.card.interactive { transition: border-color var(--dur) var(--ease-out), background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); cursor: pointer; }
.card.interactive:hover { border-color: var(--border-2); background: var(--surface-2); }

/* ---- TEAM + FLAG --------------------------------------------------------- */
.team { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; color: var(--fg-1); }
.team .fi { width: 22px; height: 16px; border-radius: 3px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,0.08); }
.team.sm { font-size: 13px; }
.team.sm .fi { width: 18px; height: 13px; }

/* ---- TABLE --------------------------------------------------------------- */
.lb-table { width: 100%; border-collapse: collapse; }
.lb-table th {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-3);
  text-align: right; padding: 10px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--border-1); position: sticky; top: 0;
}
.lb-table th:first-child, .lb-table td:first-child { text-align: left; }
.lb-table th.num, .lb-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.lb-table td { padding: 13px 14px; border-bottom: 1px solid var(--border-1);
  font-family: var(--font-mono); font-size: 14px; color: var(--fg-2); }
.lb-table tr, .lb-table tbody tr { transition: background var(--dur) var(--ease-out); }
.lb-table tbody tr:hover { background: var(--surface-2); }
.lb-table tbody tr.leader { background: var(--accent-soft); }
.lb-table tbody tr.leader td { color: var(--fg-1); }
