/* =====================================================================
 * betting-history.css — Notre Dame Against the Spread hub
 *
 * Conditionally loaded by goldendome_enqueue_betting_history_css() on the
 * betting-odds category archive only. The page chrome (.schedule-page__header,
 * .gold-rule, .deck, .data-table, .schedule-ad, .pagination-*) is in the
 * always-loaded bundle; this sheet adds the surface-specific pieces: the stat
 * tiles, situational split bars, inline-SVG chart chrome, the filter chips +
 * live summary, ATS/result cell coloring, and the article river grid.
 *
 * Colors come from tokens (--green-utility / --win for covers, --loss for
 * losses, --nd-navy, --ink-* / --line-* / --text-muted, --bg-sunk). Layout
 * spacing uses raw px per the per-surface sheet convention (season-history.css,
 * bowl-history.css). Only chart GEOMETRY is numeric — computed layout, not
 * design values.
 * ===================================================================== */

/* ── Header spacing ─────────────────────────────────────────────────── */
.page--betting-history .schedule-page__header {
	margin-bottom: 28px;
}

/* ── Stat tiles ─────────────────────────────────────────────────────── */
.page--betting-history .bh-tiles {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	margin: 0 0 28px;
}

.page--betting-history .bh-tile {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 18px 20px;
	background: var(--card-raised);
	border: 1px solid var(--line-soft);
	border-radius: var(--radius-card);
	box-shadow: var(--shadow-card);
}

.page--betting-history .bh-tile--headline {
	background: var(--nd-navy);
	border-color: var(--nd-navy);
}

.page--betting-history .bh-tile__label {
	font-family: var(--font-mono);
	font-size: var(--label-md);
	letter-spacing: var(--tracking-mono-loose);
	text-transform: uppercase;
	color: var(--text-muted);
}

.page--betting-history .bh-tile--headline .bh-tile__label {
	color: var(--video-band-ink-3);
}

.page--betting-history .bh-tile__value {
	font-family: var(--font-serif);
	font-size: 2rem;
	font-weight: 600;
	line-height: 1.05;
	color: var(--text);
	font-variant-numeric: tabular-nums;
}

.page--betting-history .bh-tile--headline .bh-tile__value {
	color: #fff;
}

.page--betting-history .bh-tile__sub {
	font-size: 0.8125rem;
	color: var(--text-muted);
}

.page--betting-history .bh-tile--headline .bh-tile__sub {
	color: var(--video-band-ink-2);
}

/* ── Situational split bars ─────────────────────────────────────────── */
.page--betting-history .bh-splits-wrap {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 24px 40px;
	margin: 0 0 40px;
}

.page--betting-history .bh-splits-head {
	font-family: var(--font-mono);
	font-size: var(--label-md);
	letter-spacing: var(--tracking-mono-loose);
	text-transform: uppercase;
	color: var(--text-muted);
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--line);
}

.page--betting-history .bh-split {
	display: grid;
	grid-template-columns: 78px 1fr auto auto;
	align-items: center;
	gap: 10px;
	padding: 5px 0;
}

.page--betting-history .bh-split__label {
	font-size: 0.875rem;
	color: var(--text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.page--betting-history .bh-split__track {
	height: 8px;
	background: var(--bg-sunk);
	border-radius: var(--radius-pill);
	overflow: hidden;
}

.page--betting-history .bh-split__fill {
	display: block;
	height: 100%;
	border-radius: var(--radius-pill);
}

.page--betting-history .bh-split__fill--cover { background: var(--green-utility); }
.page--betting-history .bh-split__fill--under { background: var(--nd-navy); }

.page--betting-history .bh-split__rec {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: var(--text-muted);
	font-variant-numeric: tabular-nums;
	min-width: 46px;
	text-align: right;
}

.page--betting-history .bh-split__pct {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--text);
	font-variant-numeric: tabular-nums;
	min-width: 38px;
	text-align: right;
}

/* ── Charts ─────────────────────────────────────────────────────────── */
.page--betting-history .bh-charts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin: 0 0 36px;
}

