/* ============================================================
   MatchCards.css  —  Shared modern UI for Zeetius
   Used by: Live/Results  and  Live/UpcomingMatches
   Design language inspired by BWF / FlashScore / ITF result hubs.
   Mobile-first, accessible (WCAG AA contrast, focus-visible,
   reduced-motion aware, semantic landmarks).
   ============================================================ */

:root {
    --mc-blue: #223A9E;        /* brand deep blue   */
    --mc-blue-700: #1b2f80;
    --mc-cyan: #0ca7d5;        /* brand cyan        */
    --mc-cyan-600: #0a8fb8;
    --mc-ink: #14233b;         /* primary text      */
    --mc-ink-soft: #51637a;    /* secondary text    */
    --mc-ink-faint: #8595a8;   /* tertiary text     */
    --mc-line: #e7ecf3;        /* hairlines         */
    --mc-surface: #ffffff;
    --mc-bg: #f4f7fb;          /* page background   */
    --mc-win: #0f9d6b;         /* winner green      */
    --mc-win-bg: #e7f7f0;
    --mc-amber: #b76e00;       /* walkover / note   */
    --mc-amber-bg: #fdf2dd;
    --mc-radius: 18px;
    --mc-radius-sm: 12px;
    --mc-shadow: 0 6px 24px rgba(34, 58, 158, 0.08), 0 1px 3px rgba(20, 35, 59, 0.06);
    --mc-shadow-hover: 0 14px 36px rgba(34, 58, 158, 0.16), 0 2px 6px rgba(20, 35, 59, 0.08);
    --mc-focus: 0 0 0 3px rgba(12, 167, 213, 0.45);
    --mc-font: 'Manrope', 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ---------- Shell / layout ---------- */
.mc-page {
    padding: 76px 0 48px;
    background:
        radial-gradient(1100px 460px at 50% -180px, rgba(12, 167, 213, 0.10), transparent 70%),
        var(--mc-bg);
    min-height: 100vh;
    font-family: var(--mc-font);
    color: var(--mc-ink);
    -webkit-font-smoothing: antialiased;
}

.mc-shell {
    width: 100%;
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 28px;
}

/* Hero removed on Results/Upcoming — pull content up to reclaim the space */
.mc-page--flush { padding-top: 40px; }
@media (max-width: 640px) {
    .mc-page--flush { padding-top: 64px; }
}

/* ---------- Hero header ---------- */
.mc-hero {
    text-align: center;
    margin: 4px 0 18px;
}

.mc-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--mc-blue);
    background: linear-gradient(135deg, rgba(34, 58, 158, 0.10), rgba(12, 167, 213, 0.12));
    border: 1px solid rgba(34, 58, 158, 0.16);
    padding: 6px 14px;
    border-radius: 999px;
}

.mc-eyebrow .mc-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mc-cyan);
    box-shadow: 0 0 0 4px rgba(12, 167, 213, 0.18);
}

.mc-hero h1 {
    margin: 10px 0 5px;
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--mc-ink);
}

.mc-hero p {
    margin: 0 auto;
    max-width: 560px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--mc-ink-soft);
}

/* ---------- Toolbar (filters + search) — scrolls with the page ---------- */
.mc-toolbar {
    position: static;
    background: var(--mc-surface);
    border: 1px solid var(--mc-line);
    border-radius: var(--mc-radius);
    box-shadow: var(--mc-shadow);
    padding: 14px;
    margin-bottom: 18px;
}

/* one-row toolbar: season + tournament + search */
.mc-toolbar-row {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.mc-filters {
    display: grid;
    grid-template-columns: minmax(120px, 200px) minmax(220px, 1fr);
    gap: 12px;
    flex: 1 1 480px;
    min-width: 0;
}

/* single wide tournament field (Upcoming Matches) — needs room for long names */
.mc-field--tour {
    flex: 1 1 380px;
    min-width: 240px;
}

.mc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.mc-field > label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mc-ink-faint);
    padding-left: 2px;
}

/* native select styled as a pill, custom chevron */
.mc-select {
    position: relative;
}

