/* ═══════════════════════════════════════════════════════════════
   Boost picker — coins, then one token at a time.

   Three GLB coins on paper; tap one and it flies to centre; then a
   single token owns the screen using the Miles Statement grammar
   (see miles-statement.css — the line grid, type sizes and section
   label are deliberately identical) with the coin sitting where the
   balance split-flap sits. One hold-to-activate button. The list
   button opens the full inventory.

   Design: /static/boosts-statement-preview.html
   Everything is scoped to #boost-picker-modal and bp-prefixed —
   these class names are generic enough to collide otherwise.
   ═══════════════════════════════════════════════════════════════ */

#boost-picker-modal .modal-container {
    height: 88vh;
    max-height: 760px;
}
#boost-picker-modal .modal-body {
    padding: 0;
    position: relative;
}
/* The sheet must cover the whole surface, so it hangs off the container. */
#boost-picker-modal .modal-container { position: relative; }

/* ── the coin ─────────────────────────────────────────────────── */
#boost-picker-modal .bp-coin {
    border-radius: 50%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    flex-shrink: 0;
}
/* PNG fallback MUST live in a rule, never an inline style: an inline
   background-image outranks every selector, so the filmstrip below could never
   replace it and the 2000% background-size would smear ONE png across twenty
   frame widths. */
#boost-picker-modal .bp-coin[data-tier="bronze"] { background-image: url(static/assets/d-pad-token-bronze.png); }
#boost-picker-modal .bp-coin[data-tier="silver"] { background-image: url(static/assets/d-pad-token-silver.png); }
#boost-picker-modal .bp-coin[data-tier="gold"]   { background-image: url(static/assets/d-pad-token-gold.png); }
body.coin3d #boost-picker-modal .bp-coin { background-size: 2000% 100%; background-position-x: 0%; }
body.coin3d #boost-picker-modal .bp-coin[data-tier="bronze"] { background-image: var(--coin-sprite-bronze); }
body.coin3d #boost-picker-modal .bp-coin[data-tier="silver"] { background-image: var(--coin-sprite-silver); }
body.coin3d #boost-picker-modal .bp-coin[data-tier="gold"]   { background-image: var(--coin-sprite-gold); }
/* A host that got a live WebGL coin drops its background — otherwise the
   filmstrip shows THROUGH the transparent canvas. */
#boost-picker-modal .bp-coin.has3d { background-image: none !important; }
#boost-picker-modal .bp-coin.has3d canvas { display: block; border-radius: 50%; }

/* ── level 1: three coins on paper ────────────────────────────── */
#boost-picker-modal .bp-stage {
    position: relative; height: 100%;
    display: flex; flex-direction: column; justify-content: center;
    gap: 6px; padding: 8px 22px 20px;
}
#boost-picker-modal .bp-pick {
    display: flex; align-items: center; gap: 20px;
    background: none; border: 0; padding: 14px 4px; cursor: pointer;
    font: inherit; color: inherit; text-align: left; width: 100%;
    transition: opacity .22s ease, transform .22s ease;
    -webkit-tap-highlight-color: transparent;
}
#boost-picker-modal .bp-pick .bp-coin {
    width: 88px; height: 88px;
    filter: drop-shadow(0 7px 16px rgba(0,0,0,.26));
    transition: transform .18s;
}
#boost-picker-modal .bp-pick:active .bp-coin { transform: scale(.94); }
#boost-picker-modal .bp-pick .bp-n { flex: 1; min-width: 0; }
#boost-picker-modal .bp-pick .bp-name {
    display: block;
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-weight: var(--font-display-weight, 700);
    font-size: 15px; letter-spacing: .05em;
}
#boost-picker-modal .bp-pick .bp-cnt {
    display: block;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-weight: 600; font-size: 12px; color: rgba(26,26,26,.5); margin-top: 5px;
}
#boost-picker-modal .bp-soon {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 8px;
    padding: 3px 9px 3px 7px; border-radius: 100px; background: rgba(26,26,26,.05);
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-weight: 700; font-size: 11px;
}
#boost-picker-modal .bp-soon i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
#boost-picker-modal .bp-soon.today { color: #c0392b; background: rgba(192,57,43,.09); }
#boost-picker-modal .bp-soon.week  { color: #d35400; background: rgba(211,84,0,.09); }
#boost-picker-modal .bp-soon.later { color: rgba(26,26,26,.45); }
#boost-picker-modal .bp-pick[disabled] { opacity: .35; pointer-events: none; }
#boost-picker-modal .bp-stage.flying .bp-pick { opacity: 0; transform: scale(.9); }
#boost-picker-modal .bp-tip {
    text-align: center; font-size: 11.5px; color: rgba(26,26,26,.4); margin-top: 6px;
}
#boost-picker-modal .bp-stage.flying .bp-tip { opacity: 0; transition: opacity .2s; }
#boost-picker-modal .bp-flier {
    position: absolute; z-index: 20; pointer-events: none; border-radius: 50%;
    filter: drop-shadow(0 12px 26px rgba(0,0,0,.34));
}

