/* ============================================================================
   drawers.css — app-surface stylesheet for the slide-out drawer family.
   Added v=400 for the inline-to-CSS cleanup (see docs/CSS_CLEANUP_PLAN.md).

   OWNS the styling for the drawer surfaces as they migrate off inline
   style={{}} props, component by component:
     - VegasDrawer.jsx
     - BlastScoreDrawer.jsx
     - PickemDrawer.jsx
     - TrackRecordDrawer.jsx

   Note: the existing .vegas-drawer / .record-drawer / .blast-drawer structural
   rules currently live in styles.css; as each drawer is migrated, its rules
   move here and the styles.css originals are removed in the same ship (no
   duplication).

   Loaded after styles.css (the base/token layer). Relies on :root tokens.

   CONVENTIONS: see picks.css header + docs/CSS_CLEANUP_PLAN.md. Static ->
   kebab classes here; dynamic values -> CSS custom properties / data-attrs in
   the JSX; hover/focus/media queries here, not JS.

   ============================================================================ */


/* ── PickemDrawer (v=401, pilot migration) ─────────────────────────────────
   The "About Pick'em" drawer body. The drawer SHELL (.blast-drawer,
   .blast-drawer-header/-title/-close/-body, .vegas-drawer-overlay) is shared
   with BlastScoreDrawer and still lives in styles.css; only this drawer's
   body-content styling moved here off inline props. All values are static
   (no dynamic/data-driven styling in this component), so it's a clean
   static->class + dedup pass: the pillar box (.pickem-pillar) was repeated
   inline 5x, the section label 3x. When BlastScoreDrawer migrates, any of
   these that match exactly are candidates to generalize into shared
   .drawer-* classes. */
