/* World Cup Price Tracker — layout + cards + chart styles.
 * Self-contained: no dependency on the global site stylesheet so the
 * tracker renders the same regardless of which theme is active.
 *
 * SCOPING NOTE: this file used to back an iframe'd standalone page, so a
 * bare `body {}` + `* {}` reset was safe. The tracker now renders INLINE
 * on host pages (e.g. the world-cup vibe's modal), where those bare rules
 * would restyle the whole host page (font, colour, background, box-sizing).
 * So the reset/typography is scoped to the tracker's own subtrees instead.
 */

/* Box-sizing reset — scoped to the tracker page + its ticket-preview modal
 * so we never touch the host page's box model. */
.wcpt-page, .wcpt-page *,
.wcpt-modal-backdrop, .wcpt-modal-backdrop * { box-sizing: border-box; }

.wcpt-page {
   max-width: 1200px;
   margin: 0 auto;
   padding: 32px 24px 64px;
   /* Typography previously lived on a bare `body {}` rule (safe in the old
    * iframe, but it leaked onto host pages). Carried by the tracker root
    * now so both the standalone page and the inline modal still get it. */
   font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                'Helvetica Neue', Arial, sans-serif;
   color: #1a1a1a;
   line-height: 1.4;
}

/* Standalone dedicated page only (preview.php / a renderInline page sets
 * .wcpt-standalone on <body>). Restores the full-bleed gray background +
 * zero body margin the iframe page had — without leaking onto host pages
 * that merely embed the tracker inline. */
