/* Match tracker on the fixture page (games recorded with the civdb Hockey mod). The stage itself
   (.hs-stage, name tags, cameras, goal flash) comes from hockey-server.css. */
.hkt .section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hkt-by { font-size: .78rem; color: var(--text-muted); }
.hkt-live-dot { display: inline-block; width: 10px; height: 10px; margin-right: 4px; border-radius: 50%; background: var(--red, #ef4444); box-shadow: 0 0 0 4px rgba(239, 68, 68, .2); animation: hs-pulse 2s infinite; vertical-align: 2px; }
.hkt-card { padding: 0; overflow: hidden; }
.hkt-stage { border: 0; border-radius: 0; }
.hkt-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #c9d2de; font-weight: 600; background: rgba(10, 15, 23, .55); pointer-events: none; }
.hkt-wait[hidden] { display: none; }

/* Broadcast scorebug, the same look as the mod's in-game one. */
.hkt-bug { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: stretch; height: 34px; font: 800 15px/1 'Inter', system-ui, sans-serif; color: #fff; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .45)); pointer-events: none; white-space: nowrap; }
.hkt-bug:empty { display: none; }
.hkt-bug-team { display: flex; align-items: center; gap: 10px; min-width: 92px; padding: 0 14px 0 0; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, #11151c), #1a1f29); letter-spacing: .06em; }
.hkt-bug-team i { width: 6px; align-self: stretch; background: var(--c); }
.hkt-bug-team.is-away { padding: 0 0 0 14px; justify-content: flex-end; background: linear-gradient(270deg, color-mix(in srgb, var(--c) 55%, #11151c), #1a1f29); }
.hkt-bug-score { display: flex; align-items: center; justify-content: center; min-width: 34px; background: #f4f6f8; color: #10131a; font-size: 18px; }
.hkt-bug-clock { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 96px; background: #0e1117; }
.hkt-bug-clock b { font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.hkt-bug-clock small { position: absolute; top: 100%; left: 0; right: 0; display: flex; align-items: center; justify-content: center; gap: 5px; height: 16px; background: #e7b416; color: #10131a; font-size: 10px; letter-spacing: .08em; }
.hkt-bug-clock small em { width: 6px; height: 6px; border-radius: 50%; background: #d42c2c; animation: hkt-blink 1.2s infinite; }
@keyframes hkt-blink { 50% { opacity: .25; } }
.hkt-bug-clock small:not(.is-live) { background: #cbd5e1; }
@media (max-width: 560px) {
    .hkt-bug { height: 28px; font-size: 12px; }
    .hkt-bug-team { min-width: 64px; padding-right: 9px; gap: 7px; }
    .hkt-bug-team.is-away { padding-left: 9px; }
    .hkt-bug-score { min-width: 26px; font-size: 15px; }
    .hkt-bug-clock { min-width: 70px; }
    .hkt-bug-clock b { font-size: 15px; }
    .hs-cams button { padding: 5px 7px; font-size: 11px; }
}

/* Replay controls */
.hkt-player { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--bg-elevated); }
.hkt-play { width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: var(--accent); color: #06210f; font-size: 13px; font-weight: 800; cursor: pointer; }
.hkt-bar { position: relative; flex: 1; height: 26px; cursor: pointer; touch-action: none; }
.hkt-bar::before { content: ''; position: absolute; left: 0; right: 0; top: 11px; height: 4px; border-radius: 2px; background: var(--border-light); }
.hkt-fill { position: absolute; left: 0; top: 11px; height: 4px; border-radius: 2px; background: var(--accent); pointer-events: none; }
.hkt-fill::after { content: ''; position: absolute; right: -7px; top: -5px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.hkt-marks { position: absolute; inset: 0; pointer-events: none; }
.hkt-mark { position: absolute; top: 2px; width: 12px; height: 12px; margin-left: -6px; border: 2px solid var(--bg-elevated); border-radius: 50%; background: var(--c); cursor: pointer; pointer-events: auto; padding: 0; }
.hkt-mark.is-penalty { border-radius: 2px; transform: rotate(45deg) scale(.8); }
.hkt-mark.is-period { top: 6px; width: 3px; height: 14px; margin-left: -1px; border: 0; border-radius: 1px; background: var(--text-muted); }
.hkt-time { font: 600 .82rem 'Inter', system-ui, sans-serif; font-variant-numeric: tabular-nums; color: var(--text-secondary); white-space: nowrap; }
.hkt-player select { width: auto; padding: 5px 8px; font-size: .8rem; }

.hkt-ticker { display: flex; flex-direction: column; gap: 4px; max-height: 168px; overflow: auto; padding: 10px 14px 12px; border-top: 1px solid var(--border); }
.hkt-tick { display: flex; align-items: baseline; gap: 10px; padding: 5px 10px; border-left: 3px solid var(--c); border-radius: 4px; background: var(--bg-elevated); font-size: .86rem; }
.hkt-tick span { min-width: 38px; color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: .78rem; }
.hkt-tick.is-goal { font-weight: 700; background: color-mix(in srgb, var(--c) 16%, var(--bg-elevated)); }
.hkt-tick.is-empty { border-left-color: var(--border-light); color: var(--text-muted); }

/* Team stats: values either side of a split bar */
.hkt-team-stats { margin-top: 14px; padding: 14px 18px 8px; }
.hkt-ts-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; margin-bottom: 10px; font-size: .9rem; font-weight: 700; }
.hkt-ts-head span { display: flex; align-items: center; gap: 8px; }
.hkt-ts-head span::before { content: ''; width: 10px; height: 10px; border-radius: 2px; background: var(--c); }
.hkt-ts-head span:last-child { justify-content: flex-end; flex-direction: row-reverse; }
.hkt-ts-head b { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }
.hkt-ts-row { display: grid; grid-template-columns: 64px 1fr 64px; gap: 12px; align-items: center; padding: 6px 0; }
.hkt-ts-v { font-weight: 700; font-variant-numeric: tabular-nums; }
.hkt-ts-row .hkt-ts-v:last-child { text-align: right; }
.hkt-ts-label { text-align: center; font-size: .78rem; color: var(--text-secondary); margin-bottom: 4px; }
.hkt-ts-bar { display: flex; gap: 3px; height: 6px; }
.hkt-ts-bar i { display: block; height: 100%; border-radius: 3px; min-width: 2px; }
.hkt-ts-note { margin: 8px 0 6px; font-size: .78rem; color: var(--text-muted); text-align: center; }

.hkt-players { margin-top: 14px; padding: 0; overflow: hidden; }
.hkt-players-head { padding: 11px 16px; font-weight: 700; border-left: 4px solid var(--c); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%); }
.hkt-players .table-wrap { border: 0; border-radius: 0; }
.hkt-table { font-size: .84rem; white-space: nowrap; }
.hkt-table th { font-size: .72rem; }
.hkt-table td, .hkt-table th { text-align: center; padding: 7px 8px; }
.hkt-table td:first-child, .hkt-table th:first-child { text-align: left; position: sticky; left: 0; background: var(--bg-card); }
.hkt-pname { white-space: nowrap; }
.hkt-pn { display: inline-flex; align-items: center; gap: 8px; }
.hkt-pname img { width: 20px; height: 20px; border-radius: 3px; image-rendering: pixelated; }

/* Recording review (/hockey/fixture/{id}/review): mark dead time on the recording. */
.hkr { display: grid; gap: 14px; }
.hkr-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.hkr-head h1 { margin: 4px 0 6px; font-size: 1.5rem; }
.hkr-head p, .hkr-meta { margin: 0; color: var(--text-secondary); font-size: .9rem; max-width: 640px; }
.hkr-meta { font-size: .8rem; color: var(--text-muted); }
.hkr-back { font-size: .85rem; color: var(--text-muted); }
.hkr-sum { display: flex; gap: 18px; }
.hkr-sum div { display: flex; flex-direction: column; align-items: flex-end; }
.hkr-sum b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.hkr-sum span { font-size: .75rem; color: var(--text-muted); }
.hkr-card { padding: 0; overflow: hidden; }
.hkr-rink { position: relative; padding: 8px; background: #1e293b; }
.hkr-rink canvas { display: block; width: 100%; }
.hkr-bug { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 8px 4px 0; color: #e2e8f0; font-size: .85rem; }
.hkr-bug b { font-variant-numeric: tabular-nums; font-size: 1rem; }
.hkr-bug em { font-style: normal; font-weight: 700; color: #fff; background: #dc2626; padding: 1px 8px; border-radius: 999px; font-size: .75rem; }
.hkr-bug em.is-mark { background: #b45309; }
.hkr-line { display: block; width: 100%; cursor: pointer; touch-action: none; background: var(--bg-elevated); }
.hkr-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 6px 14px 0; font-size: .75rem; color: var(--text-muted); }
.hkr-legend span::before { content: ''; display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; }
.hkr-legend .is-live::before { background: rgba(34, 197, 94, .55); }
.hkr-legend .is-dead::before { background: rgba(148, 163, 184, .35); }
.hkr-legend .is-void::before { background: rgba(239, 68, 68, .75); }
.hkr-legend .is-sug::before { background: rgba(234, 179, 8, .9); height: 4px; vertical-align: 2px; }
.hkr-legend .is-goal::before { background: var(--text); clip-path: polygon(50% 100%, 0 0, 100% 0); }
.hkr-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px 14px; }
.hkr-controls select { background: var(--bg-input); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 6px; }
.hkr-gap { flex: 1; }
.hkr-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.hkr-list { padding: 14px 16px; }
.hkr-list h2 { margin: 0 0 10px; font-size: 1rem; }
.hkr-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); }
.hkr-go { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.hkr-len { font-size: .8rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.hkr-why { flex: 1; font-size: .85rem; color: var(--text-secondary); }
.hkr-row input { flex: 1; min-width: 120px; background: var(--bg-input); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px 8px; }
.hkr-added { font-size: .8rem; color: var(--green); }
.hkr-empty { margin: 0 0 12px; font-size: .85rem; color: var(--text-muted); }
.hkr-list form { display: flex; gap: 12px; align-items: center; margin-top: 12px; }
.hkr-dirty { font-size: .8rem; color: var(--yellow); }
.hkr-dirty[hidden] { display: none; }
@media (max-width: 560px) { .hkr-sum { width: 100%; justify-content: flex-start; } .hkr-sum div { align-items: flex-start; } }
.hkt-adv-sub { padding: 10px 16px 2px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); }

/* Recorded games: the Overview / Replay / Stats tabs, and the Overview cards leading to them */
.hkf-tabs { display: flex; gap: 4px; width: fit-content; max-width: 100%; margin: 1.25rem auto 0; padding: 4px; border-radius: 999px; background: var(--bg-card); border: 1px solid var(--border); overflow-x: auto; }
.hkf-tab { display: inline-flex; align-items: center; gap: 6px; padding: .5rem 1.15rem; border-radius: 999px; font-size: .88rem; font-weight: 700; color: var(--text-muted); white-space: nowrap; transition: background .15s, color .15s; }
.hkf-tab:hover { color: var(--text); background: var(--bg-hover); }
.hkf-tab.is-on { color: #fff; background: var(--accent); }
.hkf-tab span { font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, currentColor 18%, transparent); }
.hkf-teasers { display: grid; grid-template-columns: 1fr 1.4fr; gap: 14px; }
.hkf-teaser { display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; padding: 16px 18px; color: var(--text); transition: transform .15s, border-color .15s; }
.hkf-teaser:hover { transform: translateY(-2px); border-color: var(--accent); }
.hkf-teaser > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.hkf-teaser b { font-size: 1rem; }
.hkf-teaser small { font-size: .8rem; color: var(--text-secondary); }
.hkf-teaser-replay { flex-direction: row; align-items: center; justify-content: flex-start; }
.hkf-teaser-icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: var(--accent); color: #fff; }
.hkf-teaser-nums { display: flex; gap: 18px; flex-wrap: wrap; }
.hkf-teaser-nums span { display: flex; flex-direction: column; }
.hkf-teaser-nums b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .hkf-teasers { grid-template-columns: 1fr; } }