/* ── level 2: one token ───────────────────────────────────────── */
#boost-picker-modal .bp-detail {
    display: flex; flex-direction: column; min-height: 100%;
    animation: bp-in .26s ease-out; touch-action: pan-y;
}
@keyframes bp-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

#boost-picker-modal .bp-topbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin: 14px 20px 2px;
}
#boost-picker-modal .bp-back,
#boost-picker-modal .bp-invbtn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 12px; border-radius: 100px;
    background: #e9e5db; border: 1px solid rgba(26,26,26,.12);
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-weight: var(--font-display-weight, 700);
    font-size: 10.5px; letter-spacing: .11em; text-transform: uppercase;
    color: rgba(26,26,26,.6); cursor: pointer; white-space: nowrap;
}
#boost-picker-modal .bp-back .bp-coin { width: 19px; height: 19px; }
#boost-picker-modal .bp-invbtn svg { opacity: .75; }
#boost-picker-modal .bp-back:active,
#boost-picker-modal .bp-invbtn:active { background: #ded9cd; }

/* the band where the balance split-flap sits — the coin sits here instead */
#boost-picker-modal .bp-band { padding: 10px 22px 20px; border-bottom: 1px solid rgba(26,26,26,.12); }
#boost-picker-modal .bp-herolabel {
    text-align: center;
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-weight: var(--font-display-weight, 700);
    font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
    color: rgba(26,26,26,.45);
}
#boost-picker-modal .bp-coinrow {
    display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 12px;
}
#boost-picker-modal .bp-nav {
    background: none; border: 0; font: inherit; font-size: 26px; line-height: 1;
    color: rgba(26,26,26,.28); cursor: pointer; padding: 10px 8px;
}
#boost-picker-modal .bp-nav:disabled { opacity: .3; cursor: default; }
#boost-picker-modal .bp-cstage {
    position: relative; display: grid; place-items: center;
    width: 186px; height: 186px; flex-shrink: 0;
}
#boost-picker-modal .bp-halo {
    position: absolute; width: 210px; height: 210px; border-radius: 50%; opacity: .45;
    background: radial-gradient(circle, rgba(255,217,61,.55) 0%, rgba(255,217,61,0) 62%);
    pointer-events: none;
}
#boost-picker-modal .bp-ring { position: absolute; inset: 0; transform: rotate(-90deg); }
#boost-picker-modal .bp-ring .trk { stroke: rgba(26,26,26,.08); }
#boost-picker-modal .bp-ring .arc { stroke: #e8b70a; stroke-linecap: round; }
#boost-picker-modal .bp-cstage .bp-coin {
    position: relative; width: 150px; height: 150px; z-index: 2;
    filter: drop-shadow(0 11px 20px rgba(0,0,0,.25));
    transition: transform .14s;
}
#boost-picker-modal .bp-detail.charging .bp-cstage .bp-coin { transform: scale(1.05); }

/* .stmt-pulse */
#boost-picker-modal .bp-pulse {
    margin-top: 14px; text-align: center;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 12px; color: rgba(26,26,26,.6);
    white-space: nowrap; font-variant-numeric: tabular-nums;
}
#boost-picker-modal .bp-pulse b { color: var(--ink, #1a1a1a); font-weight: 600; }
#boost-picker-modal .bp-pulse .dot { margin: 0 6px; color: rgba(26,26,26,.45); }