.page--betting-history .bh-chart-card {
	background: var(--card-raised);
	border: 1px solid var(--line-soft);
	border-radius: var(--radius-card);
	padding: 18px 20px 16px;
	box-shadow: var(--shadow-card);
}

.page--betting-history .bh-chart-card--wide {
	grid-column: 1 / -1;
}

.page--betting-history .bh-chart-title {
	font-family: var(--font-serif);
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--text);
	margin: 0 0 12px;
}

.page--betting-history .bh-chart {
	display: block;
	width: 100%;
	height: auto;
}

/* SVG marks — on-brand ND triad: green = beat the number, navy = didn't,
 * gold = accent (reference lines + current-value markers). No off-brand red. */
.page--betting-history .bh-bar--cover { fill: url(#bh-grad-green); }
.page--betting-history .bh-bar--under { fill: url(#bh-grad-navy); }
.page--betting-history .bh-line {
	fill: none;
	stroke: var(--nd-navy);
	stroke-width: 2.5;
	stroke-linejoin: round;
	stroke-linecap: round;
}
/* Soft green wash under the cumulative line (area to baseline). */
.page--betting-history .bh-area { fill: url(#bh-grad-area); }
/* Gold "current value" marker — the accent that says "where ND stands now". */
.page--betting-history .bh-dot--now {
	fill: var(--gold);
	stroke: var(--card-raised);
	stroke-width: 2.5;
}
/* Break-even / zero reference — gold hairline, the editorial accent. */
.page--betting-history .bh-ref {
	stroke: var(--gold);
	stroke-width: 1.5;
	stroke-dasharray: 5 4;
	opacity: 0.9;
}
.page--betting-history .bh-grid { stroke: var(--line-soft); stroke-width: 1; }
.page--betting-history .bh-axis-x,
.page--betting-history .bh-axis-y {
	fill: var(--text-muted);
	font-family: var(--font-mono);
	font-size: 11px;
}
.page--betting-history .bh-bar-val {
	fill: var(--nd-navy);
	font-family: var(--font-mono);
	font-size: 12px;
	font-weight: 700;
}
.page--betting-history .bh-axis-cap {
	fill: var(--ink-4);
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.04em;
}
.page--betting-history .bh-end-label {
	fill: var(--nd-navy);
	font-weight: 700;
}

/* Gradient stops — styled via CSS so the fills stay token-based (no raw hex
 * in the SVG markup). Green bars gain subtle top→bottom depth; navy bars read
 * softer than solid navy; the area wash fades green → transparent downward. */
.page--betting-history .bh-stop-green-top { stop-color: var(--green-utility); }
.page--betting-history .bh-stop-green-bot { stop-color: var(--nd-green); }
.page--betting-history .bh-stop-navy-top  { stop-color: var(--nd-navy); stop-opacity: 0.92; }
.page--betting-history .bh-stop-navy-bot  { stop-color: var(--nd-navy); stop-opacity: 0.68; }
.page--betting-history .bh-stop-area-top  { stop-color: var(--green-utility); stop-opacity: 0.22; }
.page--betting-history .bh-stop-area-bot  { stop-color: var(--green-utility); stop-opacity: 0; }

.page--betting-history .bh-chart-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin: 12px 0 0;
	font-size: 0.75rem;
	color: var(--text-muted);
}

.page--betting-history .bh-key {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.page--betting-history .bh-key::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 2px;
	background: var(--ink-4);
}

.page--betting-history .bh-key--cover::before { background: var(--green-utility); }
.page--betting-history .bh-key--under::before { background: var(--nd-navy); }

.page--betting-history .bh-chart-note {
	margin: 12px 0 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--text-muted);
}

/* ── Game table: filters + summary ──────────────────────────────────── */
.page--betting-history .bh-table-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 20px;
	margin: 0 0 14px;
}

.page--betting-history .bh-table-head h2 {
	font-family: var(--font-serif);
	font-size: 1.375rem;
	font-weight: 600;
	color: var(--text);
	margin: 0;
}

.page--betting-history .bh-filter-summary {
	margin: 0;
	display: flex;
	gap: 12px;
	align-items: baseline;
	font-variant-numeric: tabular-nums;
}

.page--betting-history .bh-filter-summary__rec {
	font-weight: 700;
	color: var(--text);
}

.page--betting-history .bh-filter-summary__count {
	font-size: 0.8125rem;
	color: var(--text-muted);
}

.page--betting-history .bh-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 22px;
	margin: 0 0 18px;
	padding: 14px 16px;
	background: var(--bg-sunk);
	border-radius: var(--radius-card);
}

.page--betting-history .bh-filter-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
}

.page--betting-history .bh-filter-group__label {
	font-family: var(--font-mono);
	font-size: var(--label-sm);
	letter-spacing: var(--tracking-mono-tight);
	text-transform: uppercase;
	color: var(--ink-4);
	margin-right: 2px;
}

.page--betting-history .bh-chip {
	font-family: var(--font-sans);
	font-size: 0.8125rem;
	line-height: 1;
	padding: 6px 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius-pill);
	background: var(--card-raised);
	color: var(--text);
	cursor: pointer;
	transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.page--betting-history .bh-chip:hover {
	border-color: var(--line-strong);
}

.page--betting-history .bh-chip.is-active {
	background: var(--nd-navy);
	border-color: var(--nd-navy);
	color: #fff;
}

.page--betting-history .bh-chip:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 2px;
}

