/* Match-analysis page: the Basic view (plan 2026-11-08 part 4; templates _basic_*.html). Team colours come from the
   page's .ma-side-N (--ma-side); --ma-bv-light is the lighter one for Kitchen / Mid / Reset by opponents. */
.ma-side-1 { --ma-bv-light: #67E8F9; --ma-bv-ink: #fff; --ma-bv-text: #0E7490; }
.ma-side-2 { --ma-bv-light: #FCD34D; --ma-bv-ink: #0F172A; --ma-bv-text: #B45309; }
.ma-side-0 { --ma-bv-light: #CBD5E1; --ma-bv-ink: #fff; --ma-bv-text: #334155; }
.ma-bv .is-a { background: var(--ma-side); }
.ma-bv .is-b { background: var(--ma-bv-light); }
.ma-bv .is-bad { background: #F87171; }
.ma-bv .is-gray { background: #94A3B8; }
.ma-bv .is-slate { background: #64748B; }
.ma-bv .is-outl { background: #FCA5A5; }

/* Bars */
.ma-bv-track { display: flex; height: 8px; border-radius: 999px; background: var(--ma-line); overflow: hidden; }
.ma-bv-track > span { display: block; height: 100%; }
.ma-bv-track:not(.is-split) > span { border-radius: 999px; }
.ma-bv-split { display: flex; flex-direction: column; gap: 8px; }
.ma-bv-split .ma-bv-track { height: 10px; }
.ma-bv-split.is-lg .ma-bv-track { height: 12px; }
.ma-bv-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; font-weight: 600; color: #334155; }
.ma-bv-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.ma-bv-legend .ma-tip-btn { margin-left: -6px; }
.ma-bv-legend i { width: 8px; height: 8px; border-radius: 999px; flex: none; }
.ma-bv-i { width: 18px; height: 18px; flex: none; margin-left: auto; fill: none; stroke: var(--ma-muted); stroke-width: 2;
  stroke-linecap: round; }
.ma-bv-best { font-size: 11px; font-weight: 800; color: var(--ma-teal-d); background: var(--ma-teal-soft); border-radius: 999px;
  padding: 2px 8px; }
/* The card's quality, small, an add-on (Bryan 2026-11-09) */
.ma-bv-chip { margin-left: auto; flex: none; font-size: 11px; font-weight: 600; color: #475569; background: #F1F5F9;
  border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.ma-bv-chip b { font-weight: 800; color: var(--ma-navy); }
/* A number from 1 or 2 shots, lighter (Bryan 2026-11-23: any number of shots shows one) */
.ma-bv-chip.is-low { opacity: .55; }
.ma-bv-row { display: flex; align-items: center; gap: 6px; }
/* Tooltips: a small (i) button, its line in one bubble (basic.js) */
.ma-tip-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 24px; height: 24px; margin: -4px -2px -4px 2px; padding: 0; border: 0; border-radius: 999px; background: none;
  cursor: pointer; vertical-align: middle; }
.ma-tip-btn::after { content: ''; position: absolute; inset: -8px; }
.ma-tip-btn .ma-bv-i { width: 16px; height: 16px; margin: 0; }
.ma-tip-btn:hover .ma-bv-i, .ma-tip-btn[aria-expanded="true"] .ma-bv-i { stroke: var(--ma-teal-d); }
.ma-tip-btn[aria-expanded="true"] { background: var(--ma-teal-soft); }
.ma-tip-box { position: fixed; z-index: 1200; max-width: min(280px, calc(100vw - 24px)); padding: 8px 12px;
  border-radius: 10px; background: var(--ma-navy); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.4;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .25); pointer-events: none; }
.ma-tip-box[hidden] { display: none; }

/* Match tab: Team by team, player tiles */
.ma-bv-key { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 10px; font-size: 12px; font-weight: 600;
  color: #334155; }
.ma-bv-trows { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.ma-bv-trow { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: center; width: 100%;
  min-height: 60px; padding: 10px 12px; background: #fff; border: 1px solid var(--ma-line); border-radius: 12px;
  text-align: left; cursor: pointer; color: var(--ma-text); }
.ma-bv-trow:hover, .ma-bv-card:hover, .ma-bv-sm:hover { border-color: var(--ma-soft); }
.ma-bv-tl { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.ma-bv-tl .ma-bv-i { width: 16px; height: 16px; margin-left: 0; }
/* "Quality" right on top of the % it explains (Bryan 11-17) */
.ma-bv-qh { font-size: 11px; font-weight: 500; line-height: 1; color: var(--ma-muted); text-align: right; white-space: nowrap; }
.ma-bv-qrow { margin-bottom: -4px; }
.ma-bv-tg span.ma-bv-tq { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; opacity: 1; }
.ma-bv-tg[aria-pressed="true"] .ma-bv-qh { color: inherit; opacity: .8; }
.ma-bv-tbars { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ma-bv-tbar { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 8px; align-items: center; }
.ma-bv-tv { font-size: 13px; font-weight: 600; text-align: right; color: #475569; }
.ma-bv-tbar.is-lead .ma-bv-tv { font-weight: 800; color: var(--ma-bv-text); }
.ma[data-ma-level="basic"] .ma-bv-adv-only, .ma[data-ma-level="advanced"] .ma-bv-basic-only { display: none; }
.ma-ptile-sub.ma-bv-lead { align-self: flex-start; margin-top: 3px; padding: 2px 8px; border-radius: 999px;
  background: var(--ma-teal-soft); color: var(--ma-teal-d); font-weight: 700; white-space: normal; }
.ma-bv + .ma-longest, .ma-only-basic .ma-longest { margin-top: 14px; }

/* Players tab: note, cards, small cards */
.ma-bv-note { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--ma-teal-soft); border: 1px solid #A5F3FC;
  font-size: 14px; line-height: 1.5; font-weight: 600; color: #164E63; }
.ma-bv-cards { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.ma-bv-card, .ma-bv-sm { display: flex; flex-direction: column; align-items: stretch; width: 100%; background: #fff;
  border: 1px solid var(--ma-line); text-align: left; cursor: pointer; color: var(--ma-text); }
.ma-bv-card { gap: 12px; padding: 14px; border-radius: 16px; }
.ma-bv-card.is-best, .ma-bv-sm.is-best { border-color: var(--ma-bv-light); box-shadow: 0 0 0 1px var(--ma-bv-light); }
.ma-bv-head { display: flex; align-items: center; gap: 8px; }
.ma-bv-label { font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 700; color: var(--ma-navy); }
.ma-bv-made { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--ma-line); padding-top: 12px; }
.ma-bv-mh { font-size: 12px; font-weight: 700; color: #475569; }
.ma-bv-mrow { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px 40px; gap: 8px; align-items: center; }
.ma-bv-mrow .ma-bv-track { height: 6px; }
.ma-bv-ml { font-size: 13px; font-weight: 700; }
.ma-bv-mrow b { font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 800; text-align: right; }
.ma-bv-mp { font-size: 12px; color: #475569; text-align: right; }
.ma-bv-small { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.ma-bv-sm { gap: 6px; padding: 12px; min-height: 104px; border-radius: 14px; }
.ma-bv-sm.is-wide { grid-column: 1 / -1; min-height: 0; }
.ma-bv-sm .ma-bv-label { font-family: inherit; font-size: 13px; color: #334155; }
.ma-bv-big { font-family: 'Sora', sans-serif; font-size: 26px; font-weight: 800; line-height: 1.2; color: var(--ma-navy); }
.ma-bv-big.is-word { font-size: 16px; }
.ma-bv-sm .ma-bv-track { height: 6px; }
.ma-bv-sub { font-size: 12px; color: #475569; min-height: 1em; }
.ma-bv-all { margin-top: 16px; min-height: 48px; }

/* Sheets */
.ma-bv-sheet { display: flex; flex-direction: column; gap: 14px; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px);
  overflow-y: auto; overscroll-behavior: contain; }
.ma-bv-sheet .ma-sheet-grip { margin-bottom: 0; flex: none; }
.ma-bv-shead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ma-bv-stitle { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ma-bv-count { font-size: 13px; color: #475569; }
.ma-bv-sbig { display: inline-flex; align-items: center; font-family: 'Sora', sans-serif; font-size: 24px; font-weight: 800;
  color: var(--ma-navy); }
.ma-bv-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; color: #475569;
  white-space: nowrap; }
.ma-bv-stats b { font-weight: 800; color: var(--ma-text); }
.ma-bv-stats > span { display: inline-flex; align-items: center; gap: 3px; }
.ma-bv-ttitle { display: flex; align-items: center; gap: 4px; }
.ma-bv-list { display: flex; flex-direction: column; gap: 10px; }
.ma-bv-sheet > .ma-bv-list + .ma-bv-list { padding-top: 14px; border-top: 1px solid #E2E8F0; }
.ma-bv-lrow { display: grid; grid-template-columns: 140px minmax(0, 1fr) 52px; gap: 10px; align-items: center; }
.ma-bv-ll { display: flex; align-items: center; font-size: 14px; font-weight: 700; }
.ma-bv-lrow b { font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 800; text-align: right; }
.ma-bv-view { display: flex; flex-direction: column; gap: 8px; }
.ma-bv-vhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; }
.ma-bv-vt { font-size: 13px; font-weight: 700; color: #334155; }
.ma-bv-court { display: block; width: 100%; height: auto; }
.ma-bv-apron { fill: #E8EEF5; }
.ma-bv-sky { fill: #F8FAFC; }
.ma-bv-floor { fill: #D6E2EE; }
.ma-bv-kitchen { fill: #C3D3E4; }
.ma-bv-ground { fill: #94A3B8; }
.ma-bv-band { fill-opacity: .35; }
.ma-bv-band.is-a { fill: var(--ma-side); }
.ma-bv-band.is-b { fill: var(--ma-bv-light); }
.ma-bv-band.is-gray { fill: #94A3B8; }
.ma-bv-line { fill: none; stroke: #94A3B8; stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.ma-bv-sideview .ma-bv-line { stroke: #fff; stroke-width: 2px; }   /* the kitchen lines on the ground (Bryan 11-11) */
.ma-bv-net { stroke: var(--ma-navy); stroke-width: 3px; vector-effect: non-scaling-stroke; }
.ma-bv-who { fill: #64748B; font-size: 1.6px; font-weight: 700; text-anchor: middle; }
.ma-bv-ln { stroke: var(--ma-side); stroke-opacity: .35; stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.ma-bv-dot { fill: var(--ma-side); stroke: #fff; stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.ma-bv-dot.is-ring { fill: #fff; stroke: var(--ma-side); stroke-width: 2.5px; }
.ma-bv-dot.is-net { fill: #F87171; }
.ma-bv-dot.is-ring.is-net { fill: #fff; stroke: #F87171; }
.ma-bv-arc { fill: none; stroke: var(--ma-side); stroke-opacity: .8; stroke-width: 2.5px; vector-effect: non-scaling-stroke; }
.ma-bv-toggle { display: flex; gap: 6px; }
.ma-bv-tg { min-height: 40px; min-width: 72px; padding: 0 12px; border-radius: 12px; border: 1px solid #CBD5E1; background: #fff;
  color: var(--ma-text); font-size: 13px; font-weight: 700; cursor: pointer; }
.ma-bv-tg span { font-weight: 600; opacity: .75; }
.ma-bv-tg[aria-pressed="true"] { background: var(--ma-side); border-color: var(--ma-side); color: var(--ma-bv-ink); }
.ma-bv-tg:disabled { opacity: .4; cursor: default; }
.ma-bv-third[data-bv-side="drive"] [data-bv-g="drop"], .ma-bv-third[data-bv-side="drop"] [data-bv-g="drive"],
.ma-bv-third[data-bv-side="drive"] [data-bv-k]:not([data-bv-k="drive"]),
.ma-bv-third[data-bv-side="drop"] [data-bv-k]:not([data-bv-k="drop"]) { display: none; }
.ma-bv-acts { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 8px; }
.ma-bv-acts > :only-child { grid-column: 1 / -1; }
.ma-bv-acts .ma-btn, .ma-watch.ma-bv-watch { min-height: 48px; border-radius: 12px; font-size: 15px; }
.ma-watch.ma-bv-watch { width: 100%; }
.ma-bv-tlines { display: flex; flex-direction: column; gap: 6px; }
.ma-bv-tline { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-radius: 10px; background: #F8FAFC;
  font-size: 14px; font-weight: 600; }
.ma-bv-tline > span:not(.ma-dot) { flex: 1; min-width: 0; }
.ma-bv-tline .ma-dot { flex: none; margin-right: 4px; }
.ma-bv-tline b { font-weight: 600; color: #475569; }
.ma-bv-tline.is-lead b { font-weight: 800; color: var(--ma-bv-text); }
.ma-bv-tgroup { display: flex; flex-direction: column; gap: 6px; }
.ma-bv-gh { display: flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 700; color: #475569; }
.ma-bv-xtab { display: flex; flex-direction: column; border-radius: 10px; background: #F8FAFC; padding: 4px 12px; }
.ma-bv-xrow { display: grid; grid-template-columns: minmax(0, 1fr) 96px 96px; gap: 8px; align-items: center;
  min-height: 40px; font-size: 14px; font-weight: 600; }
.ma-bv-xrow + .ma-bv-xrow { border-top: 1px solid #E2E8F0; }
.ma-bv-xrow.is-head { min-height: 36px; font-size: 12px; font-weight: 700; color: #64748B; }
.ma-bv-xn { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; }
.ma-bv-xn > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ma-bv-xrow b { font-family: 'Sora', sans-serif; font-size: 15px; font-weight: 800; text-align: right; color: var(--ma-bv-text); }
/* Match tab area sheets (plan 2026-11-10, _basic_team_sheets.html): team buttons, the Team / player row, the pick's
   detail, the admin-only Scoring box. */
.ma-bv-picks { display: flex; flex-direction: column; gap: 8px; }
.ma-bv-picks .ma-bv-toggle > .ma-bv-tg { flex: 1 1 0; min-width: 0; }
.ma-bv-toggle[hidden], .ma-bv-panel[hidden], .ma-bv-acts[hidden] { display: none; }
.ma-bv-tg.ma-bv-team { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px;
  padding: 6px 12px; }
.ma-bv-team .ma-bv-tn { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  text-align: left; line-height: 1.25; font-weight: 700; opacity: 1; overflow-wrap: anywhere; }
.ma-bv-team b { flex: none; font-family: 'Sora', sans-serif; font-size: 16px; font-weight: 600; }
.ma-bv-team.is-lead b { font-weight: 800; }
.ma-bv-team.is-lead[aria-pressed="false"] b { color: var(--ma-bv-text); }
.ma-bv-panel { display: flex; flex-direction: column; gap: 14px; }
.ma-bv-panel > .ma-bv-shead { align-items: center; }
.ma-bv-panel > .ma-bv-list + .ma-bv-list { padding-top: 14px; border-top: 1px solid #E2E8F0; }
.ma-bv-score { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; border: 1px dashed #94A3B8;
  background: #F8FAFC; }
.ma-bv-tiers { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: #475569; }
.ma-bv-tiers b { color: var(--ma-text); }
.ma-bv-slide { display: grid; grid-template-columns: 6.5em minmax(0, 1fr) 36px; gap: 10px; align-items: center;
  font-size: 13px; font-weight: 700; }                  /* a fixed label column: a box's slider tracks line up */
.ma-bv-slide input { width: 100%; min-height: 32px; accent-color: var(--ma-navy); }
.ma-bv-slide b { font-family: 'Sora', sans-serif; text-align: right; }
.ma-bv-calc { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; font-size: 12px; }
.ma-bv-cn { display: flex; align-items: center; gap: 4px; font-weight: 700; min-width: 0; }
.ma-bv-cs { grid-column: 1 / -1; grid-row: 2; color: #475569; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ma-bv-calc b { font-family: 'Sora', sans-serif; font-size: 14px; font-weight: 800; color: var(--ma-bv-text); }
.ma-bv-sacts { display: flex; justify-content: flex-end; gap: 8px; }
.ma-bv-smsg { margin: 0; font-size: 12px; font-weight: 600; color: #475569; }
@media (max-width: 359px) {
  .ma-bv-trow { grid-template-columns: 92px minmax(0, 1fr); }
  .ma-bv-lrow { grid-template-columns: 124px minmax(0, 1fr) 48px; }
  .ma-bv-xrow { grid-template-columns: minmax(0, 1fr) 80px 80px; }
}
