/* prop-group.css - styling for THE player-props rows, shared by every page
 * that draws them: the Props page and every /odds/<hub>/<slug> matchup page.
 *
 * Split out of props.html's inline <style> alongside the renderer itself
 * (static/prop-group.js) and for the same reason: rows whose markup comes
 * from one place and whose styling comes from two will drift.
 *
 * SCOPE. Only the rows themselves: the collapsible prop-type group, the
 * player row, the side pills, the per-book grid and the alternate-line
 * slider. The Props page's own board furniture (its toolbar, sport pills,
 * matchup wrapper, footnotes) stayed behind, because a matchup page has none
 * of it.
 *
 * BOOK CHIPS come from site-chrome.css site-wide. game-card.css used to
 * override them unscoped, which on a matchup page (where both files load)
 * would have torn the chip out of a prop side pill: its override is
 * position:absolute, pinned to a bet-pill corner. That override is now scoped
 * to .game-card, so prop pills keep the site-wide chip. If you add a chip
 * rule here, scope it.
 *
 * LIGHT MODE lives in static/theme-light.css, loaded site-wide, so these rows
 * get their light overrides on the matchup pages for free.
 */

/* ── Level 3: Prop-type group (collapsible — players hidden until tapped) ── */
    .prop-group { margin-top: 8px; }
    .prop-group-head {
      display: flex; align-items: center; gap: 8px;
      padding: 8px 6px 6px;
      border-bottom: 1px solid var(--border);
      cursor: pointer;
    }
    .prop-group-head:hover { background: var(--bg3); }
    .prop-group-caret {
      color: var(--gold); font-size: 13px; flex-shrink: 0;
      transition: transform 0.15s; display: inline-block;
      transform: rotate(-90deg);
    }
    .prop-group.open .prop-group-caret { transform: rotate(0deg); }
    .prop-group-label {
      font-size: 12px; font-weight: 800; color: var(--gold);
      letter-spacing: 0.5px; text-transform: uppercase;
    }
    .prop-group-count { font-size: 11px; color: var(--muted); font-weight: 600; }
    .prop-group-body { display: none; }
    .prop-group.open .prop-group-body { display: block; }

    /* ── Level 4: Player row (collapsed) ── */
    .player-row {
      border-bottom: 1px solid var(--border);
    }
    .player-row:last-child { border-bottom: none; }
    .player-row-head {
      display: flex; align-items: center; gap: 12px;
      padding: 10px 6px; cursor: pointer;
      transition: background 0.12s;
    }
    .player-row-head:hover { background: var(--bg3); }
    .player-name {
      flex: 1 1 140px; min-width: 0;
      font-size: 14px; font-weight: 700; color: var(--text);
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .player-sides {
      display: flex; align-items: center; gap: 8px;
      flex-wrap: wrap; justify-content: flex-end;
    }
    .side-pill {
      display: inline-flex; align-items: center; gap: 6px;
      font-size: 12px; color: var(--text); font-weight: 600;
      background: var(--bg3); border: 1px solid var(--border);
      padding: 4px 9px; border-radius: 6px;
      font-feature-settings: "tnum"; font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }
    .side-pill .side-tag { color: var(--muted); font-weight: 800; }
    .side-pill .side-price { color: var(--gold); font-weight: 800; }
    .side-pill.na { color: var(--muted); }
    .side-pill.na .side-price { color: var(--muted); }
    /* Tap-to-add: a side pill the user can click to add the leg to the Bet Slip. */
    .side-pill.tappable {
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
      transition: background 0.12s, border-color 0.12s;
    }
    .side-pill.tappable:hover {
      background: rgba(182,152,98,0.14);
      border-color: var(--gold);
    }
    /* "in slip" state — gold highlight + ✓, mirrors the Line Shop odds pills. */
    .side-pill.in-slip {
      background: rgba(182,152,98,0.18);
      border-color: var(--gold);
    }
    .side-pill .side-check {
      color: var(--gold); font-weight: 900; font-size: 12px;
    }
    .player-toggle {
      color: var(--gold); font-size: 14px; flex-shrink: 0;
      transition: transform 0.15s; display: inline-block;
      transform: rotate(-90deg);
    }
    .player-row.open .player-toggle { transform: rotate(0deg); }

    /* ── Level 4: Player row (expanded — all books) ── */
    .player-books { display: none; padding: 4px 6px 12px; }
    .player-row.open .player-books { display: block; }
    .pb-head {
      display: grid;
      grid-template-columns: 1.4fr 1fr 1fr;
      gap: 6px;
      padding: 0 6px 6px;
      font-size: 10px; font-weight: 700; color: var(--muted);
      text-transform: uppercase; letter-spacing: 0.5px;
    }
    .pb-head span:nth-child(2),
    .pb-head span:nth-child(3) { text-align: right; }
    .pb-row {
      display: grid;
      grid-template-columns: 1.4fr 1fr 1fr;
      gap: 6px;
      align-items: center;
      padding: 6px;
      border-radius: 5px;
      font-size: 12px;
    }
    .pb-row:nth-child(odd) { background: var(--bg3); }
    .pb-book-name {
      display: flex; align-items: center; gap: 7px;
      overflow: hidden;
    }
    .pb-book-name .pb-book-label {
      color: var(--text); font-weight: 600;
      overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .pb-cell {
      text-align: right;
      color: var(--text); font-weight: 600;
      font-feature-settings: "tnum"; font-variant-numeric: tabular-nums;
      padding: 3px 7px; border-radius: 4px;
      border: 1px solid transparent;
    }
    .pb-cell .pb-cell-side { color: var(--muted); font-weight: 700; margin-right: 3px; }
    .pb-cell .pb-cell-price { color: var(--yellow); font-weight: 700; }
    .pb-cell.na { color: var(--muted); }
    .pb-cell.na .pb-cell-price { color: var(--muted); }
    .pb-cell.best {
      border-color: var(--gold);
      background: rgba(182,152,98,0.12);
    }
    .pb-cell.best .pb-cell-price { color: var(--gold); font-weight: 900; }
    .pb-cell.best .pb-cell-side { color: var(--gold-lt); }

    /* ── Alt-line slider (above the per-book grid) ──────────────────────────
       Mirrors the Line Shop pattern.  An "All" button is the default
       active state (table shows every book at its own headline line);
       numeric rungs filter the table to that exact line.  Tapping the
       active rung again deselects back to "All". */
    .prop-alt-slider {
      display: flex; gap: 4px; align-items: center;
      padding: 6px 6px 2px; margin-top: 2px;
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }
    .prop-alt-stop {
      flex: 0 0 auto;
      background: var(--bg3); color: var(--muted);
      border: 1px solid var(--border); border-radius: 4px;
      font-size: 11px; font-weight: 700;
      padding: 4px 8px; cursor: pointer;
      transition: all 0.12s;
    }
    .prop-alt-stop:hover { color: var(--text); border-color: var(--gold); }
    .prop-alt-stop.active {
      color: var(--gold); border-color: var(--gold);
      background: rgba(182,152,98,0.08);
    }
    .prop-alt-stop.is-consensus:not(.active) {
      color: var(--text); border-style: dashed;
    }
    .prop-alt-stop.alt-all { font-style: italic; }
