/* =========================================================================
   SI Computer Picks — embeddable timeline widget
   Sports Interaction brand kit: navy surface, orange accent, mono numbers.
   Default theme: si-dark. Multi-sport (MLB first), built so World Cup and
   other sports drop into the same timeline via the `sport` switcher.
   ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Saira+Condensed:ital,wght@0,600;0,800;1,900&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --si-sportsbook-orange: #FE4000;
  --si-stadium-navy: #0B2234;
  --si-off-side-teal: #027496;
  --si-yellow-card: #FFBC00;
  --si-paper-white: #FFFFFF;
  --si-off-white: #FBFAF7;
  --si-stadium-100: #F2EFE9;
  --si-stadium-200: #D7DDE2;
  --si-stadium-400: #5C6E7C;
}

/* ----- Theme: si-dark (default) ----- */
[data-theme="si-dark"] {
  --surface: #0B2234;
  --surface-2: #102C42;
  --surface-sunken: #081A28;
  --ink: #FFFFFF;
  --ink-muted: #9DB0BE;
  --ink-faint: #5C6E7C;
  --accent: #FE4000;
  --teal: #2AA7C9;
  --line: rgba(215, 221, 226, 0.16);
  --line-strong: rgba(215, 221, 226, 0.30);
  --win: #2ED47A;
  --loss: #FF5C5C;
}
/* ----- Theme: si-light (future-ready hook) ----- */
[data-theme="si-light"] {
  --surface: #FFFFFF;
  --surface-2: #FBFAF7;
  --surface-sunken: #F2EFE9;
  --ink: #0B2234;
  --ink-muted: #4A5B68;
  --ink-faint: #5C6E7C;
  --accent: #FE4000;
  --teal: #027496;
  --line: rgba(11, 34, 52, 0.12);
  --line-strong: rgba(11, 34, 52, 0.22);
  --win: #138A4E;
  --loss: #C23B3B;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

#si-picks-root {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--ink);
}

.pk-card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 18px 44px -30px rgba(0,0,0,0.6);
}

/* ---------- Header ---------- */
.pk-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(420px 120px at 100% -40%, rgba(254,64,0,0.16), transparent 60%),
    var(--surface-2);
}
.pk-title-wrap { min-width: 0; flex: 1; }
.pk-eyebrow {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.pk-title {
  font-family: 'Saira Condensed', sans-serif; font-weight: 900; font-style: italic;
  font-size: 22px; line-height: 1; letter-spacing: 0.01em; text-transform: uppercase;
  color: var(--ink); margin-top: 3px;
}
.pk-date {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-muted);
  margin-top: 4px;
}
.pk-logo { height: 26px; width: auto; flex-shrink: 0; opacity: 0.96; }

/* ---------- Sport switcher ---------- */
.pk-sports {
  display: flex; gap: 6px; padding: 12px 16px 4px; flex-wrap: wrap;
}
.pk-sport {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; min-height: 38px;
  background: var(--surface-2); color: var(--ink-muted);
  border: 1px solid var(--line-strong); border-radius: 5px;
  font-family: 'Saira Condensed', sans-serif; font-weight: 800; font-style: italic;
  font-size: 13px; letter-spacing: 0.03em; text-transform: uppercase;
  cursor: pointer; transition: all 120ms ease;
}
.pk-sport .pk-sport-ico { font-size: 15px; line-height: 1; }
.pk-sport:hover:not(:disabled) { color: var(--ink); border-color: var(--line-strong); }
.pk-sport.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 4px 14px rgba(254,64,0,0.32); }
.pk-sport:disabled { opacity: 0.45; cursor: not-allowed; }
.pk-sport .pk-soon {
  font-family: 'JetBrains Mono', monospace; font-size: 8px; font-weight: 700;
  letter-spacing: 0.06em; padding: 1px 4px; border-radius: 3px;
  background: rgba(255,188,0,0.18); color: var(--si-yellow-card);
}

/* ---------- Summary strip ---------- */
.pk-summary {
  display: flex; gap: 16px; padding: 8px 16px 14px;
  border-bottom: 1px solid var(--line);
}
.pk-stat { display: flex; flex-direction: column; }
.pk-stat-val { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 16px; color: var(--ink); }
.pk-stat-lbl { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }

/* ---------- Timeline ---------- */
.pk-timeline {
  position: relative;
  padding: 10px 16px 8px;
  max-height: 560px; overflow-y: auto;
}
.pk-timeline::-webkit-scrollbar { width: 8px; }
.pk-timeline::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 4px; }

/* the vertical spine */
.pk-timeline::before {
  content: ""; position: absolute;
  left: 26px; top: 14px; bottom: 14px; width: 2px;
  background: linear-gradient(var(--line-strong), transparent);
}

