/* ============================================================================
   NBC Holiday Carts — js/holiday-carts-app.js (#holiday-carts-screen, Sales ▾).
   GSB Design System v3.2 "Quiet" (tokens in gsb-tokens.css): snow page, white panels, a pine band for the headline,
   square corners, fills not borders, tabular figures. One color per cart; ochre marks holidays; dashed ink = last
   season. Phone first: one column under 720px, the day-by-day chart scrolls inside its own box.
   ========================================================================= */

#holiday-carts-screen { font-family: var(--ds-font); color: var(--ds-fg); -webkit-font-smoothing: antialiased; }
#holiday-carts-screen *:not(svg):not(svg *) { font-family: var(--ds-font) !important; box-sizing: border-box; }
#holiday-carts-screen .nav-bar h2 {
  font-family: var(--font-body) !important; font-weight: 700 !important; font-size: 22px !important;
  letter-spacing: -0.04em !important; color: var(--gsb-soil-ink) !important; display: flex; align-items: baseline; gap: 2px; margin: 0;
}
#holiday-carts-screen .nav-bar h2 .gsb-title-dot { color: var(--gsb-leaf); }
#holiday-carts-screen .nav-bar h2 .gsb-kw { background: linear-gradient(transparent 58%, rgba(130, 187, 144, 0.50) 58%) !important; padding: 0 2px; }
#holiday-carts-screen .hc-tagline { font-size: 13px; color: var(--ds-muted); }

#holiday-carts-root { padding: 8px 24px 56px; max-width: 1400px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; font-variant-numeric: tabular-nums; }
#holiday-carts-root > *, .hc-grid > * { min-width: 0; }
.hc-grid { display: grid; gap: 14px; }
.hc-two { grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr); }
.hc-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 999px) { .hc-two, .hc-three { grid-template-columns: minmax(0, 1fr); } }

.hc-panel { background: #fff; padding: 16px; }
.hc-ph { margin: 0 0 10px; }
.hc-ph h3 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; color: var(--ds-fg); }
.hc-ph p { margin: 2px 0 0; font-size: 12.5px; color: var(--ds-muted); line-height: 1.4; }
.hc-empty { font-size: 13px; color: var(--ds-muted); margin: 6px 0; }
.muted { color: var(--ds-muted); }
.up { color: #3E6348; font-weight: 600; } .dn { color: #9A4423; font-weight: 600; }
.hc-svg { display: block; max-width: none; overflow: visible; }
.hc-svg text { font-family: var(--ds-font); font-variant-numeric: tabular-nums; }
.hc-ax { font-size: 10.5px; fill: rgba(26, 30, 27, .55); }
.hc-ax-strong { font-size: 11px; font-weight: 650; fill: var(--ds-fg); }

/* loading */
.hc-loading { display: flex; gap: 6px; padding: 40px 0; justify-content: center; }
.hc-loading span { width: 8px; height: 8px; background: var(--ds-moss); animation: hc-pulse 1s infinite ease-in-out; }
.hc-loading span:nth-child(2) { animation-delay: .15s; } .hc-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes hc-pulse { 0%, 100% { opacity: .2; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }

/* ── hero band ─────────────────────────────────────────────────────────── */
.hc-hero { background: var(--ds-pine); color: #F6F7F3; padding: 22px 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 22px 32px; position: relative; overflow: hidden; }
.hc-hero::after { /* a soft glow behind the big number */
  content: ""; position: absolute; left: -80px; top: -120px; width: 420px; height: 320px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(130, 187, 144, .22), transparent); }
.hc-hero > * { position: relative; z-index: 1; min-width: 0; }
.hc-eyebrow { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ds-muted-pine); display: flex; align-items: center; gap: 8px; }
.hc-dot { width: 8px; height: 8px; background: var(--ds-leaf); box-shadow: 0 0 0 0 rgba(130, 187, 144, .7); animation: hc-live 2.2s infinite; }
@keyframes hc-live { 0% { box-shadow: 0 0 0 0 rgba(130, 187, 144, .6); } 70% { box-shadow: 0 0 0 8px rgba(130, 187, 144, 0); } 100% { box-shadow: 0 0 0 0 rgba(130, 187, 144, 0); } }
@media (prefers-reduced-motion: reduce) { .hc-dot, .hc-loading span, .hc-chip.live b { animation: none !important; } }
.hc-big { font-size: 54px; font-weight: 650; letter-spacing: -0.035em; line-height: 1.02; margin: 8px 0 4px; }
.hc-hero-sub { font-size: 13px; color: var(--ds-muted-pine); }
.hc-season { margin-top: 16px; }
.hc-season-bar { position: relative; height: 8px; background: rgba(246, 247, 243, .12); }
.hc-season-bar b { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--ds-moss), var(--ds-leaf)); }
.hc-season-bar i { position: absolute; top: -3px; width: 2px; height: 14px; margin-left: -1px; background: var(--ds-ochre); }
.hc-season-cap { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 11.5px; color: var(--ds-muted-pine); }