body.wcpt-standalone { margin: 0; background: #f4f6f8; }

/* Embed mode — when loaded inside an iframe (e.g. from the World Cup
 * tickets page modal), drop the outer page padding and slim the header
 * so the tracker uses every available pixel of modal real-estate. The
 * host page already shows a "Price Tracker" title above the iframe so
 * we hide our own duplicate eyebrow/picker via PHP. We also tighten the
 * chart + stat-card chrome and shrink the chart canvas so the top of
 * the Marquee Picks section peeks above the fold on first paint. */
.wcpt-embed { background: #f4f6f8; }
.wcpt-embed .wcpt-page {
   padding: 14px 18px 20px;
}
.wcpt-embed .wcpt-header { margin-bottom: 12px; }
.wcpt-embed .wcpt-header h1 { font-size: 22px; margin-bottom: 2px; }
.wcpt-embed .wcpt-subtitle { font-size: 13px; }

/* Compact stat cards — drop ~30% of vertical padding so the row fits
 * tighter. Numeric value stays the same size; foot text gets a touch
 * smaller. */
.wcpt-embed .wcpt-stat-grid { gap: 12px; margin-bottom: 12px; }
.wcpt-embed .wcpt-stat-card { padding: 12px 14px; }
.wcpt-embed .wcpt-stat-label { margin-bottom: 4px; }
.wcpt-embed .wcpt-stat-value { font-size: 22px; margin-bottom: 4px; }

/* Shrink chart wrap from 380 → 260 so the marquee section starts ~120px
 * earlier; users see a strip of the first marquee picks on first paint
 * and have an obvious affordance to scroll for more. */
.wcpt-embed .wcpt-chart-section { padding: 14px 16px; margin-bottom: 12px; }
.wcpt-embed .wcpt-chart-header { margin-bottom: 10px; }
.wcpt-embed .wcpt-chart-title { font-size: 15px; }
.wcpt-embed .wcpt-chart-sub { font-size: 11px; }
.wcpt-embed .wcpt-chart-wrap { height: 260px; }

/* Compact marquee header so the first card row rises further up. */
.wcpt-embed .wcpt-marquee-section { padding: 14px 16px; }
.wcpt-embed .wcpt-marquee-header { margin-bottom: 12px; }
.wcpt-embed .wcpt-marquee-title { font-size: 15px; }
.wcpt-embed .wcpt-marquee-sub { font-size: 11px; }
.wcpt-embed .wcpt-pick-photo { height: 130px; }

/* Event tab strip — replaces the <select> in embed mode with rounded-
 * pill buttons preceded by a "N matches · pick one" header label so
 * the selector affordance is unmistakable. Chip rail scrolls
 * horizontally when there are more matches than fit; edge fades + side
 * arrow buttons surface only when the rail overflows (toggled by
 * price-tracker.js via .wcpt-can-scroll-left / .wcpt-can-scroll-right
 * on the wrap). */
.wcpt-event-tabs-wrap {
   margin: 10px 0 0;
}
.wcpt-event-tabs-header {
   display: flex;
   align-items: baseline;
   gap: 8px;
   margin-bottom: 6px;
   font-size: 12px;
   line-height: 1.2;
}
.wcpt-event-tabs-count {
   font-weight: 800;
   color: #12305c;
   letter-spacing: 0.3px;
   text-transform: uppercase;
}
.wcpt-event-tabs-hint {
   color: #6c757d;
   font-weight: 500;
}
.wcpt-event-tabs-rail {
   position: relative;
}
/* Edge fades hint at offscreen chips. Both are present in the DOM and
 * default to 0 opacity; the wrap class toggles them visible. */
.wcpt-event-tabs-rail::before,
.wcpt-event-tabs-rail::after {
   content: '';
   position: absolute;
   top: 0;
   bottom: 0;
   width: 28px;
   pointer-events: none;
   opacity: 0;
   transition: opacity 0.15s ease;
   z-index: 1;
}
.wcpt-event-tabs-rail::before {
   left: 0;
   background: linear-gradient(to right, #fff 30%, rgba(255,255,255,0));
}
.wcpt-event-tabs-rail::after {
   right: 0;
   background: linear-gradient(to left, #fff 30%, rgba(255,255,255,0));
}
.wcpt-event-tabs-wrap.wcpt-can-scroll-left  .wcpt-event-tabs-rail::before { opacity: 1; }
.wcpt-event-tabs-wrap.wcpt-can-scroll-right .wcpt-event-tabs-rail::after  { opacity: 1; }

/* Arrow buttons — same visibility gate as the fades. Sit on top of the
 * gradient so the user can actually click through. */
.wcpt-event-tabs-arrow {
   position: absolute;
   top: 50%;
   transform: translateY(-50%);
   z-index: 2;
   width: 26px;
   height: 26px;
   padding: 0;
   border: 1px solid #d6dde5;
   background: #fff;
   border-radius: 50%;
   font-size: 18px;
   line-height: 22px;
   font-weight: 700;
   color: #12305c;
   cursor: pointer;
   box-shadow: 0 2px 6px rgba(0,0,0,0.10);
   opacity: 0;
   pointer-events: none;
   transition: opacity 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.wcpt-event-tabs-arrow:hover { background: #f4f7fb; }
.wcpt-event-tabs-arrow-left  { left: -4px; }
.wcpt-event-tabs-arrow-right { right: -4px; }
.wcpt-event-tabs-wrap.wcpt-can-scroll-left  .wcpt-event-tabs-arrow-left,
.wcpt-event-tabs-wrap.wcpt-can-scroll-right .wcpt-event-tabs-arrow-right {
   opacity: 1;
   pointer-events: auto;
}

.wcpt-event-tabs {
   display: flex;
   gap: 8px;
   margin: 0;
   padding: 2px;
   overflow-x: auto;
   -webkit-overflow-scrolling: touch; /* momentum swipe-scroll on iOS */
   scroll-behavior: smooth;
   scrollbar-width: none; /* Firefox */
}
.wcpt-event-tabs::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.wcpt-event-chip {
   flex: 0 0 auto;
   min-width: 0;
   display: flex;
   flex-direction: column;
   align-items: flex-start;
   gap: 2px;
   padding: 8px 14px;
   background: #fff;
   border: 1.5px solid #d6dde5;
   border-radius: 999px;
   font-family: inherit;
   text-align: left;
   cursor: pointer;
   transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}
.wcpt-event-chip:hover {
   border-color: #1e88e5;
   background: #f4faff;
}
.wcpt-event-chip.is-active {
   background: #12305c;
   border-color: #12305c;
   box-shadow: 0 2px 8px rgba(18, 48, 92, 0.22);
}
.wcpt-event-chip.is-active .wcpt-chip-label { color: #fff; font-weight: 700; }
.wcpt-event-chip.is-active .wcpt-chip-date  { color: rgba(255, 255, 255, 0.85); }

.wcpt-chip-date {
   font-size: 10px;
   font-weight: 800;
   letter-spacing: 0.6px;
   text-transform: uppercase;
   color: #1e88e5;
   line-height: 1.1;
}

.wcpt-chip-label {
   font-size: 12px;
   font-weight: 600;
   color: #2d3e54;
   line-height: 1.25;
   /* one-line clamp with ellipsis if the matchup is unusually long */
   max-width: 180px;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
}

/* Embed mode keeps the original top-to-bottom stack — header / stats /
 * chart / marquee — same flow operators see on the full-page tracker,
 * just with tighter chrome so it sits comfortably in the modal. The
 * earlier split-pane experiment was reverted on operator feedback. */
.wcpt-embed .wcpt-stat-grid {
   grid-template-columns: repeat(4, minmax(0, 1fr));
   gap: 10px;
}
.wcpt-embed .wcpt-chart-wrap { height: 280px; }

/* ── Header ─────────────────────────────────────────────────────────── */

.wcpt-header {
   margin-bottom: 28px;
}
.wcpt-eyebrow {
   font-size: 11px;
   font-weight: 700;
   letter-spacing: 1.2px;
   color: #6c757d;
   margin-bottom: 8px;
}
.wcpt-header h1 {
   margin: 0 0 4px;
   font-size: 28px;
   font-weight: 700;
   color: #12305C;
}
.wcpt-subtitle {
   color: #6c757d;
   font-size: 15px;
   margin-bottom: 16px;
}
.wcpt-event-picker {
   display: flex;
   align-items: center;
   gap: 10px;
   font-size: 13px;
}
.wcpt-event-picker label {
   color: #6c757d;
   font-weight: 600;
}
.wcpt-event-picker select {
   padding: 6px 10px;
   border: 1px solid #d0d7de;
   border-radius: 6px;
   background: #fff;
   font-size: 13px;
   color: #1a1a1a;
   min-width: 280px;
   cursor: pointer;
}
.wcpt-event-picker select:focus {
   outline: 2px solid #1e88e5;
   outline-offset: 1px;
   border-color: #1e88e5;
}

/* ── Stat cards ─────────────────────────────────────────────────────── */

.wcpt-stat-grid {
   display: grid;
   grid-template-columns: repeat(4, 1fr);
   gap: 16px;
   margin-bottom: 18px;
}
@media (max-width: 900px) {
   .wcpt-stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
   .wcpt-stat-grid { grid-template-columns: 1fr; }
}

.wcpt-stat-card {
   background: #fff;
   border: 1px solid #e3e6ea;
   border-radius: 10px;
   padding: 18px 20px;
   box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.wcpt-stat-card-muted {
   background: #f8f9fa;
   color: #6c757d;
}
.wcpt-stat-label {
   font-size: 13px;
   color: #6c757d;
   font-weight: 600;
   margin-bottom: 8px;
}
.wcpt-stat-value {
   font-size: 26px;
   font-weight: 700;
   color: #1a1a1a;
   margin-bottom: 8px;
   line-height: 1.1;
}
.wcpt-stat-foot {
   font-size: 13px;
   color: #6c757d;
}
.wcpt-stat-muted   { color: #adb5bd; }
.wcpt-stat-up      { color: #2e7d32; }
.wcpt-stat-down    { color: #c62828; }

/* Stat-card composite values — used for Ticket Inventory (47 tickets)
 * and Match Popularity (2 / 82). Big number stays prominent, suffix
 * sits next to it at smaller weight. Hot popularity is signalled by the
 * flame icon only; the rank number itself stays default black so it
 * doesn't visually compete with the rest of the card. */
.wcpt-stat-big {
   font-size: 26px;
   font-weight: 700;
   color: #1a1a1a;
}
.wcpt-stat-suffix {
   font-size: 14px;
   font-weight: 500;
   color: #6c757d;
}
.wcpt-pop-hot {
   font-size: 20px;
   margin-left: 4px;
   vertical-align: -2px;
}

/* Countdown digits inside a stat card. */
.wcpt-stat-countdown {
   display: flex;
   gap: 12px;
   align-items: baseline;
   flex-wrap: wrap;
   font-size: 20px;
}
.wcpt-cd-num {
   font-size: 22px;
   font-weight: 700;
   font-variant-numeric: tabular-nums;
   color: #1a1a1a;
}
.wcpt-cd-unit {
   font-size: 11px;
   color: #6c757d;
   margin-left: -8px;
   margin-right: 2px;
   font-weight: 500;
}

/* ── Note banner ─────────────────────────────────────────────────────── */

.wcpt-note {
   background: #fff5f5;
   border: 1px solid #ffd1d1;
   color: #8a3a3a;
   padding: 10px 14px;
   border-radius: 6px;
   font-size: 12px;
   margin: 18px 0 24px;
}

/* ── Ticket preview modal ───────────────────────────────────────────── */

body.wcpt-modal-open { overflow: hidden; }

.wcpt-modal-backdrop {
   position: fixed;
   inset: 0;
   background: rgba(18, 48, 92, 0.55);
   z-index: 9999;
   display: flex;
   align-items: center;
   justify-content: center;
   padding: 24px;
   backdrop-filter: blur(2px);
}
.wcpt-modal-backdrop[hidden] { display: none; }

.wcpt-modal-panel {
   background: #fff;
   border-radius: 12px;
   max-width: 880px;
   width: 100%;
   max-height: calc(100vh - 48px);
   overflow: hidden;
   display: grid;
   grid-template-columns: 1fr 1fr;
   position: relative;
   box-shadow: 0 30px 60px rgba(0,0,0,0.25);
}
@media (max-width: 720px) {
   .wcpt-modal-panel { grid-template-columns: 1fr; max-height: 95vh; overflow-y: auto; }
   /* Event tabs on mobile: the rail must stay inside the modal and the chips
    * swipe-scroll. Hide the scroll arrows — they sit at left/right:-4px and
    * would poke past the modal edge, and touch users scroll by swiping. The
    * min-width:0 / max-width keep the rail from blowing the modal out when it
    * sits inside a flex column. */
   .wcpt-event-tabs-wrap,
   .wcpt-event-tabs-rail { min-width: 0; max-width: 100%; }
   .wcpt-event-tabs-arrow { display: none; }
}

.wcpt-modal-close {
   position: absolute;
   top: 10px;
   right: 12px;
   z-index: 2;
   background: rgba(255,255,255,0.92);
   border: none;
   width: 32px;
   height: 32px;
   border-radius: 50%;
   font-size: 22px;
   line-height: 1;
   font-weight: 700;
   color: #333;
   cursor: pointer;
   box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.wcpt-modal-close:hover { background: #fff; }

.wcpt-modal-gallery {
   background: #eef2f5;
   display: flex;
   flex-direction: column;
   min-height: 280px;
}
.wcpt-modal-photo-main {
   flex: 1;
   background: #eef2f5;
   min-height: 280px;
   position: relative;
   overflow: hidden;
}
.wcpt-modal-photo-main img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   display: block;
}
.wcpt-modal-photo-main img.wcpt-img-error { display: none; }
/* Photo-unavailable empty state — soft blue gradient + camera-off icon
 * + headline / sub. Different look from the surrounding grey gallery so
 * the user reads "no photo for this section" instead of "still loading". */
.wcpt-modal-photo-fallback {
   position: absolute;
   inset: 0;
   display: none;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   gap: 4px;
   padding: 24px 20px;
   text-align: center;
   background: linear-gradient(180deg, #eef4fa 0%, #dde9f4 100%);
}
.wcpt-modal-photo-main img.wcpt-img-error ~ .wcpt-modal-photo-fallback {
   display: flex;
}
/* The fallback now hosts the matchup flag graphic (same markup as the
 * marquee cards), which brings its own gradient + centering — let it
 * fill the gallery area instead of sitting as a fixed-height card tile. */
.wcpt-modal-photo-fallback { padding: 0; }
.wcpt-modal-photo-fallback .wcpt-pick-photo {
   width: 100%;
   height: 100%;
}
.wcpt-fallback-icon {
   color: #7e96b3;
   margin-bottom: 6px;
   flex-shrink: 0;
}
.wcpt-fallback-title {
   font-size: 14px;
   font-weight: 700;
   color: #2d3e54;
}
.wcpt-fallback-sub {
   font-size: 12px;
   color: #6c7d92;
   max-width: 260px;
   line-height: 1.45;
   font-style: italic;
}
.wcpt-modal-thumbs {
   display: flex;
   gap: 4px;
   padding: 4px;
   overflow-x: auto;
   background: #f8f9fa;
}
.wcpt-modal-thumb {
   flex: 0 0 60px;
   height: 50px;
   border-radius: 4px;
   border: 2px solid transparent;
   background: #eee center / cover no-repeat;
   cursor: pointer;
}
.wcpt-modal-thumb.active { border-color: #1e88e5; }
.wcpt-modal-thumbs:empty { display: none; }

.wcpt-modal-body {
   padding: 28px 28px 24px;
   display: flex;
   flex-direction: column;
   gap: 10px;
   overflow-y: auto;
}
.wcpt-modal-eyebrow {
   font-size: 11px;
   font-weight: 800;
   text-transform: uppercase;
   letter-spacing: 1px;
   color: #ea4991;
}
.wcpt-modal-title {
   margin: 0;
   font-size: 22px;
   font-weight: 700;
   color: #12305c;
   line-height: 1.2;
}
.wcpt-modal-loc { font-size: 13px; color: #495057; }
.wcpt-modal-pills { display: flex; gap: 4px; flex-wrap: wrap; }
.wcpt-modal-why {
   font-size: 13px;
   color: #6c757d;
   line-height: 1.5;
   margin: 4px 0;
}
.wcpt-modal-price-block {
   margin-top: 8px;
   padding-top: 14px;
   border-top: 1px dashed #e9ecef;
}
.wcpt-modal-price {
   font-size: 28px;
   font-weight: 800;
   color: #12305c;
}
.wcpt-modal-price .wcpt-pick-each {
   font-size: 12px;
   font-weight: 500;
   color: #6c757d;
   margin-left: 2px;
}
.wcpt-modal-price-foot {
   font-size: 11px;
   color: #6c757d;
   margin-top: 2px;
}
.wcpt-modal-qty-block {
   margin-top: 12px;
}
.wcpt-modal-qty-block[hidden] { display: none; }
.wcpt-modal-qty-label {
   font-size: 12px;
   font-weight: 700;
   color: #6c757d;
   text-transform: uppercase;
   letter-spacing: 0.6px;
   margin-bottom: 6px;
}
.wcpt-modal-qty-options {
   display: flex;
   gap: 6px;
}
.wcpt-modal-qty-btn {
   flex: 1;
   border: 2px solid #d0d7de;
   background: #fff;
   color: #495057;
   font-size: 14px;
   font-weight: 700;
   padding: 10px 0;
   border-radius: 6px;
   cursor: pointer;
   transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.wcpt-modal-qty-btn:hover { border-color: #1e88e5; color: #12305c; }
/* Selector boosted to button.…active so it beats the global btn-ghost on the
 * modal (where these are data-is="btn" btn-s btn-ghost). Fallback colour for
 * the standalone page where --color-brand isn't loaded. */
button.wcpt-modal-qty-btn.active {
   border-color: var(--color-brand, #1e88e5);
   background: var(--color-brand, #1e88e5);
   color: #fff;
}

.wcpt-modal-cta {
   display: block;
   width: 100%;
   margin-top: 14px;
   background: #1e88e5;
   color: #fff;
   text-align: center;
   padding: 14px 20px;
   border-radius: 8px;
   text-decoration: none;
   font-weight: 700;
   font-size: 15px;
   letter-spacing: 0.3px;
   transition: background 0.15s ease;
}
.wcpt-modal-cta:hover { background: #12305c; }
/* ── Marquee picks ──────────────────────────────────────────────────── */

.wcpt-marquee-section {
   background: #fff;
   border: 1px solid #e3e6ea;
   border-radius: 10px;
   padding: 20px;
   box-shadow: 0 1px 2px rgba(0,0,0,0.03);
   margin-bottom: 18px;
}
.wcpt-marquee-header {
   display: flex;
   justify-content: space-between;
   align-items: flex-end;
   gap: 16px;
   margin-bottom: 18px;
   flex-wrap: wrap;
}
.wcpt-marquee-title {
   font-size: 18px;
   font-weight: 700;
   color: #1a1a1a;
}
.wcpt-marquee-sub {
   color: #6c757d;
   font-size: 13px;
   max-width: 520px;
}
.wcpt-marquee-meta {
   display: flex;
   align-items: center;
   gap: 14px;
   color: #6c757d;
   font-size: 13px;
   font-weight: 600;
   flex-wrap: wrap;
   justify-content: flex-end;
}
.wcpt-shop-all-btn {
   display: inline-block;
   background: #12305c;
   color: #fff;
   text-decoration: none;
   padding: 9px 18px;
   border-radius: 6px;
   font-weight: 700;
   font-size: 13px;
   letter-spacing: 0.3px;
   transition: background 0.15s ease, transform 0.12s ease;
}
.wcpt-shop-all-btn:hover {
   background: #1e4f8a;
   transform: translateY(-1px);
}
/* Centre the label. On the world-cup page this is a global [data-is="btn"]
 * (brand-blue) button; its fixed height + line-height centering can leave
 * the text off because box-sizing:border-box (from .wcpt-page *) changes how
 * that height resolves. inline-flex centring is robust either way. The
 * .wcpt-marquee-meta prefix lifts specificity above the global btn's
 * display:inline-block so this actually applies. */
.wcpt-marquee-meta .wcpt-shop-all-btn {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   line-height: 1;
}

/* Primary buy-tickets CTA — sits between stat cards and the chart.
   Warm amber gradient so it stands out against the navy/grey of the
   surrounding cards without going neon. Lower #wcpt-shop-all keeps the
   navy treatment as a secondary attempt. */
/* Primary CTA — built on the global "spotlight" pattern, but recoloured to
 * the solid brand blue used by .sa-cp-cta (white text). These overrides win
 * over the pattern because this file loads after base-styles. The icon sits
 * inline with the title, and the details slot holds the matchup flags. */
.wcpt-cta-shop {
   margin: 0 0 18px;
}

/* Desktop: the CTA sits to the RIGHT of the chart — chart ~2/3 width, CTA
 * ~1/3, equal height. DOM order is CTA then chart, so row-reverse puts the
 * chart on the left. Mobile (≤720) keeps the natural block stack (CTA above
 * the chart). */
@media (min-width: 721px) {
   .wcpt-chart-row {
      display: flex;
      flex-direction: row-reverse;
      align-items: stretch;
      gap: 16px;
   }
   .wcpt-chart-row .wcpt-chart-section { flex: 2 1 0; min-width: 0; margin-bottom: 0; }
   .wcpt-chart-row .wcpt-cta-shop      { flex: 1 1 0; min-width: 0; margin-bottom: 0; }

   /* Stack the RYS icon above the title in the (narrow) desktop card. */
   .wcpt-cta-shop [data-slot="title"] {
      flex-direction: column;
      gap: 6px;
   }
   .wcpt-cta-shop [data-slot="title"] [data-is="icon"] {
      width: 1.6em;
      height: 1.6em;
   }
}

.wcpt-cta-shop[data-pattern="spotlight"] {
   background: var(--color-brand, #0067CE);
   padding: 18px 20px;
   gap: 0;
   /* Let the body fill the card height so its content can vertically centre
    * when the card is stretched to the chart's height on desktop. */
   align-items: stretch;
}
/* Body — a centred vertical stack (title, flags, CTA). On desktop the card
 * is stretched to the chart's height (see .wcpt-chart-row), so the content
 * is vertically centred within it. */
.wcpt-cta-shop [data-slot="body"] {
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   text-align: center;
   gap: 16px;
   width: 100%;
}
/* Title row: RYS icon (keeps its brand orange) inline with the white
 * headline. */
.wcpt-cta-shop [data-slot="title"] {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 8px;
   color: #fff;
   /* Own responsive size — the pattern's --size-title caps ~18px, too small
    * for this CTA on desktop. Scales from 18px up to 24px. */
   font-size: clamp(18px, 2.2vw, 24px);
   line-height: 1.2;
   font-weight: 700;
}
/* Icon scales with the title text. */
.wcpt-cta-shop [data-slot="title"] [data-is="icon"] {
   width: 1.1em;
   height: 1.1em;
}
/* Details row: the matchup. Each team is a flag (the focal point) with its
 * country name stacked beneath. */
.wcpt-cta-shop [data-slot="details"] {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 14px;
   margin: 0;
   color: #fff;
}
.wcpt-cta-team {
   display: inline-flex;
   flex-direction: column;
   align-items: center;
   gap: 5px;
   font-size: 12px;
   font-weight: 600;
   color: #fff;
}
/* Uniform flag tiles — same fixed box for both regardless of the flag's
 * native ratio (object-fit: cover). High-res source keeps them sharp. */
.wcpt-cta-flag {
   width: 50px;
   height: 34px;
   object-fit: cover;
   border-radius: 3px;
   box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
   display: block;
}
.wcpt-cta-name { line-height: 1.15; }
.wcpt-cta-vs {
   color: rgba(255, 255, 255, 0.85);
   font-size: 11px;
   font-weight: 600;
}
/* Shop Tickets — centred under the matchup. White text. (Mobile turns it
 * into an outlined button — see the mobile block.) */
.wcpt-cta-shop [data-slot="cta-footer"] {
   margin: 0;
   text-align: center;
}
/* Centred, outlined button — desktop and mobile alike. */
.wcpt-cta-shop [data-slot="cta-footer"] a {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   height: auto;
   padding: 10px 20px;
   border: 1px solid rgba(255, 255, 255, 0.75);
   border-radius: 8px;
   text-decoration: none;
   transition: background 0.15s ease;
}
.wcpt-cta-shop [data-slot="cta-footer"] a:hover {
   background: rgba(255, 255, 255, 0.14);
}
.wcpt-cta-shop [data-slot="cta-footer"] a,
.wcpt-cta-shop [data-slot="cta-footer"] a [data-is="icon"] {
   color: #fff;
}

.wcpt-marquee-loading,
.wcpt-marquee-empty {
   color: #6c757d;
   text-align: center;
   padding: 36px;
   font-style: italic;
}
.wcpt-marquee-cards {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
   gap: 16px;
}

.wcpt-pick-card {
   display: flex;
   flex-direction: column;
   text-decoration: none;
   color: #1a1a1a;
   border: 1px solid #e3e6ea;
   border-radius: 8px;
   overflow: hidden;
   background: #fff;
   transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.wcpt-pick-card:hover {
   transform: translateY(-2px);
   box-shadow: 0 6px 18px rgba(0,0,0,0.08);
   border-color: #1e88e5;
}

.wcpt-pick-photo {
   height: 180px;
   background: #eef2f5 center / cover no-repeat;
}
.wcpt-pick-photo-placeholder {
   background: linear-gradient(135deg, #eef2f5 0%, #d8e0e8 100%);
}

/* Flag-pair placeholder — rendered by buildFlagPlaceholder() when a
 * marquee pick has no seat-view photo. Looks like an intentional
 * matchup graphic instead of an empty grey block. */
.wcpt-pick-photo-flags {
   display: flex;
   align-items: center;
   justify-content: center;
   gap: 14px;
   padding: 16px;
   background: linear-gradient(135deg, #f4f7fb 0%, #dfe7f1 100%);
}
.wcpt-pick-flag {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 6px;
   flex: 0 1 110px;
   min-width: 0;
}
.wcpt-pick-flag img {
   width: 72px;
   height: 48px;
   object-fit: cover;
   border-radius: 4px;
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
   display: block;
}
.wcpt-pick-flag-name {
   font-size: 12px;
   font-weight: 700;
   color: #2d3e54;
   text-align: center;
   line-height: 1.2;
   max-width: 100%;
   overflow: hidden;
   text-overflow: ellipsis;
   white-space: nowrap;
}
.wcpt-pick-flag-vs {
   font-size: 13px;
   font-weight: 800;
   color: #7e96b3;
   letter-spacing: 1.5px;
   flex-shrink: 0;
}
.wcpt-pick-body {
   padding: 14px 16px 16px;
   display: flex;
   flex-direction: column;
   gap: 6px;
   flex: 1;
}
.wcpt-pick-eyebrow {
   font-size: 10px;
   font-weight: 800;
   text-transform: uppercase;
   letter-spacing: 1px;
   color: #ea4991;
}
.wcpt-pick-headline {
   font-size: 16px;
   font-weight: 700;
   color: #12305c;
   line-height: 1.2;
}
.wcpt-pick-loc {
   font-size: 13px;
   color: #6c757d;
}
.wcpt-pick-section { font-weight: 600; color: #1a1a1a; }
.wcpt-pick-pills {
   display: flex;
   flex-wrap: wrap;
   gap: 4px;
   margin-top: 2px;
}
.wcpt-pick-why {
   font-size: 13px;
   color: #495057;
   line-height: 1.4;
   margin-top: 4px;
}
.wcpt-pick-foot {
   display: flex;
   justify-content: space-between;
   align-items: flex-end;
   margin-top: auto;
   padding-top: 12px;
   border-top: 1px dashed #e9ecef;
}
.wcpt-pick-price {
   font-size: 18px;
   font-weight: 800;
   color: #12305c;
}
.wcpt-pick-each {
   font-size: 12px;
   font-weight: 500;
   color: #6c757d;
   margin-left: 2px;
}

/* Canadian-venue prices are still quoted in USD — append a small "(USD)" tag
 * to every price. Toggled by .wcpt-usd on the tracker root (set server-side
 * in the view, and by the renderers on event switch). Mirrors the show_usd /
 * data-country='ca' USD-label convention in themes/te.1, scoped to the
 * package so it never leaks. Styling follows that pattern: small, normal
 * weight, muted — secondary to the price itself. */
.wcpt-usd .wcpt-pick-price::after,
.wcpt-usd .wcpt-modal-price::after,
.wcpt-usd [data-role="wcpt-current-price"]::after,
.wcpt-usd #wcpt-current-price::after {
   content: " (USD)";
   font-size: 0.6em;
   font-weight: 400;
   color: #6c757d;
   margin-left: 3px;
   white-space: nowrap;
}
.wcpt-pick-buy {
   font-size: 13px;
   font-weight: 700;
   color: #1e88e5;
   letter-spacing: 0.3px;
}
.wcpt-pick-card:hover .wcpt-pick-buy { color: #12305c; }

.wcpt-pill-detail {
   background: #fff4e5;
   color: #8a4a00;
}

/* ── Inventory table ────────────────────────────────────────────────── */

.wcpt-inventory-section {
   background: #fff;
   border: 1px solid #e3e6ea;
   border-radius: 10px;
   padding: 20px;
   box-shadow: 0 1px 2px rgba(0,0,0,0.03);
   margin-bottom: 18px;
}
.wcpt-inventory-header {
   display: flex;
   justify-content: space-between;
   align-items: flex-end;
   gap: 16px;
   margin-bottom: 14px;
   flex-wrap: wrap;
}
.wcpt-inventory-title {
   font-size: 18px;
   font-weight: 700;
   color: #1a1a1a;
}
.wcpt-inventory-sub {
   color: #6c757d;
   font-size: 12px;
   max-width: 520px;
}
.wcpt-inventory-meta {
   color: #6c757d;
   font-size: 12px;
   font-weight: 600;
}
.wcpt-inventory-table-wrap {
   max-height: 420px;
   overflow-y: auto;
   border-top: 1px solid #eee;
   border-bottom: 1px solid #eee;
}
.wcpt-inventory-table {
   width: 100%;
   border-collapse: collapse;
   font-size: 13px;
}
.wcpt-inventory-table thead {
   position: sticky;
   top: 0;
   background: #f8f9fa;
   z-index: 1;
}
.wcpt-inventory-table th,
.wcpt-inventory-table td {
   padding: 10px 12px;
   text-align: left;
   border-bottom: 1px solid #f1f3f5;
}
.wcpt-inventory-table th {
   font-size: 11px;
   font-weight: 700;
   letter-spacing: 0.3px;
   text-transform: uppercase;
   color: #6c757d;
}
.wcpt-inventory-table tbody tr:hover {
   background: #fcfdff;
}
.wcpt-col-price, .wcpt-col-buy { text-align: right; }
.wcpt-cell-section { font-weight: 600; color: #1a1a1a; }
.wcpt-fee-note {
   font-size: 10px;
   color: #6c757d;
   font-weight: 400;
   margin-top: 2px;
}
/* Regulatory Face Value line, shown where the jurisdiction requires it. */
.wcpt-face-value {
   font-size: 10px;
   color: #6c757d;
   font-weight: 400;
   margin-top: 1px;
}
.wcpt-muted { color: #adb5bd; font-size: 12px; }

.wcpt-pill {
   display: inline-block;
   font-size: 10px;
   font-weight: 700;
   text-transform: uppercase;
   letter-spacing: 0.4px;
   padding: 2px 7px;
   border-radius: 10px;
}
.wcpt-pill-instant   { background: #e3fcef; color: #1b7a3e; }
.wcpt-pill-e-ticket  { background: #e7f0ff; color: #1e4e8a; }
.wcpt-pill-zone      { background: #fff4e5; color: #8a4a00; margin-left: 4px; }

.wcpt-buy-btn {
   display: inline-block;
   background: #12305c;
   color: #fff;
   text-decoration: none;
   padding: 6px 16px;
   border-radius: 6px;
   font-weight: 700;
   font-size: 12px;
   letter-spacing: 0.3px;
   transition: background 0.15s ease;
}
.wcpt-buy-btn:hover {
   background: #1e4f8a;
}

.wcpt-inv-loading-row td,
.wcpt-inv-empty-row td {
   text-align: center;
   color: #6c757d;
   font-style: italic;
   padding: 30px;
}

/* ── Chart section ──────────────────────────────────────────────────── */

.wcpt-chart-section {
   background: #fff;
   border: 1px solid #e3e6ea;
   border-radius: 10px;
   padding: 20px;
   box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.wcpt-chart-header {
   display: flex;
   justify-content: space-between;
   align-items: flex-end;
   gap: 16px;
   margin-bottom: 18px;
   flex-wrap: wrap;
}
.wcpt-chart-title {
   font-size: 18px;
   font-weight: 700;
   color: #1a1a1a;
}
.wcpt-chart-sub {
   color: #6c757d;
   font-size: 13px;
}
.wcpt-range-picker {
   display: flex;
   gap: 4px;
   background: #f4f6f8;
   padding: 4px;
   border-radius: 6px;
}
.wcpt-range-picker button {
   border: none;
   background: transparent;
   padding: 6px 12px;
   font-size: 13px;
   font-weight: 600;
   color: #6c757d;
   border-radius: 4px;
   cursor: pointer;
}
.wcpt-range-picker button:hover {
   color: #1a1a1a;
}
.wcpt-range-picker button.active {
   background: #1a1a1a;
   color: #fff;
}

/* Quantity dropdown — sits under the "Our Top Picks" heading. Standard
 * labeled native select. Changing it re-runs the marquee for that group
 * size. */
.wcpt-qty-field {
   display: flex;
   align-items: center;
   gap: 8px;
   margin-top: 12px;
}
.wcpt-qty-label {
   font-size: 13px;
   font-weight: 600;
   color: #495057;
   white-space: nowrap;
}
.wcpt-qty-select {
   /* The global `select` rule is full-width, 44px tall, appearance:none with
    * no chevron — clunky and not obviously a dropdown. Override to a compact
    * control with a custom caret so it reads as a dropdown. */
   -webkit-appearance: none;
   appearance: none;
   width: auto;
   min-width: 84px;
   height: auto;
   font-family: inherit;
   font-size: 14px;
   font-weight: 600;
   color: #1a1a1a;
   padding: 8px 34px 8px 12px;
   border: 1px solid #ced4da;
   border-radius: 6px;
   background-color: #fff;
   background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
   background-repeat: no-repeat;
   background-position: right 12px center;
   background-size: 12px;
   box-sizing: border-box;
   cursor: pointer;
}
.wcpt-qty-select:hover { border-color: #adb5bd; }
.wcpt-qty-select:focus-visible { outline: 2px solid #1e88e5; outline-offset: 1px; }

/* Smooth quantity changes — dim the current picks in place while the new
 * ones load instead of collapsing the section (which caused a jump). */
.wcpt-marquee-cards { transition: opacity 0.15s ease; }
.wcpt-cards-loading { opacity: 0.45; pointer-events: none; }

/* Fixed height (not min-height) — Chart.js with maintainAspectRatio:
 * false drives the canvas dimensions from the parent. If the parent can
 * grow (min-height), each redraw nudges it taller and the chart
 * "runs away" down the page on every range-button click. A locked
 * height + relative positioning keeps the canvas in its slot. */
.wcpt-chart-wrap {
   position: relative;
   height: 380px;
   overflow: hidden;
}
.wcpt-chart-wrap canvas {
   max-height: 100%;
   max-width: 100%;
}
.wcpt-chart-empty {
   position: absolute;
   inset: 0;
   display: flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   text-align: center;
   color: #6c757d;
   padding: 40px;
   background: rgba(255,255,255,0.92);
   border-radius: 8px;
}
/* The HTML `hidden` attribute would normally collapse the element, but
 * the `display: flex` rule above wins the cascade. Restore the expected
 * behavior explicitly. */
.wcpt-chart-empty[hidden] { display: none !important; }
.wcpt-empty-title {
   font-size: 16px;
   font-weight: 700;
   color: #1a1a1a;
   margin-bottom: 6px;
}
.wcpt-empty-body {
   font-size: 13px;
   max-width: 420px;
}

/* ── Trigger button + modal frame ────────────────────────────────────
 * Surfaces of the package that live OUTSIDE the tracker view itself —
 * the .pt-trigger button (rendered by renderTrigger()) and the iframe
 * frame around the tracker when opened inside the shared Modal class.
 */
.pt-trigger {
   display: inline-flex;
   align-items: center;
   gap: 6px;
   border-radius: 6px;
   font-weight: 700;
   font-size: 12px;
   letter-spacing: 0.4px;
   text-transform: uppercase;
   font-family: inherit;
   cursor: pointer;
   transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, transform 0.12s ease;
   text-decoration: none;
}
.pt-trigger-icon { font-size: 14px; line-height: 1; }

/* Style variants — caller passes one through PriceTrackerPackage::renderTrigger(['style' => …]). */
.pt-trigger--secondary {
   padding: 7px 12px;
   background: transparent;
   color: #4a5568;
   border: 1px solid #cbd5e0;
}
.pt-trigger--secondary:hover {
   background: #f7fafc;
   border-color: #4a5568;
   color: #1a202c;
}
.pt-trigger--primary {
   padding: 9px 16px;
   background: #1e88e5;
   color: #fff;
   border: 1px solid #1e88e5;
}
.pt-trigger--primary:hover {
   background: #12305c;
   border-color: #12305c;
}
.pt-trigger--link {
   padding: 4px 0;
   background: transparent;
   color: #1e88e5;
   border: 0;
   text-transform: none;
   letter-spacing: 0;
}
.pt-trigger--link:hover { color: #12305c; text-decoration: underline; }

/* Shared cmodal overrides — when the trigger opens the tracker inside
 * the shared Modal class, we resize the inner .modal-container to a
 * tracker-friendly envelope and stretch an iframe to fill the body.
 * Outer <dialog>.cmodal stays full-viewport (transparent positioning
 * surface) per the Modal class contract. */
#modal-price-tracker.cmodal .modal-container {
   width: min(1100px, 94vw) !important;
   max-width: min(1100px, 94vw) !important;
   height: min(820px, 92vh) !important;
   max-height: min(820px, 92vh) !important;
   top: 50% !important;
   transform: translate(-50%, -50%) !important;
   display: flex !important;
   flex-direction: column !important;
   padding: 0 !important;
   overflow: hidden !important;
}
#modal-price-tracker.cmodal main {
   flex: 1 1 auto !important;
   position: relative !important;
   padding: 0 !important;
   background: #f4f6f8 !important;
   min-height: 0 !important;
   /* Inline tracker renders directly in the body now (no iframe), so the
    * body itself must scroll the tracker content rather than clip it. */
   overflow-y: auto !important;
   overflow-x: hidden !important;
   -webkit-overflow-scrolling: touch;
}
/* Legacy iframe frame — retained for the fallback path / older callers
 * that still embed the standalone tracker page in an iframe. */
#modal-price-tracker .pt-modal-iframe {
   position: absolute;
   inset: 0;
   width: 100%;
   height: 100%;
   border: 0;
   display: block;
   background: #f4f6f8;
}
/* Inline (non-iframe) mount — price-tracker-render.js drops the tracker
 * DOM straight into .pt-inline-root. Loading / error states center
 * within the modal envelope. */
#modal-price-tracker .pt-inline-root { min-height: 100%; }
#modal-price-tracker .pt-inline-loading,
#modal-price-tracker .pt-inline-error {
   display: flex;
   align-items: center;
   justify-content: center;
   min-height: 320px;
   padding: 40px 24px;
   text-align: center;
   color: #6c757d;
   font-size: 15px;
}
#modal-price-tracker .pt-inline-error { color: #b02a37; }

/* ── Mobile (≤ 720px) ────────────────────────────────────────────────
 * Reflows the package body so it reads comfortably on phones — the
 * primary consumption surface for the price tracker. Affects only the
 * embed mode since that's where modals on phones land; the full-page
 * standalone view already wraps cleanly because of its own breakpoints.
 *
 * Key changes:
 *   • Stat cards drop to 2-column grid (was 4) — readable values, not
 *     8-char-wide micro-tiles
 *   • Chart canvas shrinks to ~200px so the marquee cards aren't
 *     pushed entirely below the fold
 *   • Tighter outer padding throughout — every pixel matters on a 360px
 *     viewport
 *   • Header type scales down; subtitle drops the venue·date dot
 *     separator's whitespace
 *   • Event tabs go uniform-width flex but allow scroll if many
 *     matchups can't fit in a single row
 *   • Marquee card photo height halves so the whole card is glance-able
 */
@media (max-width: 720px) {

   .wcpt-embed .wcpt-page {
      padding: 12px 12px 16px;
   }

   /* Header — keep the matchup (h1) + date visible on mobile. The modal
    * title only shows "{Venue} World Cup Price Tracker"; when the tracker
    * is opened to a specific match there's no chip rail to announce the
    * matchup, so hiding the h1 (as the old iframe layout did) left mobile
    * users unsure which match they're looking at. Compact, not hidden. */
   .wcpt-embed .wcpt-header     { margin-bottom: 8px; }
   .wcpt-embed .wcpt-header h1  { font-size: 17px; line-height: 1.2; margin-bottom: 2px; }
   .wcpt-embed .wcpt-subtitle   { font-size: 12px; }

   /* Event tabs — tighten chip padding for phone widths; the arrow
    * buttons stay available but the swipe gesture is the primary
    * affordance on touch. */
   .wcpt-embed .wcpt-event-tabs { gap: 6px; }
   .wcpt-embed .wcpt-event-chip { padding: 7px 12px; max-width: 60vw; }
   .wcpt-embed .wcpt-event-tabs-header { font-size: 11px; }

   /* Stat cards — 2 across, NOT 4. */
   .wcpt-embed .wcpt-stat-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      margin-bottom: 10px;
   }
   .wcpt-embed .wcpt-stat-card { padding: 10px 12px; }
   .wcpt-embed .wcpt-stat-label { font-size: 11px; margin-bottom: 3px; }
   .wcpt-embed .wcpt-stat-value { font-size: 18px; margin-bottom: 3px; }
   .wcpt-embed .wcpt-stat-foot {
      font-size: 10px;
      line-height: 1.3;
   }
   .wcpt-embed .wcpt-stat-big   { font-size: 18px; }
   .wcpt-embed .wcpt-stat-suffix { font-size: 11px; }

   /* Chart — shorter on phones so the marquee section starts above the
    * fold. Range picker buttons stack tighter under the title. */
   .wcpt-embed .wcpt-chart-section { padding: 12px; margin-bottom: 10px; }
   .wcpt-embed .wcpt-chart-header {
      flex-direction: column;
      align-items: stretch;
      gap: 8px;
   }
   .wcpt-embed .wcpt-chart-title { font-size: 14px; }
   .wcpt-embed .wcpt-chart-sub   { font-size: 11px; }
   .wcpt-embed .wcpt-chart-wrap  { height: 200px; }
   /* Range picker — a 6-option segmented control. A horizontal-scroll pill
    * row hides options and reads as broken on touch, so on phones lay them
    * out as a 3×2 grid: every range visible, each a comfortable tap target. */
   .wcpt-embed .wcpt-range-picker {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 4px;
      padding: 4px;
      overflow: visible;
   }
   .wcpt-embed .wcpt-range-picker button {
      padding: 9px 6px;
      font-size: 12px;
      text-align: center;
      white-space: nowrap;
   }

   /* Marquee picks — already single-column in the body grid; just slim
    * the card chrome down so each row is finger-tappable without
    * dominating the screen. */
   .wcpt-embed .wcpt-marquee-section { padding: 12px; }
   .wcpt-embed .wcpt-marquee-header {
      flex-direction: column;
      align-items: stretch;
      gap: 8px;
   }
   .wcpt-embed .wcpt-marquee-title { font-size: 14px; }
   .wcpt-embed .wcpt-marquee-sub   { font-size: 11px; }
   .wcpt-embed .wcpt-marquee-meta {
      gap: 8px;
      width: 100%;
   }
   /* Full-width, tappable Shop-all button on phones — cleaner than a small
    * left-floated button wedged between the dropdown and the cards. */
   .wcpt-embed .wcpt-marquee-meta .wcpt-shop-all-btn {
      width: 100%;
      padding: 11px 16px;
      font-size: 13px;
   }
   /* Once the primary CTA scrolls out of view (.wcpt-cta-out toggled by the
    * renderer), pin Shop-all as a full-width bar hugging the bottom edges of
    * the viewport so a buy action stays reachable. */
   .wcpt-cta-out .wcpt-marquee-meta .wcpt-shop-all-btn {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      width: auto;
      height: auto;
      z-index: 60;
      padding: 17px 16px;
      font-size: 15px;
      border-radius: 0;
      box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.24);
   }
   /* The pinned Shop-all bar is fixed to the viewport bottom and would
    * otherwise overlap the last pick card. Reserve extra scroll room below
    * the cards so the final card can be fully scrolled clear of the bar.
    * (~55px bar height + breathing room; only while the bar is pinned.) */
   .wcpt-cta-out .wcpt-embed .wcpt-marquee-cards {
      padding-bottom: 72px;
   }

   /* Primary CTA — tighten the bottom margin in the compact modal; the
    * rest of its look is the global "spotlight" pattern (don't override
    * its padding/typography here or it stops matching that component). */
   .wcpt-embed .wcpt-cta-shop { margin-bottom: 14px; }
   /* Phones: drop the desktop 2-column grid back to a centred stack —
    * title + flags centred, "Shop Tickets" on its own row, right-aligned. */
   .wcpt-cta-shop [data-slot="body"] {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 12px;
   }
   .wcpt-cta-shop [data-slot="title"]   { justify-content: center; }
   .wcpt-cta-shop [data-slot="details"] { justify-content: center; }
   /* Shop Tickets is the centred outlined button (styled in the base rule). */
   .wcpt-cta-shop [data-slot="cta-footer"] { text-align: center; }

   .wcpt-embed .wcpt-marquee-cards { gap: 8px; }
   .wcpt-embed .wcpt-pick-photo    { height: 100px; }
   .wcpt-embed .wcpt-pick-body     { padding: 10px 12px 12px; gap: 4px; }
   .wcpt-embed .wcpt-pick-headline { font-size: 14px; }
   .wcpt-embed .wcpt-pick-loc      { font-size: 11px; }
   .wcpt-embed .wcpt-pick-price    { font-size: 16px; }

   /* Ticket-preview modal (in-tracker, when you tap a pick) — switch to
    * full-screen on phones since the side-by-side photo / details
    * layout doesn't fit at narrow widths. The base .wcpt-modal-panel
    * already has a media query for ≤720; reinforce it here so embed
    * mode plays nice. */
   .wcpt-embed .wcpt-modal-panel {
      grid-template-columns: 1fr;
      max-height: 95vh;
      overflow-y: auto;
   }
   .wcpt-embed .wcpt-modal-gallery {
      min-height: 200px;
   }
   .wcpt-embed .wcpt-modal-photo-main { min-height: 200px; }
}

/* Even narrower (≤ 420px, common phone portrait) — one more squeeze. */
@media (max-width: 420px) {
   .wcpt-embed .wcpt-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
   .wcpt-embed .wcpt-stat-value { font-size: 16px; }
   .wcpt-embed .wcpt-header h1  { font-size: 16px; }
   .wcpt-embed .wcpt-chart-wrap { height: 180px; }
}

/* Modal frame sizing override — when the package is hosted by the
 * shared Modal class, the .pt-trigger CSS resizes .modal-container.
 * On phones, kick the panel to near-fullscreen so the body has real
 * estate to breathe. */
@media (max-width: 720px) {
   #modal-price-tracker.cmodal .modal-container {
      width: 100vw !important;
      max-width: 100vw !important;
      /* dvh = dynamic viewport height; 100vh overflows under the mobile
       * browser's URL bar on iOS/Android and clips the bottom of the modal.
       * vh declarations first as the fallback for browsers without dvh. */
      height: 100vh !important;
      max-height: 100vh !important;
      height: 100dvh !important;
      max-height: 100dvh !important;
      border-radius: 0 !important;
      top: 0 !important;
      left: 0 !important;
      transform: none !important;
   }

   /* Shrink the modal title on phones so "{Venue} World Cup Price
    * Tracker" fits on one line. The global modal.css sets the title
    * to clamp(22px, 4vw, 28px) which forces 22px on a 360px screen —
    * way too big for our composite title. Scoped to our two tracker
    * modal ids so we don't disturb the rest of the site. */
   #modal-price-tracker.cmodal hgroup .is-header,
   #modal-wc-tracker.cmodal hgroup .is-header {
      font-size: 16px !important;
      line-height: 1.2 !important;
   }
}
@media (max-width: 420px) {
   #modal-price-tracker.cmodal hgroup .is-header,
   #modal-wc-tracker.cmodal hgroup .is-header {
      font-size: 14px !important;
   }
}

/* Trigger button — wrap the icon under the label on very narrow
 * containers so the button doesn't overflow its parent row. Useful
 * when triggers sit inline with other CTAs (e.g. "TICKETS · TRACK"). */
@media (max-width: 380px) {
   .pt-trigger {
      padding: 6px 10px;
      font-size: 11px;
   }
   .pt-trigger-icon { font-size: 12px; }
}
