@import "../../css/tokens.css";
@import "../../css/shell.css";

/* ---- Pari-mutuel deltas ------------------------------------------------ */
.outcome-row { margin: 10px 0; border-radius: var(--radius-sm); }

/* Briefly highlights an outcome row whose implied percentage just changed on a live refresh (WS
   push or fallback poll). Both callers rebuild each outcome row's markup from scratch every
   render rather than patching an existing element, so this is just a class on a freshly-created
   node -- the animation plays once automatically, no JS timer needs to remove it afterward.
   Scoped to just the bar-FILL (the actual colored/active part of the slider), not the track behind
   it and not the row's name/avatar/percentage text -- earlier passes flashed the row background,
   then the whole track (filled + unfilled), both read as more of the card blinking than a
   value-changed cue on the one thing that actually changed. Paints the fill a real solid green
   (not --yes -- that carries win/loss semantics elsewhere on this platform, see tokens.css's own
   note on --series-*, and this flash means "just updated," not "this is winning"), high-contrast
   against --gradient-brand's blue/violet, then eases back to it.
*/
@keyframes outcome-flash {
  0% { background: #1edb6b; box-shadow: 0 0 10px 3px rgba(30, 219, 107, 0.85); }
  100% { background: var(--gradient-brand); box-shadow: none; }
}
.outcome-row.flash .outcome-bar-fill { animation: outcome-flash 900ms ease-out; }

/* ---- Featured hero (2026-08-23) -----------------------------------------
   ONE large market at a time (carousel, not a grid of several small cards -- an earlier pass of
   this got that wrong), matching the Kalshi reference directly: category + nav top row, big title,
   a market/payout/odds list on the left, a legend + wide probability chart on the right. Same
   token-driven panel/border/shadow language as everywhere else on this site, just sized for a
   full-width hero instead of a grid tile. */
#featured-pool-markets {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.pool-featured-top { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.pool-featured-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.pool-nav-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel-bg);
  color: var(--text-dim);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pool-nav-btn:hover { border-color: var(--border-strong); color: var(--text); }
.pool-nav-label { font-size: 12px; color: var(--text-dim); font-family: var(--mono); min-width: 48px; text-align: center; }

.pool-featured-title {
  display: block;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.25;
  color: var(--text);
  text-decoration: none;
  margin-bottom: var(--space-4);
}
.pool-featured-title:hover { color: var(--accent); }

.pool-featured-body { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: var(--space-6); align-items: start; }
@media (max-width: 760px) { .pool-featured-body { grid-template-columns: 1fr; } }

.pool-outcome-table-header,
.pool-outcome-row {
  display: grid;
  grid-template-columns: 40px 1fr 74px 56px;
  align-items: center;
  gap: 10px;
}
.pool-outcome-table-header {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-faint);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-2);
}
.pool-outcome-table-header span:nth-child(3) { text-align: right; }
.pool-featured-leaderboard { display: flex; flex-direction: column; gap: var(--space-3); }
.pool-outcome-row { padding: 4px 0; }

.outcome-avatar { flex: none; }
.outcome-avatar .outcome-avatar-img,
.outcome-avatar .flag-img,
.outcome-avatar .avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--border);
}
.pool-outcome-name { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pool-outcome-multiplier { font-family: var(--mono); font-size: 13px; color: var(--text-dim); text-align: right; }
.odds-pill {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 14px;
  padding: 3px 0;
  border-radius: var(--radius-pill);
  border: 1.5px solid;
  background: var(--bg-alt);
  text-align: center;
}

.pool-featured-meta { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-dim); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border); }
.pool-featured-more { font-weight: 600; color: var(--accent); text-decoration: none; }
.pool-featured-more:hover { text-decoration: underline; }

.pool-featured-chart-col { min-width: 0; }
.pool-featured-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: var(--space-3); }
.pool-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-dim); }
.pool-legend-swatch { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.pool-legend-pct { font-weight: 700; color: var(--text); }
.pool-featured-chart { width: 100%; }