.pk-item {
  position: relative; display: grid;
  grid-template-columns: 22px 1fr; gap: 12px;
  padding: 8px 0;
}
.pk-node {
  position: relative; z-index: 1;
  width: 22px; display: flex; flex-direction: column; align-items: center;
  padding-top: 4px;
}
.pk-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--ink-faint);
}
.pk-item[data-status="live"] .pk-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px rgba(254,64,0,0.22); animation: pk-pulse 1.6s ease-in-out infinite; }
.pk-item[data-status="final"] .pk-dot { border-color: var(--teal); background: var(--teal); }
@keyframes pk-pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(254,64,0,0.22); } 50% { box-shadow: 0 0 0 7px rgba(254,64,0,0.05); } }
.pk-time {
  font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--ink-faint);
  margin-top: 6px; writing-mode: horizontal-tb; white-space: nowrap;
}

/* ---------- Pick row ---------- */
.pk-row {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 13px;
  transition: border-color 120ms ease, transform 120ms ease;
}
.pk-row:hover { border-color: var(--line-strong); transform: translateY(-1px); }

.pk-row-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.pk-match { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pk-crest {
  width: 22px; height: 16px; object-fit: cover; border-radius: 2px;
  box-shadow: 0 0 0 1px var(--line); flex-shrink: 0;
}
.pk-crest-emoji { width: auto; height: auto; box-shadow: none; font-size: 15px; line-height: 1; }
.pk-teams {
  font-family: 'Saira Condensed', sans-serif; font-weight: 800; font-size: 14px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink);
}
.pk-status-chip {
  flex-shrink: 0; font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 7px; border-radius: 3px;
  background: rgba(92,110,124,0.25); color: var(--ink-muted);
}
.pk-status-chip.live { background: rgba(254,64,0,0.18); color: var(--accent); }
.pk-status-chip.final { background: rgba(42,167,201,0.18); color: var(--teal); }

.pk-row-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pk-bet { min-width: 0; }
.pk-bet-market { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
.pk-bet-sel {
  font-family: 'Saira Condensed', sans-serif; font-weight: 900; font-style: italic;
  font-size: 17px; color: var(--accent); line-height: 1.05; margin-top: 1px;
}
.pk-bet-odds { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--ink-muted); margin-top: 2px; }

.pk-conf { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; min-width: 96px; }
.pk-conf-row { display: flex; align-items: baseline; gap: 5px; }
.pk-conf-val { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 16px; color: var(--ink); }
.pk-conf-lbl { font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); }
.pk-bar { width: 96px; height: 5px; border-radius: 3px; background: var(--surface-sunken); overflow: hidden; }
.pk-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--si-yellow-card), var(--accent)); border-radius: 3px; }
.pk-edge {
  font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700;
  color: var(--win);
}
.pk-result { font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700; letter-spacing: 0.05em; }
.pk-result.won { color: var(--win); }
.pk-result.lost { color: var(--loss); }

/* ---------- Empty / loading / error states ---------- */
.pk-state {
  padding: 40px 20px; text-align: center; color: var(--ink-muted);
  font-size: 13px; line-height: 1.6;
}
.pk-state .pk-state-title {
  font-family: 'Saira Condensed', sans-serif; font-weight: 800; font-style: italic;
  font-size: 18px; text-transform: uppercase; color: var(--ink); margin-bottom: 6px;
}
.pk-spinner {
  width: 26px; height: 26px; margin: 0 auto 14px;
  border: 3px solid var(--line-strong); border-top-color: var(--accent);
  border-radius: 50%; animation: pk-spin 0.8s linear infinite;
}
@keyframes pk-spin { to { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.pk-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 16px; border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.pk-foot-note { font-family: 'JetBrains Mono', monospace; font-size: 9px; color: var(--ink-faint); }
.pk-cta {
  font-family: 'Saira Condensed', sans-serif; font-weight: 900; font-style: italic;
  font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase;
  color: #fff; background: var(--accent); border: 0; border-radius: 4px;
  padding: 9px 16px; min-height: 38px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; transition: filter 120ms ease;
}
.pk-cta:hover { filter: brightness(1.08); }

/* seed / sample badge */
.pk-sample {
  margin: 10px 16px 0; padding: 8px 11px;
  background: rgba(255,188,0,0.10); border: 1px solid rgba(255,188,0,0.32);
  border-radius: 5px; font-size: 11px; color: var(--si-yellow-card); line-height: 1.45;
}

@media (max-width: 380px) {
  .pk-conf { min-width: 76px; }
  .pk-bar { width: 76px; }
  .pk-title { font-size: 19px; }
}