.hc-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(246, 247, 243, .10); align-self: stretch; }
.hc-kpi { background: var(--ds-pine); padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hc-kpis .hc-kpi:not(.hc-kpi-wide) { background: rgba(28, 51, 38, 1); }
.hc-kpi .k { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-muted-pine); }
.hc-kpi .v { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; }
.hc-kpi .v small { font-size: 12px; font-weight: 500; color: var(--ds-muted-pine); letter-spacing: 0; }
.hc-kpi .s { font-size: 12px; color: var(--ds-muted-pine); line-height: 1.35; }
.hc-kpi .s b { color: #F6F7F3; }
.hc-kpi .up { color: #B3DDBE; } .hc-kpi .dn { color: #F4B79D; }
.hc-kpi-wide { grid-column: 1 / -1; }
.hc-ly-bar { height: 6px; background: rgba(246, 247, 243, .12); margin: 6px 0 4px; }
.hc-ly-bar b { display: block; height: 100%; background: var(--ds-leaf); }

/* ── cart chips ────────────────────────────────────────────────────────── */
.hc-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 1px; }
.hc-chips::-webkit-scrollbar { display: none; }
.hc-chips button { flex: none; display: inline-flex; align-items: center; gap: 7px; border: 0; background: #fff; color: var(--ds-fg-2); font: inherit; font-size: 13px; padding: 8px 14px; min-height: 38px; cursor: pointer; border-radius: 0; box-shadow: inset 0 0 0 1px var(--ds-rule); }
.hc-chips button i { width: 10px; height: 10px; display: inline-block; }
.hc-chips button em { font-style: normal; font-size: 11px; color: var(--ds-ochre); }
.hc-chips button[aria-pressed="true"] { background: var(--ds-pine); color: #F6F7F3; box-shadow: none; font-weight: 600; }
.hc-chips button[aria-pressed="true"] em { color: #E8C67A; }
.hc-chips button:focus-visible, .hc-card:focus-visible, .hc-lb-row:focus-visible, .hc-cal-cell:focus-visible { outline: 2px solid var(--ds-moss); outline-offset: 2px; }

/* ── legend ────────────────────────────────────────────────────────────── */
.hc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: var(--ds-muted); }
.hc-legend.small { font-size: 11.5px; margin-top: 6px; }
.hc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hc-legend .sw { width: 14px; height: 10px; display: inline-block; }
.hc-legend .sw.dash { height: 0; border-top: 2px dashed rgba(26, 30, 27, .55); }
.hc-legend .sw.dot { height: 0; border-top: 2px dotted var(--ds-moss); }
.hc-legend .sw.hol { width: 2px; height: 12px; background: var(--ds-ochre); }
.hc-legend .sw.holb { box-shadow: inset 0 0 0 2px var(--ds-ochre); background: #fff; }

/* ── leaderboard ───────────────────────────────────────────────────────── */
.hc-lb { display: grid; gap: 4px; }
.hc-lb-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "rank name v" "rank bar s"; gap: 3px 10px; align-items: center; text-align: left; border: 0; background: var(--ds-snow); padding: 10px 12px; font: inherit; color: inherit; cursor: pointer; border-radius: 0; }
.hc-lb-row:hover { background: var(--ds-frost); }
.hc-lb-row.on { background: var(--ds-frost); box-shadow: inset 3px 0 0 var(--ds-moss); }
.hc-lb-rank { grid-area: rank; font-size: 18px; font-weight: 650; color: var(--ds-fg-3); }
.hc-lb-name { grid-area: name; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; min-width: 0; }
.hc-lb-name i { width: 10px; height: 10px; flex: none; }
.hc-lb-bar { grid-area: bar; height: 6px; background: var(--ds-frost); }
.hc-lb-bar b { display: block; height: 100%; }
.hc-lb-v { grid-area: v; font-size: 15px; font-weight: 650; text-align: right; }
.hc-lb-v em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--ds-ochre); }
.hc-lb-s { grid-area: s; font-size: 11.5px; color: var(--ds-muted); text-align: right; white-space: nowrap; }
.hc-lb-ly { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; font-size: 12.5px; color: var(--ds-muted); }
.hc-lb-ly .k { width: 100%; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-fg-3); }
.hc-lb-ly span { background: var(--ds-snow); padding: 4px 8px; }
.hc-lb-ly b { color: var(--ds-fg); font-weight: 600; }