.mc-select::after {
    content: "";
    position: absolute;
    right: 14px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-right: 2px solid var(--mc-blue);
    border-bottom: 2px solid var(--mc-blue);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.mc-select select,
.mc-search input {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--mc-ink);
    background: #fff;
    border: 1.5px solid var(--mc-line);
    border-radius: var(--mc-radius-sm);
    padding: 11px 38px 11px 14px;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.mc-search input {
    font-weight: 600;
    cursor: text;
    padding-left: 40px;
    padding-right: 14px;
}

.mc-select select:hover,
.mc-search input:hover {
    border-color: #c7d3e6;
}

.mc-select select:focus-visible,
.mc-search input:focus-visible {
    outline: none;
    border-color: var(--mc-cyan);
    box-shadow: var(--mc-focus);
}

/* search field */
.mc-search {
    position: relative;
    flex: 1 1 260px;
    min-width: 220px;
}

.mc-search .mc-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--mc-ink-faint);
    pointer-events: none;
}

/* ---------- Meta row (count) ---------- */
.mc-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 2px 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--mc-ink-soft);
}

.mc-meta strong { color: var(--mc-ink); font-weight: 800; }

/* ---------- View toggle (Cards / Table) ---------- */
.mc-viewtoggle {
    display: inline-flex;
    flex-shrink: 0;
    background: #eef2f8;
    border: 1px solid var(--mc-line);
    border-radius: 999px;
    padding: 3px;
    gap: 2px;
}
.mc-viewbtn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    color: var(--mc-ink-soft);
    background: transparent;
    border: 0;
    border-radius: 999px;
    padding: 6px 13px;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.mc-viewbtn svg { width: 15px; height: 15px; }
.mc-viewbtn.is-active {
    background: #fff;
    color: var(--mc-blue);
    box-shadow: 0 1px 3px rgba(20, 35, 59, .12);
}

/* ---------- Table view ---------- */
.mc-tablewrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--mc-line);
    border-radius: var(--mc-radius);
    background: var(--mc-surface);
    box-shadow: var(--mc-shadow);
}
.mc-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.mc-table thead th {
    text-align: left;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--mc-ink-faint);
    padding: 12px 14px;
    background: #f5f8fc;
    border-bottom: 1px solid var(--mc-line);
    white-space: nowrap;
}
.mc-table tbody td {
    padding: 12px 14px;
    border-top: 1px solid var(--mc-line);
    font-size: 14px;
    color: var(--mc-ink);
    vertical-align: middle;
}
.mc-table tbody tr:hover { background: #f7faff; }
.mc-td-win { font-weight: 800; color: #0c5b40; }
.mc-td-win svg.mc-trophy { width: 15px; height: 15px; color: var(--mc-win); vertical-align: -2px; margin-right: 5px; }
.mc-td-sub { display: block; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--mc-ink-faint); margin-top: 1px; }
.mc-td-score { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mc-th-an, .mc-td-an { text-align: right; white-space: nowrap; }
.mc-tbtn {
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--mc-blue), var(--mc-cyan));
    border: 0;
    border-radius: 8px;
    padding: 7px 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: filter .18s ease, transform .18s ease;
}
.mc-tbtn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.mc-tdash { color: var(--mc-ink-faint); }

/* event chip on a card */
.mc-tag--event { color: #7c3aed; background: #f1ecfe; }

/* ---------- Event group heading ---------- */
.mc-group {
    margin-bottom: 22px;
}

.mc-group-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 4px 12px;
}

.mc-group-head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--mc-blue);
    white-space: nowrap;
}

.mc-group-head .mc-group-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--mc-line), transparent);
}

.mc-group-head .mc-group-count {
    font-size: 12px;
    font-weight: 700;
    color: var(--mc-ink-faint);
    background: #eef2f8;
    border-radius: 999px;
    padding: 2px 9px;
}

/* ---------- Card grid ---------- */
.mc-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(440px, 1fr));
    gap: 14px;
}

/* ---------- Match card ---------- */
.mc-card {
    background: var(--mc-surface);
    border: 1px solid var(--mc-line);
    border-radius: var(--mc-radius);
    box-shadow: var(--mc-shadow);
    padding: 14px 16px 15px;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    position: relative;
    overflow: hidden;
}

.mc-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--mc-cyan), var(--mc-blue));
    opacity: 0;
    transition: opacity .2s ease;
}

.mc-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--mc-shadow-hover);
    border-color: #d4deee;
}
.mc-card:hover::before { opacity: 1; }

.mc-card.is-clickable { cursor: pointer; }
.mc-card.is-clickable:focus-visible {
    outline: none;
    box-shadow: var(--mc-shadow-hover), var(--mc-focus);
}

/* card top row: tags + status */
.mc-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.mc-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.mc-tag {
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--mc-blue);
    background: #eef2fb;
    border-radius: 7px;
    padding: 3px 9px;
    white-space: nowrap;
}

