/* SportsBadger: a game's plays on its own page (sb-plays.js; the "Scores: live plays and scoring ticker" canvas, its
   Plays tab, Nov 28, 2026; the NBA's, Dec 1, 2026). Colors from sb.css; the tags' own are below (the same as the
   Scores page's). */
:root { --gp-def: #A4501F; --gp-big: #2B5FB5; --gp-swing: #7A4E00; --gp-score-bg: #E3F1E8; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --gp-def: #E59A6E; --gp-big: #7FA8E8; --gp-swing: #FFD27A; --gp-score-bg: #1A2E22; }
}
:root[data-theme="dark"] { --gp-def: #E59A6E; --gp-big: #7FA8E8; --gp-swing: #FFD27A; --gp-score-bg: #1A2E22; }

/* the fourth tab on phones, and its pane: the whole width on bigger screens, like the box score */
.pane-plays { grid-column: 1 / -1; }
@media (max-width: 860px) {
  .tabs.has-plays { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tabs.has-plays button { font-size: .88rem; }
  .game-body[data-tab="plays"] .pane-plays { display: block; }
}

/* a game that's on: the score, quarter and clock above its plays */
.gp-now {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 22px; padding: 12px 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
}
.gp-state { display: inline-flex; align-items: center; gap: 7px; font: 700 1rem/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.gp-now.is-live .gp-state { color: var(--live); }
.gp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.gp-teams { font: 600 1.25rem/1.1 var(--font-display); color: var(--ink); }
.gp-teams b { font-weight: 700; font-variant-numeric: tabular-nums; }

.gp-q { font: 600 .8rem/1 var(--font-body); color: var(--muted); letter-spacing: .04em; text-transform: uppercase; padding: 12px 0 6px; margin: 0; }
.gp-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.gp-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
/* a score's row: a green tint that runs a little past the words on both sides. It sits behind the row on a layer of
   its own, so the row keeps the width of every other row and its dividing line ends where theirs do. */
.gp-row.is-score { position: relative; isolation: isolate; }
.gp-row.is-score::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -8px; right: -8px; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, var(--gp-score-bg), transparent 70%);
}
.gp-when { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; line-height: 1.2; color: var(--muted); }
.gp-when b { font: 700 .95rem/1.2 var(--font-display); letter-spacing: .02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.gp-what { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.gp-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 8px; min-width: 0; }
.gp-line .badge.sm { align-self: center; height: 18px; width: 16px; }
.gp-text { min-width: 0; font-size: .95rem; line-height: 1.3; color: var(--ink); }
.gp-row.is-score .gp-text { font-weight: 600; }
.gp-more { font-size: .9rem; line-height: 1.35; color: var(--ink); }
.gp-sub { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: .84rem; line-height: 1.3; color: var(--muted); }
.gp-score b { color: var(--ink); font-weight: 700; }
.gp-wp { color: var(--gp-swing); }
.gp-badger { font-size: .84rem; line-height: 1.35; color: var(--muted); }
.gp-badger b { margin-right: 4px; font: 700 .72rem/1 var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--turf); white-space: nowrap; }
.gp-list .pl-link { text-decoration: underline dotted color-mix(in srgb, currentColor 60%, transparent); text-underline-offset: 3px; color: inherit; }
.gp-list .pl-link:hover { text-decoration-style: solid; }
.gp-lede { margin: -4px 0 10px; }

.gp-tag {
  flex: none; align-self: center; padding: 4px 6px 3px; border-radius: 4px; border: 1px solid var(--muted); color: var(--muted);
  font: 700 .72rem/1 var(--font-display); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.gp-tag.is-td, .gp-tag.is-fg, .gp-tag.is-safety { background: var(--turf); border-color: var(--turf); color: var(--chalk); }
.gp-tag.is-pick, .gp-tag.is-fumble, .gp-tag.is-sack { border-color: var(--gp-def); color: var(--gp-def); }
.gp-tag.is-big { border-color: var(--gp-big); color: var(--gp-big); }
.gp-tag.is-swing { border-color: var(--gp-swing); color: var(--gp-swing); }
/* a flag on the play (Nov 29, 2026): filled yellow, like the flag itself, as on the Scores page */
.gp-tag.is-flag { background: #F5C518; border-color: #F5C518; color: #2A2100; }
/* the NBA's tags (Dec 1, 2026), in the Scores page's colors: a lead change filled, like a score; a block or a steal
   the defense's; a three, a dunk or a run the big play's; a tie or the last two minutes the swing's */
.gp-tag.is-lead { background: var(--turf); border-color: var(--turf); color: var(--chalk); }
.gp-tag.is-block, .gp-tag.is-steal { border-color: var(--gp-def); color: var(--gp-def); }
.gp-tag.is-three, .gp-tag.is-dunk, .gp-tag.is-run { border-color: var(--gp-big); color: var(--gp-big); }
.gp-tag.is-tie, .gp-tag.is-clutch { border-color: var(--gp-swing); color: var(--gp-swing); }
/* the NBA's rows (sb-plays.js sets .gp-nba): the clock alone in the first column, the quarter being the heading above;
   a basket or a free throw in bold with the score after it (no tint: a third of a quarter's plays score), and the
   word that goes with it (an assist, who leads, a run) beside the score */
.gp-nba .gp-row { grid-template-columns: 64px minmax(0, 1fr); }
.gp-row.is-pts .gp-text { font-weight: 600; }
.gp-note { color: var(--muted); }

/* the NFL's drives (Dec 4, 2026): a row a drive (when and where it began, the team, how it ended, its plays, yards and
   time, the score after it, a chevron), its plays under it when opened. A score's row has the green tint a scoring
   play's has; the drive under way, the live color. No field chart. */
.gp-dtools { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: -4px 0 8px; }
.gp-dtools .gp-lede { margin: 0; }
.gp-openall {
  margin-left: auto; padding: 8px 0; border: 0; background: none; color: var(--turf); white-space: nowrap;
  font: 600 .9rem/1 var(--font-body); cursor: pointer;
}
.gp-openall:focus-visible { outline: 3px solid var(--turf); outline-offset: 2px; border-radius: 4px; }
@media (hover: hover) { .gp-openall:hover { text-decoration: underline; text-underline-offset: 3px; } }
.gp-drives { border-top: 1px solid var(--line); }
.gp-drive { border-bottom: 1px solid var(--line); }
.gp-drive > summary {
  display: grid; grid-template-columns: 92px minmax(0, 1fr) auto 14px; gap: 12px; align-items: center; padding: 10px 0;
  list-style: none; cursor: pointer; position: relative; isolation: isolate;
}
.gp-drive > summary::-webkit-details-marker { display: none; }
.gp-drive > summary::marker { content: ""; }
.gp-drive > summary:focus-visible { outline: 3px solid var(--turf); outline-offset: 2px; border-radius: 6px; }
.gp-drive.is-score > summary::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -8px; right: -8px; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, var(--gp-score-bg), transparent 70%);
}
.gp-team { font: 700 .92rem/1 var(--font-display); letter-spacing: .04em; color: var(--ink); }
.gp-dscore { font: 600 1rem/1 var(--font-display); letter-spacing: .02em; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.gp-dscore b { color: var(--ink); font-weight: 700; }
.gp-chev {
  width: 8px; height: 8px; justify-self: center; border: solid var(--muted); border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg); transition: transform .15s ease;
}
.gp-drive[open] > summary .gp-chev { transform: translateY(2px) rotate(-135deg); }
@media (hover: hover) { .gp-drive > summary:hover .gp-chev { border-color: var(--ink); } }
@media (prefers-reduced-motion: reduce) { .gp-chev { transition: none; } }
.gp-tag.is-live { border-color: var(--live); color: var(--live); }
/* a drive's plays: set in under its row, a rule down their left */
.gp-dplays { margin: 0 0 12px 10px; padding-left: 12px; border-top: 0; border-left: 2px solid var(--line); }
.gp-dplays .gp-row { grid-template-columns: 80px minmax(0, 1fr); }
.gp-dplays .gp-row:last-child { border-bottom: 0; }
.gp-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.gp-all {
  display: block; width: 100%; min-height: 44px; margin-top: 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--turf); font: 600 .95rem/1 var(--font-body); cursor: pointer;
}
.gp-all:focus-visible { outline: 3px solid var(--turf); outline-offset: 2px; }
@media (hover: hover) { .gp-all:hover { border-color: var(--ink); } }
.gp-live { margin-bottom: 40px; }

@media (max-width: 480px) {
  .gp-row { grid-template-columns: 78px minmax(0, 1fr); gap: 10px; }
  .gp-nba .gp-row { grid-template-columns: 52px minmax(0, 1fr); }
  .gp-drive > summary { grid-template-columns: 70px minmax(0, 1fr) auto 12px; gap: 10px; }
  .gp-dplays { margin-left: 2px; padding-left: 8px; }
  .gp-dplays .gp-row { grid-template-columns: 74px minmax(0, 1fr); }
}