/* .stmt-month */
#boost-picker-modal .bp-sect {
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-weight: var(--font-display-weight, 700);
    font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
    color: rgba(26,26,26,.45); padding: 22px 22px 6px;
}
#boost-picker-modal .bp-lines { padding: 0 22px; }

/* .stmt-line — 36px | 1fr | auto */
#boost-picker-modal .bp-line {
    display: grid; grid-template-columns: 36px 1fr auto; align-items: center;
    gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(26,26,26,.07);
}
#boost-picker-modal .bp-line:last-child { border-bottom: 0; }
#boost-picker-modal .bp-line .g { display: grid; place-items: center; color: rgba(26,26,26,.45); }
#boost-picker-modal .bp-line .w { min-width: 0; }
#boost-picker-modal .bp-line .t { display: block; font-size: 15px; font-weight: 500; line-height: 1.25; }
#boost-picker-modal .bp-line .s {
    display: block; font-size: 12px; color: rgba(26,26,26,.45); margin-top: 3px; line-height: 1.3;
}
#boost-picker-modal .bp-line .a {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
}
#boost-picker-modal .bp-line .a.hot  { color: #c0392b; }
#boost-picker-modal .bp-line .a.warm { color: #d35400; }
/* .stmt-line .a.earned — the gold pill */
#boost-picker-modal .bp-line .a.earned {
    font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
    background: linear-gradient(135deg, #bf953f 0%, #fcf6ba 40%, #b38728 60%, #fbf5b7 100%);
    color: var(--ink, #1a1a1a); padding: 5px 9px; border-radius: 100px;
}

/* the one button */
#boost-picker-modal .bp-holdwrap { padding: 24px 22px 26px; margin-top: auto; }
#boost-picker-modal .bp-hold {
    position: relative; width: 100%; padding: 18px; border: 0; border-radius: 100px;
    background: var(--ink, #1a1a1a); color: #fff;
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-weight: var(--font-display-weight, 700);
    font-size: 13px; letter-spacing: .15em; cursor: pointer; overflow: hidden;
    touch-action: none; -webkit-user-select: none; user-select: none;
    -webkit-tap-highlight-color: transparent;
}
#boost-picker-modal .bp-hold .fill {
    position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: #FFD93D; z-index: 0;
}
#boost-picker-modal .bp-hold .lab { position: relative; z-index: 1; mix-blend-mode: difference; color: #fff; }
#boost-picker-modal .bp-detail.fired .bp-hold { background: #1f7a43; }
#boost-picker-modal .bp-detail.fired .bp-hold .lab { mix-blend-mode: normal; }
#boost-picker-modal .bp-holdhint {
    text-align: center;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 11px; color: rgba(26,26,26,.4); margin-top: 11px; letter-spacing: .04em;
}

