/* Match page technicals + game progression (partials/_match_technicals.html,
   partials/_match_progression.html, js/match_progression.js). Hand-written: the main
   site CSS is a precompiled Tailwind subset. Team 1 teal, team 2 amber. */

/* TW / TF chips next to a team's name (same colours as the consoles) */
.mp-chips { display: inline-flex; gap: 4px; vertical-align: middle; margin-top: 4px; }
.mp-chip { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 6px; border: 0;
  font-size: 11px; font-weight: 800; letter-spacing: .03em; line-height: 1.5; color: #fff; cursor: pointer; }
.mp-chip-tw { background: #f59e0b; }
.mp-chip-tf { background: #dc2626; }
.mp-chip:hover { filter: brightness(.95); }
.mp-chip:focus-visible { outline: 2px solid #1f2937; outline-offset: 2px; }

/* Red line when a technical foul carries a point between matches */
.mp-tech-lines { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; }
.mp-tech-line { margin: 0; padding: 8px 12px; border-radius: 10px; background: #fef2f2; border: 1px solid #fecaca;
  color: #b91c1c; font-size: 13px; font-weight: 600; line-height: 1.35; }

/* A team's technicals: bottom sheet on phones, centred box from 640px */
body.mp-sheet-open { overflow: hidden; }
.mp-sheet-back { position: fixed; inset: 0; z-index: 1200; background: rgba(15, 23, 42, .45);
  display: flex; align-items: flex-end; justify-content: center; }
.mp-sheet-back[hidden] { display: none; }
.mp-sheet { width: 100%; max-width: 32rem; background: #fff; border-radius: 16px 16px 0 0; padding: 16px 16px 24px;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, .18); max-height: 80vh; overflow-y: auto; }
@media (min-width: 640px) {
  .mp-sheet-back { align-items: center; }
  .mp-sheet { border-radius: 16px; max-width: 26rem; padding-bottom: 16px; }
}
.mp-sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.mp-sheet-title { flex: 1; min-width: 0; margin: 0; font-size: 16px; font-weight: 700; color: #111827; overflow-wrap: anywhere; }
.mp-sheet-x { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; border: 1px solid #e5e7eb; background: #fff;
  font-size: 22px; line-height: 1; color: #374151; cursor: pointer; }
.mp-sheet-x:hover { background: #f3f4f6; }
.mp-tech-list { list-style: none; margin: 0; padding: 0; }
.mp-tech-list[hidden] { display: none; }
.mp-tech-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-left: 4px solid #f59e0b;
  background: #fffbeb; border-radius: 8px; margin-bottom: 8px; }
.mp-tech-row.is-foul { border-left-color: #dc2626; background: #fef2f2; }
.mp-tech-label { font-size: 14px; font-weight: 700; color: #111827; }
.mp-tech-detail { font-size: 13px; color: #4b5563; font-variant-numeric: tabular-nums; }

/* Game progression */
.mp-prog[hidden] { display: none; }
.mp-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mp-tabs[hidden] { display: none; }
.mp-tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px;
  border: 1px solid #d1d5db; background: #fff; color: #374151; font-size: 13px; font-weight: 600; cursor: pointer;
  font-variant-numeric: tabular-nums; }
.mp-tab:hover { background: #f3f4f6; }
.mp-tab.is-on { background: #0f172a; border-color: #0f172a; color: #fff; }
.mp-tab b { font-weight: 800; }
.mp-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 6px; }
.mp-key { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; font-size: 13px; color: #374151; }
.mp-key b { font-size: 15px; font-weight: 800; color: #111827; font-variant-numeric: tabular-nums; }
.mp-key-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; }
.mp-chart { width: 100%; overflow: hidden; }
.mp-svg { display: block; }
.mp-grid { stroke: #eef0f3; stroke-width: 1; }
.mp-axis { stroke: #d1d5db; stroke-width: 1; }
.mp-tick { font-size: 10px; fill: #9ca3af; font-family: inherit; }
.mp-end { font-size: 12px; font-weight: 800; font-family: inherit; }
.mp-mark-tf { fill: #dc2626; }
.mp-mark-tw { fill: #f59e0b; }
.mp-mark-to { font-size: 10px; font-weight: 800; fill: #9ca3af; font-family: inherit; }

.mp-log-btn { display: inline-flex; align-items: center; margin-top: 8px; padding: 7px 14px; border-radius: 10px;
  border: 1px solid #d1d5db; background: #fff; color: #374151; font-size: 13px; font-weight: 600; cursor: pointer; }
.mp-log-btn:hover { background: #f3f4f6; }
.mp-log { list-style: none; margin: 10px 0 0; padding: 0; max-height: 420px; overflow-y: auto; border-top: 1px solid #f1f5f9; }
.mp-log[hidden] { display: none; }
.mp-row { display: flex; align-items: baseline; gap: 10px; padding: 7px 2px; border-bottom: 1px solid #f1f5f9; font-size: 13px; }
.mp-call { flex: 0 0 52px; font-weight: 800; color: #111827; font-variant-numeric: tabular-nums; }
.mp-what { flex: 1 1 auto; min-width: 0; color: #111827; overflow-wrap: anywhere; }
.mp-time { flex: 0 0 auto; color: #9ca3af; font-size: 12px; font-variant-numeric: tabular-nums; }
.mp-k-side-out .mp-what, .mp-k-second .mp-what, .mp-k-edit .mp-what { color: #9ca3af; }
.mp-k-side-out .mp-call, .mp-k-second .mp-call { color: #6b7280; font-weight: 600; }
.mp-k-timeout .mp-what { color: #b45309; font-weight: 600; }
.mp-k-tech-warning .mp-what { color: #b45309; font-weight: 700; }
.mp-k-tech-rally .mp-what, .mp-k-tech-next .mp-what, .mp-k-tech-point .mp-what { color: #dc2626; font-weight: 700; }
.mp-k-start .mp-what, .mp-k-end .mp-what { font-weight: 700; }
