/* Match review and court map (match-review.js) and the matches list (matches.js). Theme tokens only (tokens.css);
   the heat ramp (amber, red) is painted by the script. Court, heatmap and scores are left to right in Arabic. */

.rv-card{overflow:hidden;position:relative}
.v27-map-body>*{min-width:0}
.v27-map-body.v27-no-court{grid-template-columns:minmax(0,1fr)}   /* a 2.7 match with contact heights but no arrows */
.rv-h{font-size:15px;margin:0 0 12px}

/* loading and failure */
.rv-skel-wrap{display:grid;gap:12px;margin:12px 0}
.rv-skel{height:64px;border-radius:var(--r-lg);background:linear-gradient(90deg,var(--line-2),var(--surface),var(--line-2));background-size:200% 100%;animation:rv-shine 1.4s ease-in-out infinite}
@keyframes rv-shine{0%{background-position:100% 0}100%{background-position:-100% 0}}
@media (prefers-reduced-motion:reduce){.rv-skel{animation:none}}
.rv-fail{background:var(--high-t);border:1px solid var(--high);color:var(--high);border-radius:var(--r-md);padding:var(--sp-4)}
.rv-fail p{margin:0 0 var(--sp-3);font-weight:600}
.rv-fail button{min-height:48px}

/* header pill: amber "Not finished" */
.rv-nf{background:var(--caution-t);color:var(--caution)}

