/* Scoreboard strip — a continuous timeline of box scores (latest at the right) with a
   sticky current-day label, date picker, season scrubber and per-game hover chart. */
.sbwrap { margin: 4px 0 12px; --sbw: 156px; }             /* every card and day divider is this wide */
.sbmain { display: flex; align-items: stretch; gap: 6px; }
.sbside {
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; flex: 0 0 auto;
  padding: 0 2px 0 8px; border-left: 1px solid var(--line);
}
.sbnow { white-space: nowrap; line-height: 1.2; min-width: 96px; text-align: center; }
.sbnow b { display: block; font-size: 13px; color: var(--head-text); }
.sbnow span { display: block; font-size: 11px; color: var(--muted); }
.sbtrack {
  position: relative; display: flex; align-items: stretch; gap: 8px; overflow-x: auto; flex: 1 1 auto; min-width: 0;
  padding: 2px 10px; touch-action: pan-x; cursor: grab; scroll-behavior: auto; overscroll-behavior-x: contain;
  /* scrolls natively, like the headline strip, and rests wherever it stops. No native
     scrollbar: it jumps whenever earlier days are added on the left, and the season
     scrubber below is the position indicator. */
  scrollbar-width: none;
}
.sbtrack::-webkit-scrollbar { display: none; }
.sbtrack.dragging { cursor: grabbing; user-select: none; }
.sbtrack.dragging .sbgame { pointer-events: none; }
/* a day group: its divider, then its games */
.sbday { display: flex; align-items: stretch; gap: 8px; flex: 0 0 auto; }
.sbdiv {
  display: flex; flex-direction: column; justify-content: center; white-space: nowrap; box-sizing: border-box;
  width: var(--sbw); padding: 0 4px 0 10px; border-left: 2px solid var(--line); font-size: 11px; color: var(--muted); line-height: 1.25;
}
.sbdiv b { font-size: 13px; color: var(--head-text); }
.sbdiv em { font-style: normal; color: #c0651a; font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: .02em; }
.sbnav {
  flex: 0 0 auto; min-width: 26px; padding: 0 5px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--soft); color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
}
.sbnav small { display: none; }            /* the strip's arrows are ‹ › alone; their titles say "Earlier / Later games" */
.sbnav:hover:not([disabled]) { background: var(--soft); border-color: #b9cdec; color: var(--link); }
.sbnav[disabled] { opacity: .35; cursor: default; }
/* the jump pill beside the date (latest ⇥ / upcoming ⇥ / ⇤ latest; one shows at a time) */
.sbctl { display: inline-flex; align-items: center; gap: 5px; }
.sbnav.sblive, .sbnav.sbupnext {
  min-width: 0; padding: 1px 9px; border-radius: 999px; font-size: 11px; line-height: 18px; font-weight: 700;
  white-space: nowrap; text-transform: uppercase; letter-spacing: .03em;
}
.sbnav[hidden] { display: none; }
/* date entry: a plain text box (type a date or a year, Enter) + a calendar button that
   opens the browser's picker through a hidden date input */
.sbpick { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.sbdatetext {
  width: 84px; border: 1px solid var(--line); border-radius: 7px; padding: 2px 6px; text-align: center;
  font: inherit; font-size: 12px; font-weight: 700; color: var(--head-text); background: var(--soft);
}
.sbdatetext:focus { outline: 2px solid #b9cdec; outline-offset: 0; }
.sbdatetext.bad { border-color: #c0392b; color: #c0392b; }
.sbcal { border: 1px solid var(--line); border-radius: 7px; background: var(--soft); font-size: 13px; line-height: 1; padding: 3px 5px; cursor: pointer; }
.sbcal:hover { border-color: #b9cdec; }
.sbdatepick { position: absolute; left: 0; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
/* the label shows the date; a click or tap on it types one: the box takes the label's place
   until it is left (scoreboard.js), so the side needs only the label's width */
.sbdatetext { display: none; }
.sbnow { cursor: text; }
.sbnow b { text-decoration: underline dotted; text-underline-offset: 3px; }
.sbside.sbtyping .sbnow { display: none; }
.sbside.sbtyping .sbdatetext { display: inline-block; }

.sbgame {
  position: relative; flex: 0 0 auto; width: var(--sbw); box-sizing: border-box; border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 9px 5px; background: var(--card); text-decoration: none; color: inherit;
  display: flex; align-items: center; justify-content: space-between; gap: 8px; overflow: hidden;
}
.sbgame:hover { border-color: #b9cdec; box-shadow: 0 2px 6px rgba(20,60,120,.12); }
.sbteams { display: flex; flex-direction: column; min-width: 74px; }
.sbrow { display: flex; align-items: center; gap: 6px; line-height: 1.6; white-space: nowrap; }   /* one line: cards never change height */
.sblogo { width: 20px; height: 20px; object-fit: contain; flex: 0 0 20px; }
.sbdot { width: 13px; height: 13px; border-radius: 50%; display: inline-block; flex: 0 0 13px; }
.sbab { min-width: 30px; max-width: 66px; font-size: 13px; color: var(--fg); overflow: hidden; text-overflow: ellipsis; }
.sbsc { margin-left: auto; padding-left: 10px; font-size: 13px; font-variant-numeric: tabular-nums; }
.sbrow.sbwin .sbab, .sbrow.sbwin .sbsc { font-weight: 700; color: var(--fg); }
/* a card's status (OT, a playoff round, in progress): a small tag in the top-right corner,
   outside the layout; a plain final has none */
.sbfin {
  position: absolute; top: 2px; right: 7px; font-size: 8.5px; line-height: 1; font-weight: 700; letter-spacing: .03em;
  color: #c0651a; text-transform: uppercase; white-space: nowrap; pointer-events: none;
}
.sbfin:empty { display: none; }
.sbempty { padding: 10px; color: var(--muted, #888); }

/* season scrubber under the strip */
.sbscrub { display: flex; align-items: flex-start; gap: 8px; margin: 3px 34px 0 4px; font-size: 10px; color: var(--muted); }
.sbscrub-l, .sbscrub-r { white-space: nowrap; line-height: 16px; }
.sbscrub-bar { position: relative; flex: 1; height: 22px; cursor: pointer; touch-action: none; }
.sbscrub-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 6px; height: 3px; border-radius: 2px; background: var(--line); }
.sbscrub-fill { position: absolute; left: 0; top: 6px; height: 3px; border-radius: 2px; background: #b9cdec; width: 0; }
.sbscrub-dot {
  position: absolute; top: 1px; width: 13px; height: 13px; border-radius: 50%; background: var(--link);
  border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); transform: translateX(-50%); pointer-events: none; box-sizing: border-box;
}
.sbscrub-ticks { position: absolute; inset: 0; pointer-events: none; }
.sbscrub-ticks i { position: absolute; top: 5px; width: 1px; height: 5px; background: var(--muted); opacity: .5; }
.sbscrub-ticks i::after { content: attr(data-l); position: absolute; top: 6px; left: 0; transform: translateX(-50%); font-style: normal; font-size: 9px; white-space: nowrap; opacity: 1; color: var(--muted); }
.sbscrub-tip {
  position: absolute; top: -22px; transform: translateX(-50%); background: var(--head-text); color: #fff;
  font-size: 10px; padding: 1px 6px; border-radius: 4px; white-space: nowrap; display: none; pointer-events: none;
}

/* hover popover with the chart */
.sbpop {
  position: absolute; z-index: 1000; background: var(--card); border: 1px solid var(--soft-line);
  border-radius: 9px; box-shadow: 0 6px 22px rgba(20,50,100,.22); padding: 8px 10px;
  width: 300px; pointer-events: none;
}
.sbpop .sbcap { font-size: 12px; margin-bottom: 2px; text-align: center; color: var(--fg); }
.sbchart { width: 100%; height: auto; display: block; }
.sbchart .sbtk { font-size: 7px; fill: var(--muted); text-anchor: middle; }
.sbchart .sbax { font-size: 8px; font-weight: 700; }
.sbnochart { font-size: 11px; color: var(--muted, #888); margin: 6px 0 2px; text-align: center; }

@media (max-width: 720px) {
  /* phones: the day label + picker become a row above the strip */
  .sbmain { flex-wrap: wrap; }
  /* one row that never wraps (a wrap would shift the page each time the label changes length):
     the label gives way with "…" */
  .sbside { order: -1; flex-basis: 100%; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; border: 0; padding: 0 2px 2px; }
  .sbnow { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: left; }
  .sbnow b, .sbnow span { display: inline; }
  .sbnow span::before { content: " · "; }
  .sbctl { flex: 0 0 auto; }
  .sbside.sbtyping { justify-content: flex-start; }
  .sbnav.sbprev, .sbnav.sbnext { display: none; }   /* swipe the strip instead */
  .sbwrap { --sbw: 142px; }                          /* two cards and the edge of a third */
  .sbgame { padding: 8px 7px 5px; gap: 6px; }
  .sbab { max-width: 44px; font-size: 12px; }
  .sbdiv b { font-size: 12px; }
  .sbscrub { margin-right: 4px; }
}

/* upcoming games: the same card, greyed and dashed, with the start time (and the
   broadcaster where a sport has it) where a result would be */
.sbgame.sbsched { background: var(--soft); border-style: dashed; }
.sbgame.sbsched .sbab, .sbgame.sbsched .sbsc { color: var(--muted); font-weight: 400; }
.sbtime { text-align: right; font-size: 10px; color: var(--muted); white-space: nowrap; line-height: 1.3; }
.sbtime b { display: block; font-size: 11px; font-weight: 700; color: var(--head-text); letter-spacing: .02em; }
.sbday[data-kind="future"] .sbdiv { border-left-color: #b9cdec; }
.sbday[data-kind="today"] .sbdiv { border-left-color: #c0651a; }
.sbdiv em.sbsoon { color: var(--link); }

/* the scrubber's key dates (opening day, the All-Star break, the postseason) and today */
.sbscrub-ticks i.sbmark { top: 3px; height: 9px; width: 2px; background: var(--link); opacity: .8; }
.sbscrub-ticks i.sbmark::after { color: var(--link); font-weight: 700; }
.sbscrub-ticks i.sbtoday { top: 1px; height: 13px; width: 2px; background: #c0651a; opacity: .95; }
.sbscrub-ticks i.sbtoday::after { color: #c0651a; font-weight: 700; }
/* season stepping, at the ends of the scrubber */
.sbsz {
  border: 1px solid var(--line); border-radius: 6px; background: var(--soft); color: var(--muted);
  font-size: 12px; line-height: 16px; padding: 0 5px; cursor: pointer; flex: 0 0 auto;
}
.sbsz:hover { border-color: #b9cdec; color: var(--link); }
