/* boost-pass.css: the wallet pass and the short Add Boost form (prompt 400
   Part 4, BL-1829, Nov 11 2026). Loaded by the Profit Boosts
   pages (the Wallet and Boost Arb), whose boosts static/boost-wallet.js
   draws in pass mode (renderManager opts.pass). The buttons, dropdowns,
   boxes and panels inside come from the shared controls (controls.css);
   this file only lays out the card and the form around them and never
   styles a shared control.

   BOOK COLORS, defined once. Our own color per book, no logos (Dan: no book
   logos we lack rights to). Every band reads in both themes, so the light
   theme needs no override for them; the one hard-coded dark value is the
   warning amber, deepened in static/theme-light.css. */
.bw-pass { --bk: #4A4A4A; --bk-ink: #FFFFFF; }
.bw-pass[data-bk="draftkings"]     { --bk: #2E7D4F; }
.bw-pass[data-bk="fanduel"]        { --bk: #1F6FD1; }
.bw-pass[data-bk="betmgm"]         { --bk: #7E6235; }
.bw-pass[data-bk="williamhill_us"] { --bk: #1E5A4C; }
.bw-pass[data-bk="betrivers"]      { --bk: #2B4C9B; }
.bw-pass[data-bk="espnbet"]        { --bk: #5A3FC0; }
.bw-pass[data-bk="hardrockbet"]    { --bk: #6B2A8C; }
.bw-pass[data-bk="fanatics"]       { --bk: #B3262E; }
.bw-pass[data-bk="ballybet"]       { --bk: #C2482F; }
.bw-pass[data-bk="betparx"]        { --bk: #2D6E8E; }
.bw-pass[data-bk="fliff"]          { --bk: #7A3FA0; }
.bw-pass[data-bk="bet365"]         { --bk: #1D6B3A; }
.bw-pass[data-bk="prophetx"]       { --bk: #3A3A9E; }
.bw-pass[data-bk="novig"]          { --bk: #1E8A84; }
.bw-pass[data-bk="pinnacle"]       { --bk: #24466B; }
.bw-pass[data-bk="kalshi"]         { --bk: #13866F; }
.bw-pass[data-bk="polymarket"]     { --bk: #2F5BD3; }

/* ── The pass ──────────────────────────────────────────────────────────── */
.bw-passes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 4px 0 14px; }
.bw-pass {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--bg3); border: 1px solid var(--border); border-radius: 14px; overflow: visible;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}
.bw-pass.editing { border-color: var(--gold); }
.bw-pass-band {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 9px 14px; background: var(--bk); color: var(--bk-ink); border-radius: 13px 13px 0 0;
  font-size: 13px; font-weight: 800; line-height: 1.25;
}
.bw-pass-book { min-width: 0; overflow-wrap: anywhere; }
.bw-pass-exp { font-weight: 700; white-space: nowrap; }
/* Inside 24 hours: the warning color on a chip of its own, so it reads on
   any band color. */
.bw-pass-exp.warn { background: #E5A54B; color: #111111; border-radius: 999px; padding: 2px 9px; }
.bw-pass-face {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 8px; cursor: pointer; outline: none;
  border-radius: 0 0 14px 14px;
}
.bw-pass-face:focus-visible { box-shadow: inset 0 0 0 2px var(--gold); }
.bw-pass-big { font-size: 34px; font-weight: 900; line-height: 1.05; color: var(--text); font-variant-numeric: tabular-nums; }
.bw-pass-cap { font-size: 13.5px; font-weight: 700; color: var(--text); }
.bw-pass-tap { font-size: 12px; color: var(--muted); margin-top: 2px; }
.bw-pass-tap::after { content: " \25BE"; }
.bw-pass.is-open .bw-pass-tap::after { content: " \25B4"; }
.bw-pass-rules { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 4px; }
.bw-pass-rules[hidden] { display: none; }
.bw-rule {
  display: inline-block; font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--text);
  background: var(--bg2); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px;
}
.bw-pass > [data-tog-acts] { padding: 0 14px 12px; margin-top: 6px; }
.bw-pass.is-dead { opacity: .6; }
.bw-pass.is-dead .bw-pass-band { background: var(--bg2); color: var(--muted); }
.bw-pass-none { font-size: 14px; color: var(--muted); margin: 4px 0 12px; }
.bw-addrow { margin: 2px 0 12px; }

/* A phone: the cards stack one under the next, the soonest to expire on
   top. A closed pass shows its band, big number and cap; a tap opens one
   (its rules and buttons). Cards never overlap (Dan, Nov 14, prompt 451,
   BL-1960): each used to tuck 14 px under the one above, and
   with Rules open the open card was drawn over the next card's band, so the
   FanDuel header sat half covered. Now a plain gap, nothing under anything. */
@media (max-width: 600px) {
  .bw-passes:not(.bw-passes-dead) { display: flex; flex-direction: column; gap: 10px; }
  .bw-passes:not(.bw-passes-dead) > .bw-pass { box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
  .bw-passes:not(.bw-passes-dead) > .bw-pass:not(.is-open) > [data-tog-acts] { display: none; }
  .bw-passes:not(.bw-passes-dead):not(.bw-deck) > .bw-pass.is-open { z-index: 1; }
  .bw-pass-big { font-size: 30px; }
}

/* ── Used And Expired ──────────────────────────────────────────────────── */
.bw-dead { margin: 6px 0 4px; }
.bw-dead .bw-passes { margin-top: 10px; }
.bw-used-list { margin: 10px 0 4px 18px; font-size: 13.5px; color: var(--text); }
.bw-used-list li { margin: 3px 0; }

/* ── The short Add Boost form ──────────────────────────────────────────── */
div.bw-add.bw-pf { display: block; margin-top: 4px; padding-top: 4px; }
div.bw-add.bw-pf[hidden] { display: none !important; }
div.bw-add.bw-pf .bw-editing { margin: 0 0 10px; font-size: 14px; font-weight: 800; color: var(--text); }
.bw-pf-short { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; margin-bottom: 12px; }
div.bw-add.bw-pf .bw-fineprint.bw-pf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; padding: 0; }
.bw-pf-f { min-width: 0; }
.bw-pf-wide { grid-column: span 2; }
.bw-pf-check { align-self: center; }
/* "Can't Combine At This Book" ran outside its pill at phone widths (Dan,
   Nov 18 2026, prompt 482): the shared check pill never wraps, and a half
   column of the two-column grid is narrower than the words. It takes the
   whole row and wraps inside the pill when even that is short (320 px). */
div.bw-add.bw-pf .bw-pf-check { grid-column: 1 / -1; justify-self: start; max-width: 100%; white-space: normal !important; text-align: left; }
div.bw-add.bw-pf .bw-pf-check > span { min-width: 0; overflow-wrap: anywhere; }
div.bw-add.bw-pf .bw-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; margin-bottom: 16px; }
/* prompt 451: the 16px below Save Boost keeps its 44px tap area off the fold
   under it (How The Wallet Works sat 1px below the button, so a tap near its
   top edge pressed Save Boost; the UX guard's tap overlap rule). */
div.bw-add.bw-pf .bw-err { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: var(--red, #E5534B); }
div.bw-add.bw-pf .bw-err[hidden] { display: none; }
.bw-pf-f:has(.bw-bad) > span, .bw-pf-f:has(.bw-bad) > label { color: var(--red, #E5534B); }
@media (max-width: 600px) {
  .bw-pf-short { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  div.bw-add.bw-pf .bw-fineprint.bw-pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bw-pf-wide { grid-column: 1 / -1; }
}

/* Sort and Book (prompt 437, BL-1935): one row of the shared
   dropdowns above the cards, and a book's name over its own boosts when the
   cards are sorted by Sportsbook. The dropdowns are static/controls.css. */
.bw-sortbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.bw-group { font-size: 13px; font-weight: 800; color: var(--text); margin: 14px 0 6px; letter-spacing: .2px; }
.bw-sortbar + .bw-group { margin-top: 0; }
.bw-group-n { color: var(--muted); font-weight: 700; margin-left: 4px; }

/* ── The deck (Dan, Nov 14, prompt 451, BL-1962) ─────────────
   The wallet page stacks its passes on purpose, like Apple Wallet passes.
   Every card's top strip is always fully readable: book name on its own
   color on the left, the boost % big on the right, "Ends Nov 18" under it.
   A closed card is its strip plus a 14 px edge of the card, and the next
   card tucks over that edge only, never the strip. A tap brings a card to
   the front of its deck fully open (order -1, nothing tucks over it), the
   rest stay stacked under it; a second tap closes it. The UX guard knows
   this deck by data-tog-deck and still fails if a strip or an open card is
   covered (qa/ux_guard.py). */
.bw-deck, .bw-passes.bw-deck { display: flex; flex-direction: column; gap: 0; max-width: 480px; }
.bw-deck > .bw-deck-card { margin-top: -14px; padding-bottom: 14px; box-shadow: 0 -2px 10px rgba(0, 0, 0, .28); }
.bw-deck > .bw-deck-card:first-child { margin-top: 0; }
.bw-deck.has-open > .bw-deck-card:first-child:not(.is-open) { margin-top: -14px; }
.bw-deck > .bw-deck-card.is-open { order: -1; margin-top: 0; margin-bottom: 26px; padding-bottom: 0; z-index: 2; box-shadow: 0 2px 12px rgba(0, 0, 0, .3); }
.bw-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: nowrap;
  min-height: 64px; padding: 10px 14px; cursor: pointer; outline: none; border-radius: 13px 13px 0 0;
}
.bw-deck-card:not(.is-open) > .bw-strip { border-radius: 13px; }
.bw-strip:focus-visible { box-shadow: inset 0 0 0 2px var(--gold); }
.bw-strip .bw-pass-book { font-size: 16px; font-weight: 800; line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.bw-strip-r { display: flex; flex-direction: column; align-items: flex-end; flex: 0 0 auto; text-align: right; }
.bw-strip-pct { font-size: 30px; font-weight: 900; line-height: 1; font-variant-numeric: tabular-nums; }
.bw-strip-ends { font-size: 11.5px; font-weight: 700; margin-top: 3px; white-space: nowrap; opacity: .92; }
.bw-strip-ends.warn { background: #E5A54B; color: #111111; border-radius: 999px; padding: 1px 8px; opacity: 1; }
.bw-deck-body { padding: 12px 14px 12px; }
.bw-deck-body[hidden] { display: none; }
.bw-deck-body .bw-pass-cap { margin: 0 0 8px; }
.bw-deck-body .bw-pass-rules { padding: 0; margin-bottom: 10px; }
.bw-deck-body > [data-tog-acts] { margin-top: 4px; }
@media (max-width: 600px) { .bw-deck { max-width: none; } }
