/* Match-analysis page, Compare tab (ai-docs/MATCH_ANALYSIS_COMPARE_FAR_COURT_PLAN.md U3): one
   block per stat with a row per player, the depth rows and the targeting grids. Reuses
   .ma-mix-bar / .ma-bg1 / .ma-h2h (content.css), .ma-seg-scroll and the depth --ma-z colours
   (shotmap.css). Tokens in layout.css. */
/* Sub-tabs (plan v2): the first-level row, active = solid navy; the shot type row inside Shots
   keeps the lighter white-pill look, so the two levels never look the same */
.ma-seg-main { margin-bottom: 12px; }
.ma-seg-main .ma-seg-btn[aria-selected="true"] { background: var(--ma-navy); color: #fff; box-shadow: none; }
.ma-csub[hidden] { display: none; }
.ma-cpanel { margin-top: 4px; }
.ma-cpanel[hidden] { display: none; }
.ma-cblk { padding: 12px 0 6px; border-top: 1px solid var(--ma-line); }
.ma-cpanel > .ma-cblk:first-child, .ma-h2 + .ma-cblk { border-top: 0; }
.ma-cblk-l { font-size: 13px; font-weight: 800; color: var(--ma-navy); margin-bottom: 2px; }
.ma-cblk-h { font-size: 12px; color: var(--ma-muted); margin-bottom: 2px; }
.ma-crow { display: grid; grid-template-columns: 76px minmax(0, 1fr) 68px; align-items: center;
  gap: 10px; min-height: 36px; }
.ma-crow-name { font-size: 13px; font-weight: 600; color: #334155; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.ma-crow-v { text-align: right; font-size: 15px; font-weight: 800; color: var(--ma-navy); line-height: 1.15; }
.ma-crow-v small { font-size: 11px; font-weight: 600; color: var(--ma-muted); }
.ma-crow-v .ma-crow-u { margin-left: 2px; }
.ma-crow-v .ma-crow-s { display: block; }
.ma-crow-v .ma-none { color: var(--ma-soft); }

/* Parts (Depth: deep / medium / short; 3rd shot: won outright / error; speed-ups: won / reset / lost): a %
   per part, a stacked bar under them */
.ma-cdepth { display: grid; grid-template-columns: 84px repeat(var(--ma-parts, 3), minmax(0, 1fr));
  align-items: center; gap: 4px 10px; padding: 6px 0; }
.ma-crow-dir { display: flex; align-items: center; gap: 3px; }     /* speed-ups: name + arrow */
.ma-crow-dir span { overflow: hidden; text-overflow: ellipsis; }
.ma-carrow { flex: none; width: 15px; height: 15px; fill: none; stroke: var(--ma-navy); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.ma-cdepth b { font-size: 15px; font-weight: 800; color: var(--ma-navy); }
.ma-cdepth b small { display: block; font-size: 11px; font-weight: 600; color: var(--ma-muted); }
.ma-cdepth-head { padding: 0 0 2px; font-size: 11px; font-weight: 700; color: var(--ma-muted); }
.ma-cdepth-head i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .15); }
.ma-cdepth .ma-z-deep { background: var(--ma-z1); }
.ma-cdepth .ma-z-medium { background: var(--ma-z2); }
.ma-cdepth .ma-z-short { background: var(--ma-z3); }
.ma-cdepth .ma-z-kitchen { background: #0B1D33; }
.ma-z-won { background: #16A34A; }             /* won / reset / lost: also the Players tab's Speed-ups */
.ma-z-reset { background: #64748B; }
.ma-z-error, .ma-z-lost { background: #DC2626; }
.ma-z-missed { background: #DC2626; }          /* 3rd shot: Missed / Lost before the kitchen (Bryan 11-11) */
.ma-z-before { background: #F87171; }
.ma-cdepth-bar { grid-column: 2 / -1; display: flex; height: 8px; border-radius: 999px; overflow: hidden;
  background: var(--ma-bg); }
.ma-cdepth-bar > * + * { border-left: 2px solid #fff; }
.ma-cdepth-none { grid-column: 2 / -1; font-size: 13px; color: var(--ma-muted); }

/* Targeting: per team, hitters down, opponents across; the cell's tint = its share */
.ma-tg { margin-top: 14px; }
.ma-tg-row { display: grid; grid-template-columns: 76px repeat(var(--ma-cols, 2), minmax(0, 1fr));
  gap: 6px; align-items: center; }
.ma-tg-row + .ma-tg-row { margin-top: 6px; }
.ma-tg-head { font-size: 12px; font-weight: 800; text-align: center; }
.ma-tg-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-tg-head .ma-tg-team { text-align: left; }
.ma-tg-cell { position: relative; overflow: hidden; border: 1px solid var(--ma-line); border-radius: 10px;
  padding: 7px 4px; text-align: center; }
.ma-tg-cell::before { content: ''; position: absolute; inset: 0; background: var(--ma-side);
  opacity: calc(var(--ma-a, 0) * .45); }
.ma-tg-cell b, .ma-tg-cell small { position: relative; display: block; }
.ma-tg-cell b { font-family: 'Sora', sans-serif; font-size: 18px; font-weight: 800; color: var(--ma-navy);
  line-height: 1.15; }
.ma-tg-cell small { font-size: 11px; color: #334155; }

/* Tap to watch (ai-docs/MATCH_ANALYSIS_COMPARE_CLICKABLE_PLAN.md): a bar row, a %, a bar segment, a team's %
   or a targeting cell that plays its clips (player.js). :where keeps the button reset weaker than each look */
:where(.ma-clips) { border: 0; padding: 0; margin: 0; background: none; color: inherit; font: inherit;
  text-align: inherit; cursor: pointer; }
.ma-ctap { margin: 0 0 6px; }
button.ma-crow { width: calc(100% + 12px); margin: 0 -6px; padding: 0 6px; border-radius: 8px; }
button.ma-cpart, button.ma-h2h-v { display: block; margin: 0 -6px; padding: 2px 6px; border-radius: 6px; }
button.ma-tg-cell { width: 100%; }
.ma-clips.ma-crow:hover, .ma-clips.ma-cpart:hover, .ma-clips.ma-h2h-v:hover { background: var(--ma-teal-soft); }
.ma-clips.ma-tg-cell:hover { border-color: var(--ma-teal); }
.ma-clips.is-now { background: var(--ma-teal-soft); box-shadow: inset 0 0 0 1.5px var(--ma-teal); }
.ma-cdepth-bar > .ma-clips, .ma-split > .ma-clips { height: 100%; }
.ma-cdepth-bar > .ma-clips:hover, .ma-split > .ma-clips:hover { filter: brightness(.88); }
.ma-split .ma-split-a { background: var(--ma-teal); border-right: 2px solid #fff; }
.ma-split .ma-split-b { flex: 1; background: none; border: 0; }