/* ── Game table: cells ──────────────────────────────────────────────── */
.page--betting-history .bh-table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.page--betting-history .bh-table {
	width: 100%;
	min-width: 860px;
}

.page--betting-history .bh-cell-date,
.page--betting-history .bh-cell-opp,
.page--betting-history .bh-cell-coach {
	text-align: left;
	white-space: nowrap;
}

.page--betting-history .bh-site-pre {
	display: inline-block;
	min-width: 20px;
	margin-right: 4px;
	font-family: var(--font-mono);
	font-size: 0.75rem;
	color: var(--ink-4);
}

.page--betting-history .bh-cell-line,
.page--betting-history .bh-cell-rank {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.page--betting-history .bh-rank-sep { color: var(--line-strong); margin: 0 2px; }
.page--betting-history .bh-rank-opp { color: var(--text-muted); }

.page--betting-history .bh-wl--w { color: var(--win); font-weight: 600; }
.page--betting-history .bh-wl--l { color: var(--loss); font-weight: 600; }

.page--betting-history .bh-ats {
	display: inline-block;
	min-width: 54px;
	padding: 3px 8px;
	border-radius: var(--radius-chip);
	font-family: var(--font-mono);
	font-size: 0.6875rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-weight: 600;
}

.page--betting-history .bh-ats--cover {
	background: var(--nd-green-soft);
	color: var(--nd-green-ink);
}

.page--betting-history .bh-ats--loss {
	background: color-mix(in srgb, var(--nd-navy) 10%, transparent);
	color: var(--nd-navy);
}

.page--betting-history .bh-ats--push {
	background: var(--bg-muted);
	color: var(--ink-3);
}

.page--betting-history .bh-table-note {
	margin-top: 14px;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--text-muted);
}

/* ── Article river ──────────────────────────────────────────────────── */
.page--betting-history .bh-articles {
	margin-top: 44px;
	padding-top: 32px;
	border-top: 1px solid var(--line);
}

.page--betting-history .bh-articles-head h2 {
	font-family: var(--font-serif);
	font-size: 1.375rem;
	font-weight: 600;
	color: var(--text);
	margin: 0 0 20px;
}

.page--betting-history .bh-articles-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 28px 32px;
}

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 900px) {
	.page--betting-history .bh-charts {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 680px) {
	.page--betting-history .bh-tiles {
		grid-template-columns: repeat(2, 1fr);
	}
	.page--betting-history .bh-tile__value {
		font-size: 1.625rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.page--betting-history .bh-chip {
		transition: none;
	}
}
