/* =============================================================
   /match/{id} — public match detail page
   ============================================================= */

.match-page-shell {
  /* Single-column on the detail page. Drop the sidebar grid that
     home/wallet use — the deep-dive is the whole story here. */
  display: block;
}

.match-page-shell main {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.match-page-back {
  margin: 18px 0 16px;
  font-size: 13px;
}
.match-page-back a {
  color: var(--ink-3);
  text-decoration: none;
  font-weight: 600;
  transition: color .15s;
}
.match-page-back a:hover { color: var(--ink); }

/* Hero header — reuses the global `.hero` chrome from match-cards.css,
   plus a few overrides specific to the detail context: shrink the title
   on small viewports, surface a share-pill in the corner. */
.match-page-hero {
  position: relative;
}
.match-page-hero h1 .match-title-link {
  color: inherit;
  text-decoration: none;
  pointer-events: none;             /* the page IS the link target */
}

/* Labeled hero info grid — replaces the dense dot-separated meta
   line on the detail page. Each cell is one fact (Compétition / Date
   & heure / Format / Prédictions) with a label, the value, and an
   optional second-line hint. 2-column on desktop, 1-column under
   720px. Sits inside the pink hero panel; readable for non-experts
   because every fact carries its own header. */
.match-info-grid {
  margin: 6px 0 18px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
}
.match-info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.match-info-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 2px;
}
.match-info-value {
  margin: 0;
  font-family: var(--body);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.match-info-sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 500;
}

@media (max-width: 720px) {
  .match-info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
/* Hero action row — stream link + share button sit side by side at
   the bottom of the hero panel. No absolute positioning (would
   collide with the M8 monogram in the top-right). */
.match-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 14px;
}
/* `.hero-watch-live` carries an 18px margin-bottom for the home hero
   (where it sits between the meta line and the bet-pair). Inside this
   action row it would shift its centre off the share pill — zero it
   out + match the share pill's padding/font for visual parity. */