/* score by sets */
.rv-sets{direction:ltr;border-collapse:collapse;min-width:0}
.rv-sets th{text-align:left;font-weight:600;padding:6px 14px 6px 0}
/* a long name is cut with "…" (table cells ignore max-width, so the limit sits on an inner block) */
.rv-sets .rv-nm{display:block;max-width:min(12em,38vw);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rv-stat-set{font-weight:500;color:var(--ink-3)}
.rv-stat-set:empty{display:none}
.rv-sets td{font-family:var(--display);font-size:22px;padding:4px 10px;text-align:center;color:var(--ink-3);min-width:2.2em}
.rv-sets td.rv-win{color:var(--ink);font-weight:700}
.rv-sets sup{font-size:12px;font-weight:600;margin-left:1px}

/* key numbers */
.rv-tiles{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (min-width:640px){.rv-tiles{grid-template-columns:repeat(3,1fr)}}
.rv-tile{background:var(--bg);border:1px solid var(--line-2);border-radius:var(--r-md);padding:10px 12px;min-width:0}
.rv-tl{font-size:var(--fs-sm);font-weight:600;color:var(--ink-2)}
.rv-tv{font-family:var(--display);font-size:26px;font-weight:700;color:var(--brand);line-height:1.2;text-align:start;unicode-bidi:isolate}
[dir=rtl] .rv-tv{text-align:right}
.rv-ts{font-size:var(--fs-xs);color:var(--ink-3)}

/* chips and tabs (48px targets) */
.rv-chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.rv-chip{min-height:48px;padding:0 16px;border-radius:var(--r-pill);background:var(--surface);color:var(--ink);border:1px solid var(--line);font-weight:500;font-size:14px}
.rv-chip.on{background:var(--brand);border-color:var(--brand);color:var(--on-brand)}
.rv-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;background:var(--line-2);border-radius:var(--r-md);padding:4px;margin:0 0 12px}
.rv-tab{min-height:48px;padding:4px 6px;border-radius:9px;background:none;color:var(--ink-2);font-weight:600;font-size:13px;line-height:1.2;white-space:normal}
.rv-tab.on{background:var(--surface);color:var(--brand);box-shadow:0 1px 3px rgba(0,0,0,.12)}
.rv-switch{display:inline-flex;align-items:center;gap:10px;min-height:48px;font-weight:600;cursor:pointer}
.rv-switch input{width:22px;height:22px;accent-color:var(--brand)}

/* the court with its heat, zone numbers and dots */
.rv-court{position:relative;direction:ltr;margin:4px auto 8px;width:min(100%,340px,calc(64vh * 15.358 / 33.278));aspect-ratio:15.358/33.278;border-radius:var(--r-md);overflow:hidden}
.rv-court>.trk-court,.rv-court>.rv-heat,.rv-court>.rv-over{position:absolute;inset:0;width:100%;height:100%}
.rv-heat{image-rendering:auto;pointer-events:none}
.rv-over{pointer-events:none;overflow:visible}
.rv-court-dots{cursor:pointer}
.rv-zone{font:700 1.5px var(--display);fill:var(--ink);stroke:var(--surface);stroke-width:.35px;paint-order:stroke}
.rv-pt.won{fill:var(--brand);stroke:var(--surface);stroke-width:1px}
.rv-pt.lost{fill:var(--surface);stroke:var(--high);stroke-width:2px}
.rv-pick{fill:none;stroke:var(--ink);stroke-width:2.5px}
.rv-count{font-weight:600;margin:4px 0;text-align:center}
.rv-empty{text-align:center}
.rv-picked{display:flex;align-items:center;gap:12px;background:var(--bg);border:1px solid var(--line);border-radius:var(--r-md);padding:8px 8px 8px 12px;margin:8px 0}
.rv-picked>div{flex:1;min-width:0}
.rv-close{min-height:48px;flex:none}
.rv-legend{direction:ltr;display:flex;align-items:center;gap:8px;font-size:var(--fs-sm);color:var(--ink-2);margin-top:8px}
.rv-ramp{flex:1;max-width:220px;height:12px;border-radius:6px;border:1px solid var(--line)}
.rv-dotkey{display:flex;gap:16px;flex-wrap:wrap;font-size:var(--fs-sm);color:var(--ink-2)}
.rv-dot{display:inline-block;width:12px;height:12px;border-radius:50%;margin-inline-end:6px;vertical-align:middle;flex:none}
.rv-dot.won{background:var(--brand)}
.rv-dot.lost{background:var(--surface);border:2px solid var(--high)}

/* point by point */
.rv-pbp summary{min-height:48px;display:flex;align-items:center;gap:8px;cursor:pointer}
.rv-pbp-list{list-style:none;margin:8px 0 0;padding:0}
.rv-pl{display:flex;gap:10px;align-items:flex-start;padding:8px 0;border-top:1px solid var(--line-2)}
.rv-pl .rv-dot{margin-top:4px}
.rv-ph{font-weight:600;font-size:var(--fs-sm)}
.rv-pb{font-size:var(--fs-sm);color:var(--ink-2)}

/* last-10 card */
.rv-ten-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.rv-ten-head p{margin:0}
.rv-ten-btn{min-height:48px;min-width:96px;flex:none}
.rv-ten-body{margin-top:12px}
.rv-ten-count{font-weight:600}

/* matches list: the court icon of a tracked match, the track button */
.rv-icon-cell{width:48px;padding:0 !important}
.rv-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:var(--r-md);color:var(--brand)}
.rv-icon-btn:hover{background:var(--brand-soft)}
.rv-list-top{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.rv-list-top .btn{margin-inline-start:auto;min-height:48px}
.rv-actions{margin:0 0 16px;flex-wrap:wrap}
.local-row .btn{min-height:48px}

/* legacy shot map (match-shots.js): outcome colours from the theme */
.ct-shot.e-W line{stroke:var(--c-win)}.ct-shot.e-FE line{stroke:var(--c-fe)}.ct-shot.e-UE line{stroke:var(--c-ue)}.ct-shot.e-X line{stroke:var(--accent)}
.ct-shot circle{fill:var(--surface)}.ct-shot.e-W circle{stroke:var(--c-win)}.ct-shot.e-FE circle{stroke:var(--c-fe)}.ct-shot.e-UE circle{stroke:var(--c-ue)}.ct-shot.e-X circle{stroke:var(--accent)}
.ct-ah.e-W path{fill:var(--c-win)}.ct-ah.e-FE path{fill:var(--c-fe)}.ct-ah.e-UE path{fill:var(--c-ue)}.ct-ah.e-X path{fill:var(--accent)}

@media (max-width:420px){.rv-sets td{font-size:19px;padding:4px 7px}.rv-tv{font-size:22px}}
.sr-only{position:absolute !important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