/* ── day by day ────────────────────────────────────────────────────────── */
.hc-scrollbox { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.hc-day { cursor: pointer; outline: none; }
.hc-day:hover rect:not(.hc-hit) { filter: brightness(1.08); }
.hc-readout { margin-top: 10px; background: var(--ds-snow); padding: 10px 12px; display: grid; gap: 4px; min-height: 76px; }
.hc-ro-d { font-size: 13px; }
.hc-ro-d em { font-style: normal; font-size: 12px; color: #7E5A1A; background: rgba(185, 139, 50, .15); padding: 1px 6px; margin-left: 4px; }
.hc-ro-v .big { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; margin-right: 6px; }
.hc-ro-v { font-size: 12.5px; }
.hc-ro-parts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ds-fg-2); }
.hc-ro-c { display: inline-flex; align-items: center; gap: 6px; }
.hc-ro-c i { width: 9px; height: 9px; display: inline-block; }
.hc-ro-c.ly { color: var(--ds-muted); }
.hc-ro-c.ly::before { content: ""; width: 12px; border-top: 2px dashed rgba(26, 30, 27, .5); }

/* ── cart cards ────────────────────────────────────────────────────────── */
.hc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.hc-card { background: #fff; padding: 16px; display: flex; flex-direction: column; gap: 10px; border-top: 4px solid var(--cc); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.hc-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px -16px rgba(26, 30, 27, .45); }
.hc-card-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hc-card h4 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.hc-card h4 i { width: 10px; height: 10px; background: var(--cc); }
.hc-chip { font-size: 11px; padding: 3px 8px; background: var(--ds-frost); color: var(--ds-fg-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.hc-chip.live { background: var(--ds-up-bg); color: var(--ds-up-fg); }
.hc-chip.live b { width: 6px; height: 6px; background: var(--ds-moss); animation: hc-live 2.2s infinite; }
.hc-chip.warn { background: rgba(185, 139, 50, .15); color: #7E5A1A; }
.hc-card-big { font-size: 30px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.05; }
.hc-card-big small { display: block; font-size: 12px; font-weight: 500; color: var(--ds-muted); letter-spacing: 0; margin-top: 3px; }
.hc-spark { width: 100%; height: 46px; display: block; }
.hc-card-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--ds-rule); margin: 0; }
.hc-card-stats > div { background: #fff; padding: 7px 8px 7px 0; }
.hc-card-stats > div:nth-child(even) { padding-left: 10px; }
.hc-card-stats dt { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-fg-3); }
.hc-card-stats dd { margin: 2px 0 0; font-size: 15px; font-weight: 650; }
.hc-card-stats dd.txt { font-size: 13.5px; line-height: 1.25; }
.hc-card-stats dd small { display: block; font-size: 11px; font-weight: 500; color: var(--ds-muted); }
.hc-card-f { font-size: 12px; color: var(--ds-muted); line-height: 1.4; }
.hc-card-f b { color: var(--ds-fg); }
.hc-card.pending { cursor: default; border-top-style: dashed; background: repeating-linear-gradient(135deg, #fff, #fff 10px, var(--ds-snow) 10px, var(--ds-snow) 20px); }
.hc-card.pending:hover { transform: none; box-shadow: none; }
.hc-pend-art { color: var(--ds-sage); }
.hc-pend { font-size: 13px; color: var(--ds-fg-2); margin: 0; line-height: 1.45; }

/* ── calendar ──────────────────────────────────────────────────────────── */
.hc-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.hc-cal-h { font-size: 10.5px; color: var(--ds-fg-3); text-align: center; padding-bottom: 2px; }
.hc-cal-cell { aspect-ratio: 1 / 0.82; background: var(--ds-frost); display: flex; flex-direction: column; justify-content: space-between; padding: 3px 4px; min-width: 0; cursor: pointer; position: relative; outline: none; }
.hc-cal-cell.pad { background: transparent; cursor: default; }
.hc-cal-cell em { font-style: normal; font-size: 10px; color: var(--ds-fg-3); }
.hc-cal-cell b { font-size: 10.5px; font-weight: 650; color: var(--ds-fg); white-space: nowrap; overflow: hidden; text-overflow: clip; }
.hc-cal-cell.dark em, .hc-cal-cell.dark b { color: #F6F7F3; }
.hc-cal-cell.fut { background: repeating-linear-gradient(135deg, var(--ds-snow), var(--ds-snow) 4px, #fff 4px, #fff 8px); }
.hc-cal-cell.hol { box-shadow: inset 0 0 0 2px var(--ds-ochre); }
.hc-cal-cell.today::after { content: ""; position: absolute; right: 3px; top: 3px; width: 6px; height: 6px; background: var(--ds-leaf); }
.hc-cal-cell.sel { box-shadow: inset 0 0 0 2px var(--ds-ink); }

/* ── flavors + price ───────────────────────────────────────────────────── */
.hc-flav { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hc-flav li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 12.5px; }
.hc-flav .n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ds-fg-2); }
.hc-flav .b { position: relative; height: 12px; background: var(--ds-snow); }
.hc-flav .b b { display: block; height: 100%; background: var(--ds-moss); }
.hc-flav .b i { position: absolute; top: -3px; width: 2px; height: 18px; margin-left: -1px; background: var(--ds-ink); opacity: .55; }
.hc-flav .v { font-weight: 650; text-align: right; white-space: nowrap; }
.hc-flav .v small { font-weight: 500; color: var(--ds-muted); margin-left: 5px; }
.hc-price { margin-top: 14px; }
.hc-price .k, .hc-wd .k { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-fg-3); margin-bottom: 6px; }
.hc-price-bar { display: flex; height: 14px; background: var(--ds-snow); }
.hc-price-bar b { display: block; height: 100%; }

/* ── weekdays ──────────────────────────────────────────────────────────── */
.hc-wd { margin-top: 14px; }
.hc-wd-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.hc-wd-c { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.hc-wd-bar { position: relative; width: 100%; height: 64px; background: var(--ds-snow); display: flex; align-items: flex-end; }
.hc-wd-bar b { display: block; width: 100%; background: var(--ds-moss); }
.hc-wd-bar i { position: absolute; left: 10%; right: 10%; height: 0; border-top: 2px dashed rgba(26, 30, 27, .55); }
.hc-wd-v { font-size: 11px; font-weight: 650; }
.hc-wd-n { font-size: 10.5px; color: var(--ds-fg-3); }

/* ── events ────────────────────────────────────────────────────────────── */
.hc-ev { display: grid; gap: 2px; }
.hc-ev-r { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto auto; gap: 12px; align-items: baseline; font-size: 13px; padding: 7px 10px; background: var(--ds-snow); }
.hc-ev-r .d { color: var(--ds-muted); white-space: nowrap; }
.hc-ev-r .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc-ev-r .q { color: var(--ds-muted); font-size: 12px; white-space: nowrap; }
.hc-ev-r .v { font-weight: 650; text-align: right; }

.hc-foot { font-size: 12px; color: var(--ds-muted); line-height: 1.5; margin: 0; max-width: 980px; }

/* ── phone ─────────────────────────────────────────────────────────────── */
@media (max-width: 719px) {
  /* main already pads the page 24px a side on a phone; the tab adds nothing more */
  #holiday-carts-root { padding: 4px 0 72px; gap: 12px; }
  #holiday-carts-screen .nav-bar { padding-left: 0 !important; padding-right: 0 !important; }
  #holiday-carts-screen .hc-tagline { display: none; }
  .hc-hero { grid-template-columns: minmax(0, 1fr); padding: 16px 14px; gap: 14px; }
  .hc-big { font-size: 42px; margin-top: 6px; }
  .hc-season { margin-top: 12px; }
  .hc-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hc-kpi { padding: 8px 9px; }
  .hc-kpi .k { font-size: 9.5px; letter-spacing: .04em; }
  .hc-kpi .v { font-size: 18px; }
  .hc-kpi .s { font-size: 11px; }
  .hc-kpi-wide .v { font-size: 20px; }
  .hc-panel { padding: 14px 12px; }
  .hc-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .hc-card-big { font-size: 28px; }
  .hc-ev-r { grid-template-columns: 74px minmax(0, 1fr) auto; gap: 8px; }
  .hc-ev-r .q { display: none; }
  .hc-cal-cell b { font-size: 9.5px; }
}
@media (max-width: 380px) {
  .hc-big { font-size: 38px; }
  .hc-cal-cell b { display: none; }
}