.match-page-actions .hero-watch-live,
.match-page-actions .match-page-share {
  margin: 0;
  padding: 7px 14px;
  font-size: 12px;
  line-height: 1;
}
.match-page-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.16);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--r-pill);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all .15s;
}
.match-page-share:hover { background: #fff; color: var(--pink-2); border-color: #fff; }

/* Read-only banner — surfaces under the hero for finished/cancelled. */
.match-page-banner {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  background: var(--paper-2);
  border: 1px solid var(--hair-2);
}
.match-page-banner strong { letter-spacing: 0.5px; }
.match-page-banner-cancelled { background: var(--paper-3); color: var(--ink-2); }
.match-page-banner-finished  { background: var(--green-veil); color: var(--green); border-color: rgba(30,122,29,0.2); }

/* Eyebrow live-update — same data-locks-at the home hero uses; the
   existing bet-flow.js countdown picks it up automatically. */
.match-page-eyebrow[data-status="upcoming"] { /* default look */ }
.match-page-eyebrow[data-status="live"]     { background: #fff7e0; color: #8a5a00; }
.match-page-eyebrow[data-status="finished"] { background: var(--green-veil); color: var(--green); }
.match-page-eyebrow[data-status="cancelled"] { background: var(--paper-3); color: var(--ink-3); }

/* =============================================================
   Stats strip — between hero and markets list
   ============================================================= */
.match-page-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 22px 0 26px;
}
.match-page-stats .stat {
  background: var(--paper);
  border: 1px solid var(--hair-2);
  border-radius: var(--r-card);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.match-page-stats .stat-lbl {
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 700;
}
.match-page-stats .stat-val {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 800;
  font-variation-settings: 'wdth' 86;
  color: var(--ink);
  line-height: 1;
}
.match-page-stats .stat-val.mono {
  font-family: var(--mono);
  font-size: 22px;
  letter-spacing: -0.5px;
}
.match-page-stats .stat-val small {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
  margin-left: 2px;
}

@media (max-width: 720px) {
  .match-page-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =============================================================
   Markets list — each market gets a card with its own datavis
   ============================================================= */
.match-page-markets {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.market-card {
  background: var(--paper);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  transition: border-color .15s;
}
.market-card:hover { border-color: var(--hair-2); }

.market-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.market-card-head h3 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 700;
  font-variation-settings: 'wdth' 90;
  letter-spacing: -0.4px;
  margin: 0;
  line-height: 1.2;
}
.market-card-sub {
  margin: 4px 0 0;
  color: var(--ink-3);
  font-size: 13px;
}
.market-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  font-size: 11px;
  color: var(--ink-2);
  white-space: nowrap;
}

/* Pool-distribution bar — horizontal stacked rectangle, one segment
   per option. Width follows the rendered `pct`. */
.pool-bar {
  display: flex;
  height: 8px;
  border-radius: var(--r-pill);
  overflow: hidden;
  background: var(--paper-3);
  margin-bottom: 18px;
}
.pool-bar-seg {
  display: block;
  height: 100%;
  transition: width .4s ease-out;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15);
}
.pool-bar-empty {
  align-items: center;
  justify-content: center;
  height: auto;
  padding: 10px;
  background: var(--paper-2);
  border: 1px dashed var(--hair-2);
  color: var(--ink-3);
  font-size: 12px;
  font-style: italic;
  border-radius: var(--r-md);
}
.pool-bar-empty-text { color: var(--ink-3); }

/* Option rows — each one shows its accent dot, label, pool, odds. */
.market-options {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.market-option { position: relative; }
.market-option-btn {
  width: 100%;
  display: grid;
  grid-template-columns: 16px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--paper-2);
  border: 1px solid var(--hair-2);
  border-radius: var(--r-md);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all .15s;
  font-family: var(--body);
  font-size: 14px;
}
.market-option-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  width: var(--pct, 0%);
  background: linear-gradient(to right, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%);
  pointer-events: none;
  transition: width .4s ease-out;
}
.market-option-btn > * { position: relative; }
.market-option-btn:hover:not(:disabled) {
  background: var(--paper);
  border-color: var(--accent, var(--ink-3));
}
.market-option-btn:disabled {
  cursor: default;
  opacity: 0.85;
}

.market-option-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.6);
}
.market-option-label {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.market-option-meta {
  color: var(--ink-3);
  font-size: 12px;
  justify-self: end;
}
.market-option-odds {
  font-weight: 800;
  color: var(--pink-2);
  font-size: 15px;
  letter-spacing: -0.2px;
}

.market-option-winner .market-option-btn {
  border-color: var(--green);
  background: var(--green-veil);
}
.market-option-winner .market-option-btn::after {
  content: '✓';
  position: absolute;
  right: 12px;
  top: -8px;
  background: var(--green);
  color: #fff;
  border-radius: 50%;
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
}

.match-page-foot {
  margin-top: 32px;
  text-align: center;
  color: var(--ink-3);
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .match-page-shell main { padding: 0 14px 40px; }
  .market-card { padding: 16px 16px; }
  .market-card-head { flex-direction: column; gap: 8px; }
  .market-card-meta { align-items: flex-start; flex-direction: row; gap: 10px; }
  .market-option-btn {
    grid-template-columns: 14px 1fr;
    grid-template-rows: auto auto;
    gap: 4px 12px;
    padding: 11px 14px;
  }
  .market-option-meta { grid-column: 2; }
  .market-option-odds {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    font-size: 14px;
  }
}

/* Title anchor across the home feed — same color as the heading,
   hover-tints the opponent piece. */
.match-title-link {
  color: inherit;
  text-decoration: none;
}
.match-title-link:hover .opp { color: var(--ink); }
.hero h1 .match-title-link { color: inherit; }
.hero h1 .match-title-link:hover .opp { color: #fff; }
