/* /boxscores/ (boxscores/index.php): a played game's box score. */
.bx-page { max-width: 1200px; margin: 0 auto; }
.bx-title { font-size: 18px; font-weight: 700; color: var(--tmb-gray-900); margin: 4px 0 16px; text-align: center; }
.bx-h2 { font-size: 15px; font-weight: 700; color: var(--tmb-gray-900); margin: 0 0 8px; }
.bx-note { font-size: 12px; color: var(--tmb-gray-600); margin: 12px 0; }

/* Header: away | final | home */
.bx-head { display: flex; align-items: center; justify-content: center; gap: 24px; margin: 8px 0 4px; }
.bx-head-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bx-head-home { flex-direction: row-reverse; }
.bx-logo { width: 48px; height: 48px; object-fit: contain; }
.bx-head-name { font-size: 16px; font-weight: 600; color: var(--tmb-gray-700); }
.bx-head-score { font-size: 30px; font-weight: 700; color: var(--tmb-gray-600); }
.bx-won .bx-head-name, .bx-won .bx-head-score { color: var(--tmb-gray-900); }
.bx-head-mid { text-align: center; font-size: 12px; color: var(--tmb-gray-600); }
.bx-final { font-weight: 700; color: var(--tmb-gray-900); font-size: 13px; }
.bx-matchup-link { display: inline-block; margin-top: 2px; }

/* Line score + Four Factors side by side */
/* Every card in one row, each its own height (four in most games:
   Line Score, Four Factors / team stats, Betting, Game Info); two across on
   a tablet, one on a phone (below). */