/* ── the inventory sheet ──────────────────────────────────────── */
#boost-picker-sheet:empty { display: none; }
#boost-picker-modal .bp-inv {
    position: absolute; inset: 0; z-index: 30; background: var(--paper, #F4F1EA);
    display: flex; flex-direction: column; border-radius: 12px; overflow: hidden;
    animation: bp-sheetup .24s cubic-bezier(.2,.9,.3,1);
}
@keyframes bp-sheetup { from { transform: translateY(22px); opacity: 0; } to { transform: none; opacity: 1; } }
#boost-picker-modal .bp-invhead {
    flex-shrink: 0; padding: 17px 20px 13px; border-bottom: 1px solid rgba(26,26,26,.12);
    background: linear-gradient(180deg, #EFE9DB, #F4F1EA);
    display: flex; align-items: center; justify-content: space-between;
}
#boost-picker-modal .bp-invhead .t {
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-weight: var(--font-display-weight, 700);
    font-size: 17px; letter-spacing: .05em;
}
#boost-picker-modal .bp-invhead .x {
    width: 34px; height: 34px; border-radius: 50%; border: 2px solid #c00;
    background: none; color: #c00; font-size: 17px; cursor: pointer;
    display: grid; place-items: center;
}
#boost-picker-modal .bp-chips {
    flex-shrink: 0; display: flex; gap: 7px; padding: 12px 20px 4px; overflow-x: auto;
}
#boost-picker-modal .bp-chips::-webkit-scrollbar { height: 0; }
#boost-picker-modal .bp-chip {
    flex-shrink: 0; display: flex; align-items: center; gap: 7px;
    padding: 6px 12px 6px 6px; border-radius: 100px;
    border: 1px solid rgba(26,26,26,.13); background: #FFFDF6; cursor: pointer;
    font: inherit; font-size: 11.5px; font-weight: 700; color: #4a4539;
}
#boost-picker-modal .bp-chip.all { padding-left: 13px; }
#boost-picker-modal .bp-chip .bp-coin { width: 21px; height: 21px; }
#boost-picker-modal .bp-chip b {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-weight: 700; font-size: 10.5px; color: rgba(26,26,26,.4);
}
#boost-picker-modal .bp-chip[aria-pressed="true"] {
    background: var(--ink, #1a1a1a); color: #fff; border-color: var(--ink, #1a1a1a);
}
#boost-picker-modal .bp-chip[aria-pressed="true"] b { color: rgba(255,255,255,.6); }
#boost-picker-modal .bp-invbody { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 26px; }
#boost-picker-modal .bp-invbody::-webkit-scrollbar { width: 0; }
/* .stmt-day-head grammar for the urgency groups */
#boost-picker-modal .bp-group { padding: 0 20px; }
#boost-picker-modal .bp-ghead {
    display: flex; align-items: baseline; justify-content: space-between;
    padding: 18px 0 6px; border-bottom: 1px solid rgba(26,26,26,.12);
}
#boost-picker-modal .bp-ghead .lbl {
    font-family: var(--font-display, 'Archivo Black', sans-serif);
    font-weight: var(--font-display-weight, 700);
    font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase;
}
#boost-picker-modal .bp-ghead .tot {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 13px; font-weight: 600; color: rgba(26,26,26,.45);
}
#boost-picker-modal .bp-group.today .bp-ghead .lbl { color: #c0392b; }
#boost-picker-modal .bp-group.week  .bp-ghead .lbl { color: #d35400; }
#boost-picker-modal .bp-group.later .bp-ghead .lbl,
#boost-picker-modal .bp-group.never .bp-ghead .lbl { color: rgba(26,26,26,.45); }
#boost-picker-modal .bp-invline {
    display: grid; grid-template-columns: 36px 1fr auto; align-items: center;
    gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(26,26,26,.07);
    width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0;
    text-align: left; font: inherit; color: inherit; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
#boost-picker-modal .bp-invline:last-child { border-bottom: 0; }
#boost-picker-modal .bp-invline:active { background: rgba(26,26,26,.05); }
#boost-picker-modal .bp-invline .bp-coin {
    width: 36px; height: 36px; filter: drop-shadow(0 2px 5px rgba(0,0,0,.2));
}
#boost-picker-modal .bp-invline .w { min-width: 0; }
#boost-picker-modal .bp-invline .t {
    display: block; font-size: 14.5px; font-weight: 500; line-height: 1.25;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#boost-picker-modal .bp-invline .s { display: block; font-size: 12px; color: rgba(26,26,26,.45); margin-top: 3px; }
#boost-picker-modal .bp-invline .a {
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-size: 14px; font-weight: 600; white-space: nowrap; color: rgba(26,26,26,.45);
}
#boost-picker-modal .bp-invline .a.hot  { color: #c0392b; }
#boost-picker-modal .bp-invline .a.warm { color: #d35400; }
#boost-picker-modal .bp-invline .a .chev {
    color: rgba(26,26,26,.35); font-size: 17px; margin-left: 7px; vertical-align: -1px;
}
#boost-picker-modal .bp-invline.here { background: rgba(255,217,61,.14); }

#boost-picker-modal .bp-empty {
    text-align: center; padding: 40px 22px; color: rgba(26,26,26,.45); font-size: 13px;
}

/* Filmstrip spin is the FALLBACK only — 20 frames is 18 degrees a step, which
   reads as jitter above chip size. Coins that move get a live canvas. */
body.coin3d #boost-picker-modal .bp-coin.idle:not(.has3d) {
    animation: bp-coinspin 6.5s steps(20) infinite;
}
@keyframes bp-coinspin { from { background-position-x: 0%; } to { background-position-x: 105.2632%; } }
@media (prefers-reduced-motion: reduce) {
    body.coin3d #boost-picker-modal .bp-coin.idle:not(.has3d) { animation: none; }
}