.mc-tag--round {
    color: var(--mc-cyan-600);
    background: #e3f5fb;
}

.mc-tag--ghost {
    color: var(--mc-ink-faint);
    background: #f1f4f9;
}

/* status pill */
.mc-status {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.mc-status--final { color: var(--mc-win); background: var(--mc-win-bg); }
/* round shown top-right in place of a generic "Final" label */
.mc-status--round { color: var(--mc-cyan-600); background: #e3f5fb; }
.mc-status--walkover,
.mc-status--nomatch { color: var(--mc-amber); background: var(--mc-amber-bg); }

.mc-status--time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    background: linear-gradient(135deg, var(--mc-blue), var(--mc-cyan));
    text-transform: none;
    letter-spacing: 0.01em;
    font-size: 12px;
}
.mc-status--time svg { width: 13px; height: 13px; }

.mc-status--soon {
    color: var(--mc-cyan-600);
    background: #e3f5fb;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.mc-status--soon .mc-live-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--mc-cyan);
    animation: mc-pulse 1.6s ease-in-out infinite;
}
.mc-status--court { color: var(--mc-blue); background: #eef2fb; }

/* time-grouped schedule header (Upcoming Matches) */
.mc-group-time {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.mc-group-time svg {
    width: 17px; height: 17px;
    color: var(--mc-cyan-600);
    flex-shrink: 0;
}

/* ---------- Versus block (teams + score) ---------- */
.mc-versus {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mc-side {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 11px;
    min-width: 0;
}

.mc-side-name {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--mc-ink);
    line-height: 1.3;
    overflow-wrap: anywhere;
    min-width: 0;
}

.mc-side .mc-seed {
    font-size: 12px;
    font-weight: 700;
    color: var(--mc-ink-faint);
    flex-shrink: 0;
}

/* winner row */
.mc-side--win {
    background: var(--mc-win-bg);
}
.mc-side--win .mc-side-name {
    font-weight: 800;
    color: #0c5b40;
}
.mc-side--win .mc-trophy {
    color: var(--mc-win);
    flex-shrink: 0;
    width: 18px; height: 18px;
}

/* score band between / beside teams */
.mc-scoreband {
    align-self: center;
    margin: 3px 0;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--mc-blue);
    background: #eef2fb;
    border-radius: 9px;
    padding: 5px 14px;
    font-variant-numeric: tabular-nums;
}
.mc-scoreband--muted {
    color: var(--mc-ink-faint);
    background: #f1f4f9;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 12.5px;
}

/* VS divider for upcoming */
.mc-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 2px 0;
    color: var(--mc-ink-faint);
}
.mc-vs span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: var(--mc-ink-faint);
}
.mc-vs::before, .mc-vs::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--mc-line);
}

/* ---------- Empty state ---------- */
.mc-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 56px 20px;
    background: var(--mc-surface);
    border: 1px dashed var(--mc-line);
    border-radius: var(--mc-radius);
    color: var(--mc-ink-soft);
}
.mc-empty.is-shown { display: flex; }
.mc-empty svg { width: 46px; height: 46px; color: #c2cfe0; margin-bottom: 14px; }
.mc-empty h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; color: var(--mc-ink); }
.mc-empty p { margin: 0; font-size: 14px; max-width: 380px; }

/* ---------- Loading skeleton ---------- */
.mc-skel {
    background: var(--mc-surface);
    border: 1px solid var(--mc-line);
    border-radius: var(--mc-radius);
    padding: 16px;
    box-shadow: var(--mc-shadow);
}
.mc-skel + .mc-skel { margin-top: 12px; }
.mc-skel-line {
    height: 14px;
    border-radius: 7px;
    background: linear-gradient(90deg, #eef2f7 25%, #e2e8f1 37%, #eef2f7 63%);
    background-size: 400% 100%;
    animation: mc-shimmer 1.4s ease infinite;
    margin-bottom: 12px;
}
.mc-skel-line:last-child { margin-bottom: 0; }
.mc-skel-line.w40 { width: 40%; }
.mc-skel-line.w70 { width: 70%; }
.mc-skel-line.w55 { width: 55%; }

/* ---------- Footer note ---------- */
.mc-foot {
    margin-top: 26px;
    text-align: center;
    font-size: 12.5px;
    color: var(--mc-ink-faint);
}
.mc-foot strong { color: var(--mc-blue); font-weight: 800; }

/* ---------- Animations ---------- */
@keyframes mc-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes mc-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: .5; }
}
@keyframes mc-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.mc-card { animation: mc-rise .35s ease both; }