.bx-summary { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(min-content, 1fr); align-items: start; gap: 12px; margin-bottom: 16px; }
.bx-summary > .bx-card-game { order: -2; }
.bx-summary > .bx-card-bet { order: -1; }
.bx-summary .bx-small th, .bx-summary .bx-small td { padding: 4px 5px; }
.bx-summary .bx-info { gap: 5px 10px; }
@media (max-width: 1099px) {
    .bx-summary { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.bx-card { background: #fff; border: 1px solid var(--tmb-gray-300); border-radius: 6px; padding: 12px; overflow-x: auto; min-width: 0; }
.bx-card .bx-small { width: 100%; }
/* MLB's line score (up to 12+ innings and R / H / E) takes two of the three columns. */
.bx-card-wide { grid-column: span 2; }
/* The Game Info card: a label and its value (and how the line settled) a row. */
.bx-info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0; font-size: 13px; }
.bx-info dt { font-weight: 600; color: var(--tmb-gray-700); }
.bx-info dd { margin: 0; color: var(--tmb-gray-900); }
/* How the line settled: small, italic, in parentheses after it (Zach, 2026-11-11). */
.bx-info-result { font-size: 11px; font-style: italic; color: var(--tmb-gray-600); white-space: nowrap; }

.bx-switches { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 4px 0 12px; }
.bx-game-info span { margin-right: 16px; }

/* Tables */
.bx-table { border-collapse: collapse; font-size: 13px; color: var(--tmb-gray-900); }
.bx-table th, .bx-table td { padding: 4px 8px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--tmb-gray-300); }
.bx-table thead th { font-size: 12px; font-weight: 600; color: var(--tmb-gray-700); background: var(--tmb-gray-100); }
.bx-table thead th[title] { cursor: help; }
.bx-table .bx-rowhead, .bx-table .bx-name { text-align: left; font-weight: 600; }
.bx-table tbody .bx-name { font-weight: 500; }
.bx-table thead .bx-name { font-weight: 700; color: var(--tmb-gray-900); }
.bx-strong { font-weight: 700; }
.bx-table tfoot th, .bx-table tfoot td { font-weight: 700; border-top: 2px solid var(--tmb-gray-400); background: var(--tmb-gray-100); }
/* One colour a row (Zach, 2026-11-10): the table stripes its own rows, and
   every cell of a row, the held name cell and a row's label included, takes
   the row's colour (front.css stripes even rows grey and gives a th a grey of
   its own, so a row read white and grey). The held cell stays opaque because
   every row has a colour. */
.bx-table tbody tr { background-color: #fff; }
.bx-table tbody tr:nth-child(even) { background-color: var(--tmb-gray-100); }
.bx-table tbody th, .bx-box tbody .bx-name { background-color: inherit; }
.bx-table tbody tr:hover td, .bx-table tbody tr:hover th { background: var(--tmb-blue-50); }
.bx-dnp td { text-align: left; color: var(--tmb-gray-600); font-style: italic; }

.bx-team { margin-bottom: 24px; }
/* A player table whole, or as its column groups stacked when its room is
   too narrow for it whole (bxSplitTable(); Zach, 2026-11-11: no sideways scroll). */
.bx-split { container-type: inline-size; }
.bx-parts { display: none; }
.bx-part-group { margin-bottom: 12px; }
/* Equal columns in a group (Zach, 2026-11-11), so the stacked groups line up:
   a fixed name column, the rest share what is left. */
.bx-part { width: 100%; font-size: 12px; table-layout: fixed; }
.bx-table.bx-part th, .bx-table.bx-part td { padding: 4px 3px !important; }
.bx-part .bx-name { width: 120px; overflow: hidden; text-overflow: ellipsis; }
@container (max-width: 420px) {
    .bx-part .bx-name { width: 92px; }
    .bx-table.bx-part th, .bx-table.bx-part td { padding: 4px 2px !important; }
}
.bx-part tbody .bx-name[title] { cursor: default; }
/* When the groups show: lg (basketball) under 940px of room, sm under 560, xs under 420. */
@container (max-width: 939px) {
    .bx-split-lg > .bx-whole { display: none; }
    .bx-split-lg > .bx-parts { display: block; }
}
@container (max-width: 559px) {
    .bx-split-sm > .bx-whole { display: none; }
    .bx-split-sm > .bx-parts { display: block; }
}
@container (max-width: 419px) {
    .bx-split-xs > .bx-whole { display: none; }
    .bx-split-xs > .bx-parts { display: block; }
}

/* Heat (bxHeatSteps()): the matchup tables' tiles (matchup-tables.css), step 1
   the strongest green, 16 the strongest red. */
.bx-heat-1 { --rc: var(--tmb-good-1); }  .bx-heat-2 { --rc: var(--tmb-good-2); }
.bx-heat-3 { --rc: var(--tmb-good-3); }  .bx-heat-4 { --rc: var(--tmb-good-4); }
.bx-heat-5 { --rc: var(--tmb-good-5); }  .bx-heat-6 { --rc: var(--tmb-good-6); }
.bx-heat-7 { --rc: var(--tmb-good-7); }  .bx-heat-8 { --rc: var(--tmb-good-8); }
.bx-heat-9 { --rc: var(--tmb-bad-1); }   .bx-heat-10 { --rc: var(--tmb-bad-2); }
.bx-heat-11 { --rc: var(--tmb-bad-3); }  .bx-heat-12 { --rc: var(--tmb-bad-4); }
.bx-heat-13 { --rc: var(--tmb-bad-5); }  .bx-heat-14 { --rc: var(--tmb-bad-6); }
.bx-heat-15 { --rc: var(--tmb-bad-7); }  .bx-heat-16 { --rc: var(--tmb-bad-8); }
.bx-table td.bx-heat, .bx-table tbody tr:hover td.bx-heat {
    background-color: color-mix(in srgb, var(--rc), var(--tmb-surface) 45%) !important;
    box-shadow: inset 0 0 0 2px var(--tmb-surface);
    border-radius: 6px;
}
.bx-scroll { border: 1px solid var(--tmb-gray-300); border-radius: 6px; background: #fff; }
.bx-box { width: 100%; }
/* The name column holds while the table scrolls sideways. */
.bx-box .bx-name { position: sticky; left: 0; z-index: 1; min-width: 150px; }
.bx-box thead .bx-name, .bx-box tfoot .bx-name { background: var(--tmb-gray-100); }

/* Team Stats (bxTeamStatsView()): wide on a wider screen, tall on a phone. */
.bx-teamstats-view { margin-bottom: 24px; }
/* Basic, Advanced and Four Factors stacked, each its own table that fits the
   width (Zach, 2026-11-11: no sideways scroll). */
.bx-teamstats-group { margin-bottom: 14px; }
.bx-h3 { font-size: 13px; font-weight: 700; color: var(--tmb-gray-700); margin: 0 0 6px; text-transform: uppercase; letter-spacing: .03em; }
.bx-teamstats { width: 100%; }
.bx-teamstats-wide .bx-teamstats th, .bx-teamstats-wide .bx-teamstats td { padding: 4px 5px; }
.bx-teamstats-wide .bx-name { width: 56px; }
.bx-teamstats-tall { display: none; }
/* A stat and the two teams (the phone Team Stats, the football Team Stats
   card): the stat 20% on the left, each team 40%, the team names and figures
   bold and centered (Zach, 2026-11-11). */
.bx-table.bx-vs { table-layout: fixed; width: 100%; }
.bx-vs .bx-name, .bx-vs .bx-rowhead { width: 20%; text-align: left; }
.bx-vs td, .bx-vs thead th:not(.bx-name):not(.bx-rowhead) { width: 40%; text-align: center; font-weight: 700; }
.bx-vs thead th:not(.bx-name):not(.bx-rowhead) { color: var(--tmb-gray-900); }
/* The football card's labels are words ("Time of possession"): the stat 52%, each team 24%, on one line. */
@media (min-width: 480px) { .bx-table.bx-vs-long { min-width: 330px; } }
@media (max-width: 479px) { .bx-vs-long .bx-rowhead { white-space: normal; } }
.bx-vs-long .bx-rowhead { width: 52%; }
.bx-vs-long td, .bx-vs-long thead th:not(.bx-rowhead) { width: 24%; }
.bx-teamstats-tall tbody .bx-name[title] { cursor: help; }
@media (max-width: 991px) {
    .bx-teamstats-wide .bx-teamstats { font-size: 12px; }
    .bx-teamstats-wide .bx-teamstats th, .bx-teamstats-wide .bx-teamstats td { padding: 4px 3px !important; }
}

.bx-inactive { font-size: 13px; color: var(--tmb-gray-700); }
.bx-inactive-team { margin-right: 14px; }

@media (max-width: 767px) {
    .bx-page { padding: 0 12px; }
    .bx-summary { grid-template-columns: 1fr; }
    .bx-card-wide { grid-column: auto; }
    .bx-head { gap: 10px; }
    .bx-logo { width: 32px; height: 32px; }
    .bx-head-name { display: none; }
    .bx-head-score { font-size: 24px; }
    .bx-box .bx-name { min-width: 120px; }
    .bx-teamstats-wide { display: none; }
    .bx-teamstats-tall { display: block; }
}

/* MLB (boxscores/mlb-body.php) */
.bx-table .bx-rhe-first { border-left: 2px solid var(--tmb-gray-400); }
.bx-box .bx-pos { text-align: left; color: var(--tmb-gray-600); }
.bx-box .bx-sub .bx-name { padding-left: 20px; font-weight: 400; color: var(--tmb-gray-700); }
.bx-dec { font-weight: 400; color: var(--tmb-gray-600); font-size: 12px; }
/* NHL (boxscores/nhl-body.php) */
.bx-goalies { margin-top: 10px; }
/* NFL (boxscores/nfl-body.php) */
.bx-nfl-group { margin-bottom: 10px; }
.bx-nfl-group .bx-box { width: auto; min-width: 100%; }
/* Passing (C/ATT) fits a 360px phone with a narrower name column. */
@media (max-width: 400px) { .bx-nfl-group .bx-box .bx-name { min-width: 100px; } }

/* The Tour pill sits at the switches row's right end (scripts/boxscore-tour.js). */
.bx-tour-btn { margin-left: auto; }
