/* Game picker: tabs, filters, collapsible sections, score-bug rows. */
.list-head { position: sticky; top: 0; background: var(--bg); border-bottom: 1px solid var(--border); z-index: 1; }
.tabs { display: flex; border-bottom: 1px solid var(--border); }
.filters { display: flex; gap: 8px; padding: 8px 12px; }
.conf-wrap { position: relative; flex: 1; min-width: 0; }
/* Conference multi-select: a dropdown-style button that opens a checklist. */
#conf { width: 100%; padding: 5px 30px 5px 8px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--panel)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238b93a1' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--border); border-radius: 6px; color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
#conf.active { padding-right: 52px; border-color: var(--accent); }
#conf-clear { position: absolute; top: 50%; right: 28px; transform: translateY(-50%); width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%;
  background: var(--border); color: var(--text); font-size: 11px; line-height: 20px; cursor: pointer; }
#conf-clear:hover { background: var(--control-hover); }
#conf-menu { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 5; max-height: 320px; overflow-y: auto; padding: 4px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px var(--shadow); }
#conf-menu label { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 5px; font-size: 13px; cursor: pointer; }
#conf-menu label:hover { background: var(--border); }
#conf-menu input { accent-color: var(--accent); margin: 0; }
#conf-menu .group { padding: 8px 8px 2px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
#top25 { flex: none; padding: 5px 10px; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
#top25[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tabs button { flex: 1; padding: 10px; background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); }
/* Section headers: a solid bar with a count, so they read as titles rather than rows. */
.group-label { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 12px; background: var(--section); border: 0; border-top: 1px solid var(--section-border); border-bottom: 1px solid var(--section-border);
  font-family: inherit; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text); text-align: left; cursor: pointer; }
.group-label .chev { width: 10px; height: 6px; transition: transform .2s; }
.group-label[aria-expanded="false"] .chev { transform: rotate(-90deg); }
/* Collapsible section body, same 0fr ↔ 1fr trick as the filters. */
.group-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .22s ease; }
.group-body.collapsed { grid-template-rows: 0fr; }
.group-clip { overflow: hidden; min-height: 0; }
.group-label .n { margin-left: auto; margin-right: 2px; padding: 1px 7px; border-radius: 10px; background: var(--chip); color: var(--muted); font-weight: 600; letter-spacing: 0; }
.group-label.selected { color: var(--accent); }
/* Admin-only Select all / Remove all row at the top of a section (worker/admin.js). */
.group-actions { display: flex; justify-content: flex-end; gap: 6px; padding: 6px 12px; border-bottom: 1px solid var(--border); }
.group-actions button { padding: 3px 9px; background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
.group-actions button:hover, .group-actions button:focus-visible { color: var(--text); background: var(--row-hover); }
/* Live section: red-tinted header, pulsing dot, red edge and bright clock on live rows. */
.group-label.live { background: var(--live-section); border-color: var(--live-border); color: var(--live-text); }
.group-label.live .n { background: var(--red); color: #fff; }
.group-label.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); animation: live-pulse 1.6s ease-out infinite; }
@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 90, 90, .7); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(255, 90, 90, 0); }
}
label.game.live { box-shadow: inset 3px 0 0 var(--red); }
label.game.live .bug-status { color: var(--text); font-weight: 600; }
label.game { position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* Alternating row shades; declared before hover/selected so those still win. */
label.game:nth-child(even) { background: var(--row-alt); }
label.game:hover { background: var(--row-hover); }
label.game:has(input:checked) { background: rgba(76, 141, 255, .12); }
label.game:nth-child(even):has(input:checked) { background: rgba(76, 141, 255, .22); }
/* The checkbox stays for keyboards and screen readers; the round + / ✓ button is what you see. */
label.game input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pick { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--muted); border-radius: 50%; color: var(--muted); transition: background .15s, border-color .15s; }
/* Drawn with CSS rather than "+" / "✓" characters, which fonts don't center vertically. */
.pick::before { content: ""; width: 12px; height: 12px;
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
              linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat; }
label.game input:checked ~ .pick { background: var(--accent); border-color: var(--accent); color: #fff; }
label.game input:checked ~ .pick::before { width: 6px; height: 11px; background: none; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
label.game input:focus-visible ~ .pick { outline: 2px solid var(--accent); outline-offset: 2px; }
/* With a mouse, rows show nothing at rest. Hovering a row reveals a quiet + (or a ✕ on picked rows, whose
   Selected header and tint already mark them), which brightens when pointed at. Touch screens keep the larger
   + and solid ✓ circles as tap targets. */
@media (hover: hover) {
  .pick { width: 22px; height: 22px; border-width: 1.5px; opacity: 0; transition: opacity .15s, background .15s, border-color .15s; }
  .pick::before { width: 10px; height: 10px; }
  label.game input:checked ~ .pick { background: none; border-color: var(--muted); color: var(--muted); }
  label.game input:checked ~ .pick::before { width: 10px; height: 10px; border: 0; transform: rotate(45deg);  /* the + turned into a ✕ */
    background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat,
                linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat; }
  label.game:hover .pick { opacity: .5; }
  label.game input ~ .pick:hover, label.game input:focus-visible ~ .pick { opacity: 1; color: var(--text); border-color: var(--text); }
}
.drawer-foot { display: none; }
/* Picker rows look like a TV score bug: two stacked team lines, then the game status. */
.bug { flex: 1; min-width: 0; display: grid; gap: 3px; }
.bug-team { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 600; white-space: nowrap; }
.bug-team img { flex: none; width: 18px; height: 18px; }
.bug-team .rank { color: var(--muted); font-size: 10px; font-weight: 600; }
.bug-team .abbr { overflow: hidden; text-overflow: ellipsis; }
.bug-team .rec { flex: none; color: var(--muted); font-size: 10px; font-weight: 400; }
.bug-team .poss { color: var(--poss); font-size: 9px; }
.bug-team .pts { margin-left: auto; font-variant-numeric: tabular-nums; }
.bug-team.lost { color: var(--muted); font-weight: 400; }
.bug-status { flex: none; width: 54px; margin-right: 12px; padding-left: 8px; border-left: 1px solid var(--border); color: var(--muted); font-size: 11px; line-height: 15px; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