/* ---------- Accessibility helpers ---------- */
.mc-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;
}

@media (prefers-reduced-motion: reduce) {
    .mc-card, .mc-skel-line, .mc-live-dot, .mc-card:hover {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* ---------- Responsive ---------- */
@media (min-width: 680px) {
    .mc-toolbar { padding: 16px 18px; }
}

@media (max-width: 760px) {
    .mc-cards { grid-template-columns: 1fr; }
    .mc-toolbar-row { gap: 10px; }
    .mc-filters { flex-basis: 100%; }
    .mc-search { flex-basis: 100%; }
}

@media (max-width: 480px) {
    .mc-page { padding-top: 84px; }
    .mc-shell { padding: 0 12px; }
    .mc-card { padding: 13px 13px 14px; }
    .mc-side-name { font-size: 14.5px; }
    .mc-filters { grid-template-columns: 1fr; }

    /* score table: keep names readable and set columns aligned on small screens */
    .mc-st-row { padding: 10px 10px; gap: 8px; }
    .mc-st-head { padding: 6px 10px; }
    .mc-st-pname { font-size: 14px; }
    .mc-st-cells { gap: 4px; }
    .mc-st-cell { min-width: 20px; font-size: 14px; }
    .mc-st-sub { font-size: 10px; padding: 1px 6px; white-space: normal; max-width: 100%; }
    .mc-side { padding: 8px 8px; gap: 8px; }
    .mc-scoreband { font-size: 15px; padding: 4px 11px; }
}

/* ============================================================
   RESULTS HUB — sport tabs, date cards, set-by-set score table,
   sport chip, meta row and the ZetAI match-analysis slide-over.
   Additive: classes below are not used by UpcomingMatches.
   ============================================================ */

/* ---------- Sport tabs ---------- */
.mc-sporttabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--mc-line);
}
.mc-sporttab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--mc-ink-soft);
    background: #f1f4f9;
    border: 1.5px solid transparent;
    border-radius: 999px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.mc-sporttab:hover { background: #e7edf6; }
.mc-sporttab .mc-sporttab-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: linear-gradient(135deg, var(--mc-blue), var(--mc-cyan));
}
.mc-sporttab .mc-sporttab-count {
    font-size: 11.5px;
    font-weight: 800;
    color: var(--mc-ink-faint);
    background: #fff;
    border-radius: 999px;
    padding: 1px 7px;
    min-width: 20px;
    text-align: center;
}
.mc-sporttab.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--mc-blue), var(--mc-cyan));
    box-shadow: 0 6px 16px rgba(34, 58, 158, 0.22);
}
.mc-sporttab.is-active .mc-sporttab-dot { background: #fff; }
.mc-sporttab.is-active .mc-sporttab-count { color: var(--mc-blue); background: rgba(255,255,255,.92); }

/* ---------- Date cards ---------- */
.mc-datewrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}
.mc-date-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--mc-ink-faint);
    flex-shrink: 0;
}
.mc-dates {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 2px 6px;
    scrollbar-width: thin;
    flex: 1;
    min-width: 0;
}
.mc-dates::-webkit-scrollbar { height: 6px; }
.mc-dates::-webkit-scrollbar-thumb { background: #cdd8e8; border-radius: 6px; }
.mc-datecard {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    flex-shrink: 0;
    min-width: 56px;
    padding: 8px 12px;
    font-family: inherit;
    background: #fff;
    border: 1.5px solid var(--mc-line);
    border-radius: var(--mc-radius-sm);
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.mc-datecard:hover { border-color: #c7d3e6; transform: translateY(-1px); }
.mc-datecard-dow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--mc-ink-faint);
}
.mc-datecard-day {
    font-size: 17px;
    font-weight: 800;
    line-height: 1.05;
    color: var(--mc-ink);
    font-variant-numeric: tabular-nums;
}
.mc-datecard-mon {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--mc-ink-soft);
}
.mc-datecard--all { justify-content: center; }
.mc-datecard--all .mc-datecard-day { font-size: 14px; }
.mc-datecard.is-active {
    border-color: var(--mc-cyan);
    background: linear-gradient(160deg, #ffffff, #eaf7fc);
    box-shadow: 0 6px 16px rgba(12, 167, 213, 0.18);
}
.mc-datecard.is-active .mc-datecard-dow,
.mc-datecard.is-active .mc-datecard-mon { color: var(--mc-cyan-600); }
.mc-date-empty { font-size: 13px; color: var(--mc-ink-faint); font-weight: 600; align-self: center; }

@media (max-width: 480px) {
    .mc-datewrap { flex-direction: column; align-items: flex-start; gap: 6px; }
    .mc-dates { width: 100%; }
}

/* sport chip */
.mc-tag--sport {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1f7a4d;
    background: #e7f7ee;
}
.mc-tag--sport .mc-sport-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #06b6d4);
}