.pickem-drawer-prose {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text-secondary);
}
.pickem-drawer-p { margin-bottom: 16px; }
.pickem-drawer-section-label {
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
}
.pickem-drawer-pillars {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}
.pickem-pillar {
    padding: 10px 14px;
    background: rgba(16, 185, 129, 0.06);
    border-radius: 8px;
    border-left: 3px solid var(--green);
}
.pickem-pillar > strong { color: var(--text-primary); }
.pickem-pillar-desc {
    font-size: 0.82rem;
    margin-top: 4px;
}
.pickem-drawer-note {
    margin-bottom: 16px;
    font-size: 0.82rem;
    color: var(--text-muted);
}
.pickem-drawer-scorekey {
    padding: 12px 14px;
    background: rgba(245, 158, 11, 0.08);
    border-radius: 8px;
    font-size: 0.82rem;
    margin-bottom: 18px;
}
.pickem-scorekey-green { color: var(--green); font-weight: 700; }
.pickem-scorekey-blue { color: var(--blue); font-weight: 700; }
.pickem-scorekey-gray { color: var(--text-muted); font-weight: 700; }
.pickem-scorekey-note {
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.pickem-drawer-datasource {
    margin-top: 16px;
    font-size: 0.72rem;
    color: var(--text-muted);
}


/* ════════════════════════════════════════════════════════════════════════
   VegasDrawer body (v=413). The drawer shell rules (.vegas-drawer,
   .vegas-drawer-header, .vegas-game-row base, .vegas-team, .vegas-ou, etc.)
   stay in styles.css per the v=401 pilot precedent; this block only holds the
   inline body styles being migrated. (Comments here avoid the glob-slash
   sequence that broke parsing in v=410.)
   ════════════════════════════════════════════════════════════════════════ */
.vegas-icon { width: 16px; height: 16px; }
.vegas-game-row { display: flex; align-items: center; justify-content: space-between; }
.vegas-ou-section { margin-bottom: 6px; }
.vegas-col-header { display: flex; align-items: center; padding: 0 0 8px 0; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.vegas-col-matchup { flex: 1; font-size: 0.65rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.vegas-sort-label { font-size: 0.65rem; color: var(--accent); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer; user-select: none; }
.vegas-games-list { padding-right: 4px; }
.vegas-game-cells { display: flex; align-items: center; gap: 8px; }
.vegas-team-cell { display: inline-flex; align-items: baseline; gap: 4px; }
.vegas-team-fav { font-weight: 600; color: var(--green); }
.vegas-team-default { font-weight: 600; color: var(--text-primary); }
.vegas-implied { font-size: 0.7rem; font-weight: 500; color: var(--text-muted); }
.vegas-ou--hi { color: var(--green); font-weight: 700; }
.vegas-ou--mid { color: var(--accent); font-weight: 700; }
.vegas-ou--lo { color: var(--text-secondary); font-weight: 700; }
.vegas-ou--none { color: var(--text-muted); }
.vegas-footer { margin-top: 8px; font-size: 0.65rem; color: var(--text-muted); text-align: center; }
.vegas-leans-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.vegas-leans-header { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.vegas-game-row--lean { align-items: flex-start; }
.vegas-lean-bullet { color: var(--accent); margin-right: 8px; font-weight: 700; font-size: 0.78rem; flex-shrink: 0; }
.vegas-lean-body { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.5; flex: 1; }
.vegas-lean-label { color: var(--text-muted); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.5px; margin-right: 6px; font-weight: 600; }
.vegas-lean-em-primary { color: var(--text-primary); }
.vegas-lean-em-green { color: var(--green); }
.vegas-lean-em-accent { color: var(--accent); }


/* ════════════════════════════════════════════════════════════════════════
   BlastScoreDrawer body (v=413) — all-static methodology explainer. Shell
   rules (.blast-drawer, .blast-drawer-header, etc.) stay in styles.css.
   ════════════════════════════════════════════════════════════════════════ */
.blast-intro { font-size: 0.88rem; line-height: 1.7; color: var(--text-secondary); }
.blast-p { margin-bottom: 16px; }
.blast-subhead { margin-bottom: 12px; font-weight: 600; color: var(--text-primary); font-size: 0.85rem; }
.blast-note { margin-bottom: 16px; font-size: 0.82rem; color: var(--text-muted); }
.blast-pillars { display: flex; flex-direction: column; gap: 14px; margin-bottom: 18px; }
.blast-pillar { padding: 10px 14px; background: rgba(16, 185, 129, 0.06); border-radius: 8px; border-left: 3px solid var(--green); }
.blast-pillar-title { color: var(--text-primary); }
.blast-pillar-desc { font-size: 0.82rem; margin-top: 4px; }
/* v=414 — the two "Reading the scores" panels now use the neutral
   var(--bg-secondary) card background (matching the Track Record stat cards,
   .record-stat-card) instead of the old amber tint, per Joe. */
.blast-legend-box { padding: 12px 14px; background: var(--bg-secondary); border-radius: 8px; font-size: 0.82rem; }
.blast-toppick-box { margin-top: 12px; }
.blast-legend-note { margin-top: 6px; font-size: 0.75rem; color: var(--text-muted); }
.blast-tier-green { color: var(--green); font-weight: 700; }
.blast-tier-blue { color: var(--blue); font-weight: 700; }
.blast-tier-gray { color: var(--text-muted); font-weight: 700; }
/* v=414 — inline TOP PICK badge: the real card-ribbon green gradient + white
   uppercase treatment (.card-ribbon-top-pick), rendered inline in the explainer
   instead of the old orange text. */
.blast-toppick-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--green) 0%, #059669 100%);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
    vertical-align: middle;
}
.blast-datasource { margin-top: 16px; font-size: 0.72rem; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════════════
   TrackRecordDrawer (.tr-* + .record-* modifiers) — v=424 inline-to-CSS.
   The drawer SHELL (.record-drawer / -header / -title / -close / -body,
   .record-section-title, .record-stat-*, .record-day-*, .record-empty)
   stays in styles.css per the Vegas/Blast precedent (v=413); only the
   inline-derived internals move here. New bits use a `.tr-*` sub-namespace
   because the old `.record-hit-*` classes (retired Recent HR Hits section,
   v=169) still sit in styles.css and would collide. Dynamic pieces follow
   the established pattern: `--tr-w` CSS var for the data-driven progress-bar
   width (the one sanctioned inline), `.is-*` modifiers for toggled state
   (caret rotate, refresh dot, progress fill color).
   ═══════════════════════════════════════════════════════════════════════ */

/* Methodology note + loading */
.record-methodology-note { font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; padding: 0 4px 14px; }
.tr-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 0; }
.tr-spinner { width: 24px; height: 24px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }

/* Section-title flex modifier (Live Results + Recent Days headers) */
.record-section-title--flex { display: flex; justify-content: space-between; align-items: center; }

/* Live Results section */
.tr-live-section { margin-bottom: 18px; }
.tr-live-head-left { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.tr-live-title { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.tr-live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; animation: pulse-dot 1.5s ease-in-out infinite; }
.tr-live-date { font-size: 0.75rem; font-weight: 500; color: var(--text-primary); letter-spacing: normal; text-transform: none; }
.tr-fresh { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.tr-fresh-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse-dot 2s ease-in-out infinite; box-shadow: 0 0 4px rgba(16, 185, 129, 0.4); flex-shrink: 0; }
.tr-fresh-dot.is-refreshing { background: var(--accent); animation: fourbags-status-spin 1s linear infinite; box-shadow: 0 0 6px rgba(245, 158, 11, 0.6); }
.tr-fresh-text { font-size: 0.68rem; color: var(--text-muted); white-space: nowrap; text-transform: none; letter-spacing: normal; font-weight: 400; }

/* Games progress bar */
.tr-progress { margin-bottom: 10px; }
.tr-progress-row { display: flex; justify-content: space-between; font-size: 0.72rem; color: var(--text-muted); margin-bottom: 4px; }
.tr-progress-live { color: #ef4444; font-weight: 600; }
.tr-progress-track { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.tr-progress-fill { height: 100%; border-radius: 2px; width: var(--tr-w); background: var(--accent); transition: width 0.5s ease; }
.tr-progress-fill.is-final { background: var(--green); }

/* Live stats 3-col + card overrides */
.tr-live-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.record-stat-card--live { padding: 8px 6px; }
.record-stat-value--lg { font-size: 1.1rem; }

/* HR hit rows — live variant + day-detail variant */
.tr-hit-list { display: flex; flex-direction: column; gap: 2px; }
.tr-hit-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; background: rgba(16, 185, 129, 0.1); font-size: 0.82rem; }
.tr-hit-row--day { padding: 5px 8px; border-radius: 5px; background: rgba(16, 185, 129, 0.08); font-size: 0.78rem; margin-bottom: 3px; }
.tr-hr { color: var(--green); font-weight: 700; font-size: 0.9rem; }
.tr-hr--day { font-size: 0.82rem; min-width: 36px; }
.tr-hit-name { color: var(--green); font-weight: 600; }
.tr-spacer { flex: 1; }
.tr-meta { color: var(--text-muted); font-size: 0.72rem; }
.tr-meta--sm { color: var(--text-muted); font-size: 0.68rem; }
.tr-meta--day { color: var(--text-muted); font-size: 0.7rem; }
.tr-meta--day-sm { color: var(--text-muted); font-size: 0.66rem; }
.tr-toppick { font-size: 0.6rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; padding: 1px 6px; border-radius: 3px; background: rgba(245, 158, 11, 0.15); border: 1px solid rgba(245, 158, 11, 0.3); flex-shrink: 0; }
.tr-empty-inline { font-size: 0.78rem; color: var(--text-muted); text-align: center; padding: 8px 0; }

/* Live-pending rows */
.tr-pending-list { margin-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.tr-pending-row { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.2); font-size: 0.82rem; }
.tr-pending-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #ef4444; animation: pulse-dot 1.5s ease-in-out infinite; flex-shrink: 0; }
.tr-pending-hr { color: #ef4444; font-weight: 700; font-size: 0.9rem; }
.tr-pending-name { color: #ef4444; font-weight: 600; }
.tr-live-badge { color: #ef4444; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; background: rgba(239, 68, 68, 0.15); }

/* Overall stat-value color modifiers */
.record-stat-value--green { color: var(--green); }
.record-stat-value--secondary { color: var(--text-secondary); }
.record-stat-value--blue { color: var(--blue); }
.tr-gloss { margin-top: 12px; font-size: 0.7rem; color: var(--text-muted); text-align: center; font-style: italic; line-height: 1.5; padding: 0 8px; }

/* Best Day / Recent Days — expand rows + detail panels */
.tr-day-block { margin-bottom: 4px; }
.tr-day-row-head { display: flex; align-items: center; gap: 6px; }
.tr-caret { display: inline-block; transform: rotate(0deg); transition: transform 0.15s; color: var(--text-muted); font-size: 0.7rem; }
.tr-caret.is-open { transform: rotate(90deg); }
.record-day-row--best { border-left: 3px solid #818cf8; cursor: pointer; }
.record-day-row--clickable { cursor: pointer; }
.tr-day-badge-unverified { font-size: 0.65rem; color: var(--accent); margin-left: 2px; }
.tr-day-badge-verified { font-size: 0.65rem; color: var(--green); margin-left: 2px; }
.tr-day-detail { padding: 6px 10px 10px 22px; background: rgba(255, 255, 255, 0.02); border-radius: 6px; margin-top: 2px; }
.tr-day-hint { font-size: 0.75rem; color: var(--text-muted); padding: 6px 0; }
.tr-recent-scroll { max-height: 270px; overflow-y: auto; border-radius: 8px; }