/* event group: Singles/Doubles suffix */
.mc-group-type { color: var(--mc-ink-faint); font-weight: 700; }

/* card meta row (court · time · type) */
.mc-cardmeta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 2px 11px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mc-ink-soft);
}
.mc-cardmeta .mc-dot-sep {
    width: 3px; height: 3px; border-radius: 50%;
    background: var(--mc-ink-faint);
    display: inline-block;
}

/* ---------- set-by-set score table ---------- */
.mc-scoretable {
    border: 1px solid var(--mc-line);
    border-radius: var(--mc-radius-sm);
    overflow: hidden;
}

.mc-st-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 12px;
    background: #f5f8fc;
    border-bottom: 1px solid var(--mc-line);
}
.mc-st-player {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mc-ink-faint);
}

.mc-st-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 12px;
}
.mc-st-row + .mc-st-row { border-top: 1px solid var(--mc-line); }
.mc-st-row--win { background: var(--mc-win-bg); }

.mc-st-name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}
.mc-st-name .mc-trophy { color: var(--mc-win); width: 17px; height: 17px; flex-shrink: 0; }
/* name + district stacked vertically so long names never collapse the column */
.mc-st-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
    flex: 1;
}
.mc-st-pname {
    font-size: 15px;
    font-weight: 700;
    color: var(--mc-ink);
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.mc-st-row--win .mc-st-pname { font-weight: 800; color: #0c5b40; }
.mc-st-sub {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--mc-ink-faint);
    background: #eef2f8;
    border-radius: 6px;
    padding: 2px 7px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* set columns */
.mc-st-cells {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.mc-st-cell {
    min-width: 26px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--mc-ink-soft);
}
.mc-st-cells--head .mc-st-cell {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--mc-ink-faint);
}
.mc-st-cell.won { color: var(--mc-blue); font-weight: 800; }
.mc-st-row--win .mc-st-cell { color: #0c5b40; }
.mc-st-row--win .mc-st-cell.won { color: var(--mc-win); }

/* analyze hint footer */
.mc-analyze {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 11px;
    padding-top: 11px;
    border-top: 1px dashed var(--mc-line);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--mc-ink-soft);
}
.mc-analyze strong {
    background: linear-gradient(135deg, #7c3aed, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}
.mc-analyze svg { width: 14px; height: 14px; margin-left: auto; color: var(--mc-ink-faint); transition: transform .2s ease; }
.mc-card.is-clickable:hover .mc-analyze svg { transform: translateX(3px); color: var(--mc-cyan-600); }
.mc-analyze-orb {
    width: 14px; height: 14px; border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #06b6d4 55%, #ec4899);
    box-shadow: 0 0 10px rgba(124, 58, 237, .5);
    flex-shrink: 0;
}

/* ============================================================
   MATCH ANALYSIS slide-over (dark, ZetAI theme)
   ============================================================ */
body.mca-lock { overflow: hidden; }

.mca-overlay {
    position: fixed;
    inset: 0;
    /* must sit above the Bootstrap sticky-top navbar (z-index 1020) so the
       slide-over and its scrim cover the header instead of tucking under it */
    z-index: 2000;
    visibility: hidden;
    pointer-events: none;
}
.mca-overlay.is-open { visibility: visible; pointer-events: auto; }

.mca-scrim {
    position: absolute;
    inset: 0;
    background: rgba(6, 10, 22, 0.62);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .28s ease;
}
.mca-overlay.is-open .mca-scrim { opacity: 1; }

.mca-panel {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: min(560px, 100%);
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(700px 420px at 100% -8%, rgba(124, 58, 237, .22), transparent 60%),
        radial-gradient(600px 380px at 0% 110%, rgba(6, 182, 212, .14), transparent 60%),
        #0b0f1a;
    color: #e8ecf7;
    border-left: 1px solid rgba(124, 58, 237, .35);
    box-shadow: -24px 0 60px rgba(0, 0, 0, .5);
    transform: translateX(100%);
    transition: transform .32s cubic-bezier(.4, 0, .2, 1);
}
.mca-overlay.is-open .mca-panel { transform: translateX(0); }

.mca-head {
    position: relative;
    padding: 20px 22px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    flex-shrink: 0;
}
.mca-head-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #c4b5fd;
}
.mca-orb {
    width: 16px; height: 16px; border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #06b6d4 55%, #ec4899);
    box-shadow: 0 0 16px rgba(124, 58, 237, .6);
    animation: mca-orb 2.4s ease-in-out infinite;
}
@keyframes mca-orb {
    0%, 100% { box-shadow: 0 0 14px rgba(124, 58, 237, .6); }
    50% { box-shadow: 0 0 26px rgba(6, 182, 212, .7); }
}
.mca-head h3 {
    margin: 8px 0 0;
    font-size: 19px;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    padding-right: 40px;
    word-break: break-word;
}
.mca-close {
    position: absolute;
    top: 18px; right: 18px;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #e8ecf7;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, transform .2s ease;
}
.mca-close svg { width: 18px; height: 18px; }
.mca-close:hover { background: rgba(239, 68, 68, .25); border-color: rgba(239, 68, 68, .4); transform: rotate(90deg); }

.mca-content {
    flex: 1;
    overflow-y: auto;
    padding: 18px 22px 28px;
}
.mca-content::-webkit-scrollbar { width: 7px; }
.mca-content::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #7c3aed, #06b6d4); border-radius: 6px; }
.mca-content::-webkit-scrollbar-track { background: transparent; }

/* loading + empty */
.mca-loading { text-align: center; padding: 60px 20px; color: #a9b1c7; }
.mca-spinner {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 3px solid rgba(124, 58, 237, .2);
    border-top-color: #7c3aed;
    display: inline-block;
    animation: mca-spin .8s linear infinite;
    margin-bottom: 14px;
}
@keyframes mca-spin { to { transform: rotate(360deg); } }
.mca-empty { text-align: center; padding: 56px 24px; color: #a9b1c7; }
.mca-empty svg { width: 46px; height: 46px; color: #6f7894; margin-bottom: 14px; }
.mca-empty h4 { margin: 0 0 6px; font-size: 17px; font-weight: 800; color: #e8ecf7; }
.mca-empty p { margin: 0 auto; max-width: 320px; font-size: 14px; line-height: 1.5; }

/* report */
.mca-report { animation: mc-rise .35s ease both; }

.mca-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 18px;
}
.mca-kv {
    background: linear-gradient(160deg, rgba(27, 36, 63, .85), rgba(17, 23, 42, .92));
    border: 1px solid rgba(124, 58, 237, .2);
    border-radius: 12px;
    padding: 9px 12px;
    min-width: 0;
}
.mca-k {
    display: block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6f7894;
    margin-bottom: 3px;
}
.mca-v {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: #e8ecf7;
    word-break: break-word;
}

.mca-sec {
    background: linear-gradient(160deg, rgba(22, 29, 51, .8), rgba(11, 15, 26, .9));
    border: 1px solid rgba(124, 58, 237, .2);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.mca-sec-title {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #c4b5fd, #67e8f9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.mca-pre {
    margin: 0;
    font-family: 'IBM Plex Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 12.5px;
    line-height: 1.65;
    color: #c7cfe2;
    white-space: pre-wrap;
    word-break: break-word;
}

/* match analytics block (set headline + stat tiles + set-by-set) */
.mca-analytics { animation: mc-rise .35s ease both; margin-bottom: 16px; }
.mca-an-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    color: #c4b5fd; margin-bottom: 12px;
}
.mca-headline {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    background: linear-gradient(160deg, rgba(27, 36, 63, .85), rgba(17, 23, 42, .92));
    border: 1px solid rgba(124, 58, 237, .2);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.mca-hl-team { font-size: 13.5px; font-weight: 700; color: #e8ecf7; word-break: break-word; }
.mca-hl-team--right { text-align: right; }
.mca-hl-score { font-size: 22px; font-weight: 800; color: #fff; white-space: nowrap; }
.mca-hl-score i { color: #6f7894; font-style: normal; margin: 0 6px; }

.mca-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}
.mca-tile {
    background: linear-gradient(160deg, rgba(27, 36, 63, .85), rgba(17, 23, 42, .92));
    border: 1px solid rgba(124, 58, 237, .2);
    border-radius: 12px;
    padding: 11px 12px;
    text-align: center;
}
.mca-tile-v { display: block; font-size: 16px; font-weight: 800; color: #fff; }
.mca-tile-l {
    display: block; margin-top: 3px;
    font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8c95b0;
}

.mca-sets {
    background: linear-gradient(160deg, rgba(22, 29, 51, .8), rgba(11, 15, 26, .9));
    border: 1px solid rgba(124, 58, 237, .2);
    border-radius: 14px;
    overflow: hidden;
}
.mca-sets-head, .mca-sets-row {
    display: grid;
    grid-template-columns: 44px 1fr 1fr 64px;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
}
.mca-set-meta { color: #8c95b0; font-weight: 700; font-size: 12px; text-align: center; }
.mca-sets-head {
    font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    color: #8c95b0;
    border-bottom: 1px solid rgba(124, 58, 237, .18);
}
.mca-sets-head span:not(:first-child),
.mca-sets-row span:not(:first-child) { text-align: center; }
.mca-sets-row { font-size: 14px; font-weight: 700; color: #c7cfe2; border-top: 1px solid rgba(124, 58, 237, .08); }
.mca-sets-row:first-of-type { border-top: 0; }
.mca-set-no { color: #8c95b0; font-weight: 800; font-size: 12px; }
.mca-set-win { color: #34d399; }

/* headline winner emphasis */
.mca-hl-team { display: inline-flex; align-items: center; gap: 6px; }
.mca-hl-team.is-win { color: #fff; }
.mca-hl-team.is-win .mca-trophy { color: #fbbf24; }
.mca-trophy { width: 15px; height: 15px; flex-shrink: 0; }
.mca-headline--solo { grid-template-columns: auto 1fr; justify-items: start; }
.mca-headline--solo .mca-trophy { width: 22px; height: 22px; color: #fbbf24; }
.mca-hl-sub { font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8c95b0; }

/* game-score line under the headline */
.mca-hl-games {
    text-align: center;
    margin: -4px 0 14px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    color: #a9b1c7;
}

/* performance radar (colours are inline on the SVG; this only sizes it) */
.mca-radar { width: 100%; height: auto; display: block; margin: 2px auto 8px; max-width: 360px; }
.mca-legend { display: flex; justify-content: center; gap: 18px; margin: 0 0 6px; }
.mca-leg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #c7cfe2; }
.mca-leg i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.mca-leg--w i { background: #22d3ee; }
.mca-leg--l i { background: #fb7185; }

/* metric comparison bars (winner vs loser) */
.mca-cmp { margin-top: 6px; display: grid; gap: 11px; }
.mca-cmp-row { display: grid; grid-template-columns: 78px 1fr; align-items: center; gap: 10px; }
.mca-cmp-label { font-size: 11.5px; font-weight: 800; color: #cbd5e1; letter-spacing: .02em; }
.mca-cmp-bars { display: grid; gap: 4px; min-width: 0; }
.mca-cmp-track { position: relative; height: 13px; border-radius: 7px; background: rgba(148, 163, 184, .12); overflow: hidden; }
.mca-cmp-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 7px; }
.mca-cmp-fill--w { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.mca-cmp-fill--l { background: linear-gradient(90deg, #ec4899, #fb7185); }
.mca-cmp-track b { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 9.5px; font-weight: 800; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }

/* court-side split bar */
.mca-side-row { margin-bottom: 12px; }
.mca-side-row:last-child { margin-bottom: 0; }
.mca-split { display: flex; height: 22px; border-radius: 8px; overflow: hidden; font-size: 10.5px; font-weight: 800; color: #fff; }
.mca-split-l { background: linear-gradient(135deg, #2563eb, #06b6d4); display: flex; align-items: center; justify-content: center; min-width: 0; }
.mca-split-r { background: linear-gradient(135deg, #7c3aed, #ec4899); display: flex; align-items: center; justify-content: center; min-width: 0; }

/* point progression charts */
.mca-prog { margin-top: 10px; }
.mca-prog:first-of-type { margin-top: 2px; }
.mca-prog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2px; }
.mca-prog-head span { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8c95b0; }
.mca-prog-score { color: #e8ecf7 !important; font-variant-numeric: tabular-nums; }
.mca-prog-svg {
    width: 100%; height: auto; display: block;
    background: linear-gradient(160deg, rgba(22, 29, 51, .6), rgba(11, 15, 26, .7));
    border: 1px solid rgba(124, 58, 237, .18);
    border-radius: 12px;
}

/* section sub-caption */
.mca-sec-sub { margin: -4px 0 12px; font-size: 12px; line-height: 1.45; color: #8c95b0; }
.mca-fb-list--tight { margin-top: 10px; }

/* serve performance by set — responsive table */
.mca-sbs-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 14px; border: 1px solid rgba(124, 58, 237, .2); }
.mca-sbs2 {
    width: 100%;
    border-collapse: collapse;
    background: linear-gradient(160deg, rgba(22, 29, 51, .8), rgba(11, 15, 26, .9));
    min-width: 340px;
}
.mca-sbs2 thead th {
    font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    color: #8c95b0; text-align: center; padding: 9px 8px 8px;
    border-bottom: 1px solid rgba(124, 58, 237, .2);
}
.mca-sbs2-name { text-align: left !important; min-width: 96px; }
.mca-sbs2 tbody td { padding: 9px 8px; border-top: 1px solid rgba(124, 58, 237, .1); vertical-align: middle; }
.mca-sbs2 td.mca-sbs2-name {
    font-size: 13px; font-weight: 700; color: #e8ecf7; text-align: left;
    max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mca-sbs2-cell { text-align: center; min-width: 56px; }
.mca-sbs2-pct { display: block; font-size: 14px; font-weight: 800; color: #c7cfe2; line-height: 1.1; }
.mca-sbs2-bar { display: block; height: 4px; border-radius: 999px; background: rgba(148, 163, 184, .18); margin: 4px auto 3px; overflow: hidden; max-width: 46px; }
.mca-sbs2-bar i { display: block; height: 100%; border-radius: 999px; background: #64748b; }
.mca-sbs2-wt { display: block; font-size: 10px; color: #8c95b0; }
.mca-sbs2-cell.is-hi .mca-sbs2-pct { color: #34d399; }
.mca-sbs2-cell.is-hi .mca-sbs2-bar i { background: linear-gradient(90deg, #06b6d4, #34d399); }
.mca-sbs2-cell.is-lo .mca-sbs2-pct { color: #fb7185; }
.mca-sbs2-cell.is-lo .mca-sbs2-bar i { background: #fb7185; }
.mca-sbs2-cell.is-lead { background: rgba(34, 211, 238, .07); }
.mca-sbs2-cell.is-lead .mca-sbs2-pct::after { content: " \25B2"; font-size: 8px; color: #22d3ee; vertical-align: middle; }

/* serve & receive bars */
.mca-divider { height: 1px; background: rgba(124, 58, 237, .14); margin: 12px 0; }
.mca-bar-name em { font-style: normal; font-weight: 800; color: #8c95b0; font-size: 11px; margin-left: 4px; }
.mca-bar span.is-recv { background: linear-gradient(90deg, #f59e0b, #ec4899); }

/* service performance bars */
.mca-bar-row { margin-bottom: 12px; }
.mca-bar-row:last-child { margin-bottom: 0; }
.mca-bar-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 5px; }
.mca-bar-name { font-size: 13px; font-weight: 700; color: #e8ecf7; word-break: break-word; }
.mca-bar-val { font-size: 12px; font-weight: 700; color: #8c95b0; white-space: nowrap; }
.mca-bar { height: 8px; border-radius: 999px; background: rgba(124, 58, 237, .14); overflow: hidden; }
.mca-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7c3aed, #06b6d4); }

/* player breakdown */
.mca-players { display: grid; gap: 8px; }
.mca-player { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(124, 58, 237, .1); }
.mca-player:last-child { border-bottom: 0; }
.mca-player-name { font-size: 13.5px; font-weight: 700; color: #e8ecf7; }
.mca-player-stat { font-size: 12.5px; font-weight: 700; color: #8c95b0; white-space: nowrap; }

/* feedback */
.mca-fb-list { list-style: none; margin: 0; padding: 0; }
.mca-fb-list li { position: relative; padding: 6px 0 6px 18px; font-size: 13px; line-height: 1.5; color: #c7cfe2; }
.mca-fb-list li::before { content: ""; position: absolute; left: 2px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: #7c3aed; }
.mca-fb--win { border-color: rgba(52, 211, 153, .3); }
.mca-fb--win .mca-fb-list li::before { background: #34d399; }
.mca-fb--run .mca-fb-list li::before { background: #fb7185; }
.mca-note { margin: 4px 0 0; font-size: 13px; color: #a9b1c7; text-align: center; }

@media (max-width: 480px) {
    .mca-summary { grid-template-columns: 1fr; }
    .mca-head h3 { font-size: 17px; }
    .mca-st-cell, .mc-st-cell { min-width: 22px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .mca-scrim, .mca-panel { transition: none !important; }
    .mca-orb, .mca-spinner, .mca-report { animation: none !important; }
}
