/* ================================================================
   Cricket Live Scores — Stylesheet
   Plugin: cricket-live-scores | Version: 1.0.0
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;700&family=Barlow:wght@400;500;600&family=Inter:wght@400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* ── CSS Variables ──────────────────────────────────────────────── */
.cls-wrapper {
    --cls-bg:           #ffffff;
    --cls-card-bg:      #161b22;
    --cls-card-border:  #30363d;
    --cls-accent:       #00c853;
    --cls-accent-soft:  rgba(0, 200, 83, 0.12);
    --cls-live:         #ff3d3d;
    --cls-live-soft:    rgba(255, 61, 61, 0.12);
    --cls-upcoming:     #f9a825;
    --cls-upcoming-soft:rgba(249, 168, 37, 0.12);
    --cls-done:         #546e7a;
    --cls-done-soft:    rgba(84, 110, 122, 0.12);
    --cls-text-primary: #e6edf3;
    --cls-text-muted:   #8b949e;
    --cls-score-color:  #ffffff;
    --cls-font-display: 'Oswald', sans-serif;
    --cls-font-body:    'Barlow', sans-serif;
    --cls-radius:       12px;
    --cls-gap:          18px;
}

/* ── Wrapper ────────────────────────────────────────────────────── */
.cls-wrapper {
    background: var(--cls-bg);
    padding: 28px 20px;
    border-radius: 16px;
    font-family: var(--cls-font-body);
    color: var(--cls-text-primary);
    box-sizing: border-box;
}

.cls-wrapper *,
.cls-wrapper *::before,
.cls-wrapper *::after {
    box-sizing: border-box;
}

/* ── Header ─────────────────────────────────────────────────────── */
.cls-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.cls-title {
    font-family: var(--cls-font-display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: black;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cls-icon {
    font-size: 1.5rem;
}

.cls-live-indicator {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: var(--cls-font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--cls-live);
    background: var(--cls-live-soft);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 61, 61, 0.3);
}

/* ── Grid ───────────────────────────────────────────────────────── */
.cls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--cls-gap);
}

/* ── Card ───────────────────────────────────────────────────────── */
.cls-card {
    background: var(--cls-card-bg);
    border: 1px solid var(--cls-card-border);
    border-radius: var(--cls-radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.cls-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--cls-radius) var(--cls-radius) 0 0;
}

.cls-card--live::before    { background: var(--cls-live); }
.cls-card--completed::before { background: var(--cls-done); }
.cls-card--upcoming::before  { background: var(--cls-upcoming); }

.cls-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

/* ── Top Bar ─────────────────────────────────────────────────────── */
.cls-card__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cls-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--cls-font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    border-radius: 20px;
}

.cls-badge--live {
    color: var(--cls-live);
    background: var(--cls-live-soft);
    border: 1px solid rgba(255, 61, 61, 0.3);
}

.cls-badge--completed {
    color: var(--cls-done);
    background: var(--cls-done-soft);
    border: 1px solid rgba(84, 110, 122, 0.3);
}

.cls-badge--upcoming {
    color: var(--cls-upcoming);
    background: var(--cls-upcoming-soft);
    border: 1px solid rgba(249, 168, 37, 0.3);
}

/* Pulsing dot for live */
.cls-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cls-live);
    animation: cls-pulse-dot 1.4s ease-in-out infinite;
}

@keyframes cls-pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.7); }
}

/* Also for the header indicator */
.cls-pulse {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cls-live);
    animation: cls-pulse-dot 1.4s ease-in-out infinite;
}

.cls-match-type {
    font-family: var(--cls-font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--cls-accent);
    background: var(--cls-accent-soft);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(0, 200, 83, 0.25);
}

/* ── Meta: tournament & venue ────────────────────────────────────── */
.cls-card__meta {
    border-bottom: 1px solid var(--cls-card-border);
    padding-bottom: 12px;
}

.cls-card__meta p {
    margin: 0 0 4px;
    line-height: 1.4;
}

.cls-tournament {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cls-text-primary);
}

.cls-venue {
    font-size: 0.78rem;
    color: var(--cls-text-muted);
}

/* ── Teams & Scores ──────────────────────────────────────────────── */
.cls-card__scores {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cls-team {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.cls-team__left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cls-team__flag {
    font-size: 1.6rem;
    line-height: 1;
}

.cls-team__name {
    display: block;
    font-family: var(--cls-font-display);
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--cls-text-primary);
}

.cls-team__overs {
    display: block;
    font-size: 0.72rem;
    color: var(--cls-text-muted);
    margin-top: 1px;
}

.cls-team__score {
    font-family: var(--cls-font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cls-score-color);
    letter-spacing: 0.03em;
}

.cls-divider {
    height: 1px;
    background: var(--cls-card-border);
    margin: 0 4px;
}

/* ── Match Note ──────────────────────────────────────────────────── */
.cls-card__note {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--cls-accent);
    background: var(--cls-accent-soft);
    border-left: 3px solid var(--cls-accent);
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
    line-height: 1.4;
}

.cls-card--completed .cls-card__note {
    color: var(--cls-text-muted);
    background: var(--cls-done-soft);
    border-left-color: var(--cls-done);
}

.cls-card--upcoming .cls-card__note {
    color: var(--cls-upcoming);
    background: var(--cls-upcoming-soft);
    border-left-color: var(--cls-upcoming);
}

/* ── Run Rates ───────────────────────────────────────────────────── */
.cls-card__rates {
    display: flex;
    gap: 20px;
    font-size: 0.78rem;
    color: var(--cls-text-muted);
    border-top: 1px solid var(--cls-card-border);
    padding-top: 10px;
}

.cls-card__rates strong {
    color: var(--cls-text-primary);
    font-weight: 600;
    margin-left: 4px;
}

/* ── Card Link Wrapper ───────────────────────────────────────────── */
.cls-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.cls-card-link:hover .cls-card {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}
.cls-card {
    cursor: pointer;
}
.cls-card__cta {
    font-size: 0.78rem;
    font-family: var(--cls-font-display);
    letter-spacing: 0.06em;
    color: var(--cls-accent);
    border-top: 1px solid var(--cls-card-border);
    padding-top: 10px;
    text-align: right;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media ( max-width: 600px ) {
    .cls-grid {
        grid-template-columns: 1fr;
    }
    .cls-title {
        font-size: 1.25rem;
    }
    .cls-team__score {
        font-size: 1.05rem;
    }
}

/* ================================================================
   Match Detail Page
   ================================================================ */

.cls-detail {
    --cls-bg:           #0d1117;
    --cls-card-bg:      #161b22;
    --cls-card-border:  #30363d;
    --cls-accent:       #00c853;
    --cls-accent-soft:  rgba(0, 200, 83, 0.12);
    --cls-live:         #ff3d3d;
    --cls-live-soft:    rgba(255, 61, 61, 0.12);
    --cls-upcoming:     #f9a825;
    --cls-done:         #546e7a;
    --cls-text-primary: #e6edf3;
    --cls-text-muted:   #8b949e;
    --cls-font-display: 'Oswald', sans-serif;
    --cls-font-body:    'Barlow', sans-serif;
    --cls-radius:       12px;

    background: var(--cls-bg);
    color: var(--cls-text-primary);
    font-family: var(--cls-font-body);
    min-height: 80vh;
    padding: 24px 20px 48px;
    box-sizing: border-box;
    max-width: 1100px;
    margin: 0 auto;
}

.cls-detail *,
.cls-detail *::before,
.cls-detail *::after { box-sizing: border-box; }

/* Back link */
.cls-detail__back {
    margin-bottom: 20px;
}
.cls-detail__back a {
    color: var(--cls-accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-family: var(--cls-font-display);
    letter-spacing: 0.04em;
}
.cls-detail__back a:hover { text-decoration: underline; }

/* Header */
.cls-detail__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--cls-card-border);
}

.cls-detail__session-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.cls-detail__session-time {
    font-size: 0.78rem;
    color: var(--cls-text-muted);
}

.cls-detail__subtitle {
    font-size: 0.9rem;
    color: var(--cls-text-muted);
    margin: 0;
    line-height: 1.5;
}

.cls-detail__nav {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cls-detail__nav-btn {
    background: var(--cls-card-bg);
    border: 1px solid var(--cls-card-border);
    color: var(--cls-text-muted);
    padding: 6px 14px;
    border-radius: 6px;
    font-family: var(--cls-font-body);
    font-size: 0.82rem;
    cursor: pointer;
}
.cls-detail__nav-btn:not([disabled]):hover {
    border-color: var(--cls-accent);
    color: var(--cls-accent);
}
.cls-detail__nav-btn[disabled] { opacity: 0.4; cursor: default; }

/* Scoreboard */
.cls-detail__scoreboard {
    background: var(--cls-card-bg);
    border: 1px solid var(--cls-card-border);
    border-radius: var(--cls-radius);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.cls-detail__team-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.cls-detail__team-row + .cls-detail__team-row {
    border-top: 1px solid var(--cls-card-border);
}

.cls-detail__team-row--batting .cls-detail__team-name {
    color: var(--cls-text-muted);
}

.cls-detail__team-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.cls-detail__team-flag { font-size: 2rem; line-height: 1; }

.cls-detail__team-name {
    font-family: var(--cls-font-display);
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--cls-text-primary);
}

.cls-detail__team-right {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.cls-detail__team-score {
    font-family: var(--cls-font-display);
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}

.cls-detail__team-score2 {
    font-family: var(--cls-font-display);
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--cls-text-muted);
}

.cls-detail__team-score-sep {
    font-family: var(--cls-font-display);
    font-size: 1.2rem;
    color: var(--cls-text-muted);
}

.cls-detail__team-overs {
    font-size: 0.82rem;
    color: var(--cls-text-muted);
}

.cls-detail__status-note {
    margin-top: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cls-text-primary);
    padding-top: 14px;
    border-top: 1px solid var(--cls-card-border);
}

.cls-detail__live-stats {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--cls-text-muted);
    margin-top: 8px;
}
.cls-detail__live-stats strong { color: var(--cls-text-primary); }
.cls-detail__stat-sep { color: var(--cls-card-border); }

/* Main Tabs */
.cls-detail__tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--cls-card-border);
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}
.cls-detail__tabs::-webkit-scrollbar { display: none; }

.cls-detail__tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    color: var(--cls-text-muted);
    font-family: var(--cls-font-body);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 10px 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}
.cls-detail__tab:hover { color: var(--cls-text-primary); }
.cls-detail__tab--active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
    font-weight: 600;
}

/* Tab panels */
.cls-detail__panel { display: none; }
.cls-detail__panel--active { display: block; }

/* Section spacing */
.cls-detail__section { margin-bottom: 16px; }

/* Table wrapper (horizontal scroll on mobile) */
.cls-detail__table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--cls-card-border);
    border-radius: var(--cls-radius);
}

/* Data table */
.cls-detail__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    white-space: nowrap;
}

.cls-detail__table thead tr:first-child th {
    background: #0d1117;
    color: var(--cls-text-muted);
    font-family: var(--cls-font-display);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 10px 12px 4px;
    text-align: left;
    border-bottom: 1px solid var(--cls-card-border);
}

.cls-detail__subhead th {
    background: #0d1117;
    color: var(--cls-text-muted);
    font-family: var(--cls-font-display);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 2px 12px 8px;
    text-align: left;
    border-bottom: 1px solid var(--cls-card-border);
}

.cls-th-career-divider {
    border-left: 2px solid var(--cls-card-border) !important;
    background: #111720 !important;
}

.cls-career-col {
    border-left: none;
    background: rgba(255,255,255,0.02);
}
.cls-career-col:first-of-type {
    border-left: 2px solid var(--cls-card-border);
}

.cls-detail__table tbody tr {
    border-bottom: 1px solid var(--cls-card-border);
}
.cls-detail__table tbody tr:last-child { border-bottom: none; }

.cls-detail__table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.cls-detail__table td {
    padding: 10px 12px;
    vertical-align: middle;
}

.cls-td-player {
    min-width: 160px;
}
.cls-td-player strong {
    display: block;
    color: var(--cls-text-primary);
    font-weight: 600;
}
.cls-role {
    color: var(--cls-text-muted);
    font-size: 0.7rem;
    margin-left: 4px;
}

.cls-td-dismissal {
    font-size: 0.78rem;
    min-width: 180px;
}

.cls-td-extras {
    font-size: 0.78rem;
    padding: 8px 12px;
    border-top: 1px solid var(--cls-card-border);
}

.cls-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.cls-num--highlight {
    color: #fff;
    font-weight: 700;
}
.cls-muted { color: var(--cls-text-muted); }

/* Innings tabs (scorecard) */
.cls-detail__innings-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.cls-detail__innings-tab {
    background: var(--cls-card-bg);
    border: 1px solid var(--cls-card-border);
    border-radius: 20px;
    color: var(--cls-text-muted);
    font-family: var(--cls-font-body);
    font-size: 0.82rem;
    padding: 6px 16px;
    cursor: pointer;
    transition: all 0.15s;
}
.cls-detail__innings-tab:hover { border-color: #1a73e8; color: #1a73e8; }
.cls-detail__innings-tab--active {
    border-color: #1a73e8;
    color: #1a73e8;
    background: rgba(26, 115, 232, 0.08);
    font-weight: 600;
}

/* Innings panel */
.cls-hidden { display: none; }

.cls-detail__innings { margin-bottom: 32px; }

.cls-detail__innings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(26, 115, 232, 0.08);
    border: 1px solid rgba(26, 115, 232, 0.2);
    border-radius: var(--cls-radius) var(--cls-radius) 0 0;
    padding: 12px 16px;
    margin-bottom: 0;
}
.cls-detail__innings-title {
    font-family: var(--cls-font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--cls-text-primary);
}
.cls-detail__innings-total {
    font-family: var(--cls-font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}
.cls-detail__innings-total small { font-size: 0.72rem; color: var(--cls-text-muted); font-weight: 400; }

.cls-detail__innings .cls-detail__table-wrap {
    border-radius: 0 0 var(--cls-radius) var(--cls-radius);
    border-top: none;
}

/* Scorecard table overrides */
.cls-detail__table--scorecard th:first-child,
.cls-detail__table--scorecard td:first-child { text-align: left; }

/* Empty state */
.cls-detail__empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--cls-text-muted);
    background: var(--cls-card-bg);
    border: 1px solid var(--cls-card-border);
    border-radius: var(--cls-radius);
}
.cls-detail__empty span { font-size: 2.5rem; display: block; margin-bottom: 12px; }
.cls-detail__empty p { font-size: 0.9rem; margin: 0; }

/* ── Report Tab ──────────────────────────────────────────────────── */
.cls-report { max-width: 780px; }

.cls-report__label {
    font-family: var(--cls-font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--cls-accent);
    background: var(--cls-accent-soft);
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    margin-bottom: 14px;
}

.cls-report__headline {
    font-family: var(--cls-font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cls-text-primary);
    line-height: 1.3;
    margin: 0 0 12px;
}

.cls-report__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--cls-text-muted);
    margin-bottom: 20px;
}
.cls-report__author { font-weight: 600; }
.cls-report__sep    { opacity: 0.5; }

.cls-report__img-placeholder {
    width: 100%;
    background: linear-gradient(135deg, #1a2332 0%, #0d1117 50%, #1a2d1a 100%);
    border: 1px solid var(--cls-card-border);
    border-radius: var(--cls-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    margin-bottom: 24px;
    text-align: center;
}
.cls-report__img-label {
    font-family: var(--cls-font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--cls-text-primary);
    letter-spacing: 0.04em;
}
.cls-report__img-sub {
    font-size: 0.78rem;
    color: var(--cls-text-muted);
    margin-top: 6px;
}

.cls-report__body p {
    color: var(--cls-text-muted);
    font-size: 0.92rem;
    line-height: 1.8;
    margin: 0 0 16px;
}
.cls-report__body p:first-child { color: var(--cls-text-primary); font-size: 1rem; }

/* ── Commentary Tab ──────────────────────────────────────────────── */
.cls-commentary__filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.cls-commentary__innings-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cls-commentary__innings-btn {
    background: var(--cls-card-bg);
    border: 1px solid var(--cls-card-border);
    color: var(--cls-text-muted);
    font-family: var(--cls-font-body);
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s;
}
.cls-commentary__innings-btn:hover { border-color: #1a73e8; color: #1a73e8; }
.cls-commentary__innings-btn--active {
    background: rgba(26, 115, 232, 0.1);
    border-color: #1a73e8;
    color: #1a73e8;
    font-weight: 600;
}

.cls-commentary__full-btn {
    background: var(--cls-card-bg);
    border: 1px solid var(--cls-card-border);
    color: var(--cls-text-muted);
    font-family: var(--cls-font-body);
    font-size: 0.8rem;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    flex-shrink: 0;
}
.cls-commentary__full-btn:hover { border-color: var(--cls-accent); color: var(--cls-accent); }

.cls-commentary__entry {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--cls-card-border);
}
.cls-commentary__entry:last-child { border-bottom: none; }

.cls-commentary__over {
    font-family: var(--cls-font-display);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--cls-text-muted);
    min-width: 38px;
    padding-top: 2px;
    flex-shrink: 0;
}

.cls-commentary__content { flex: 1; }

.cls-commentary__header {
    font-family: var(--cls-font-display);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-bottom: 5px;
}
.cls-commentary__entry--out    .cls-commentary__header { color: #ff8c00; }
.cls-commentary__entry--four   .cls-commentary__header { color: #1a73e8; }
.cls-commentary__entry--six    .cls-commentary__header { color: var(--cls-accent); }
.cls-commentary__entry--normal .cls-commentary__header { color: var(--cls-text-muted); }

.cls-commentary__text {
    font-size: 0.83rem;
    color: var(--cls-text-muted);
    line-height: 1.6;
    margin: 0;
}

/* ── Live Stats Tab ──────────────────────────────────────────────── */
.cls-stats__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.cls-stats__card {
    background: var(--cls-card-bg);
    border: 1px solid var(--cls-card-border);
    border-radius: var(--cls-radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cls-stats__card-val {
    font-family: var(--cls-font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--cls-text-primary);
}
.cls-stats__card-lbl {
    font-size: 0.72rem;
    color: var(--cls-text-muted);
    letter-spacing: 0.04em;
}

.cls-stats__title {
    font-family: var(--cls-font-display);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--cls-text-muted);
    margin: 0 0 10px;
    text-transform: uppercase;
}

/* Partnerships */
.cls-partnerships { display: flex; flex-direction: column; gap: 12px; }

.cls-partnership__row {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--cls-card-bg);
    border: 1px solid var(--cls-card-border);
    border-radius: 8px;
    padding: 12px 16px;
}
.cls-partnership__wicket {
    font-family: var(--cls-font-display);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--cls-text-muted);
    min-width: 38px;
}
.cls-partnership__bar-wrap { flex: 1; }
.cls-partnership__players {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--cls-text-muted);
    margin-bottom: 6px;
}
.cls-partnership__bar {
    height: 6px;
    background: var(--cls-card-border);
    border-radius: 3px;
    overflow: hidden;
}
.cls-partnership__fill {
    height: 100%;
    background: linear-gradient(90deg, #1a73e8, var(--cls-accent));
    border-radius: 3px;
    transition: width 0.4s ease;
}
.cls-partnership__runs {
    font-family: var(--cls-font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--cls-text-primary);
    white-space: nowrap;
    min-width: 60px;
    text-align: right;
}
.cls-partnership__runs small { font-size: 0.7rem; color: var(--cls-text-muted); font-weight: 400; }

/* ── Table Tab ────────────────────────────────────────────────────── */
.cls-points-table { }

.cls-table__title {
    font-family: var(--cls-font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--cls-text-primary);
    margin: 0 0 16px;
}

.cls-points-table__tbl tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.015);
}

.cls-table__row--highlight {
    background: rgba(26, 115, 232, 0.06) !important;
}
.cls-table__row--highlight td { color: #72777b; }

.cls-table__form { white-space: nowrap; }

.cls-form-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
    margin: 0 2px;
    font-family: var(--cls-font-display);
}
.cls-form-badge--w { background: #00c853; color: #fff; }
.cls-form-badge--l { background: #f44336; color: #fff; }
.cls-form-badge--d { background: #546e7a; color: #fff; }
.cls-form-badge--n { background: #37474f; color: #fff; }

.cls-table__deductions {
    margin-top: 16px;
    font-size: 0.78rem;
    color: var(--cls-text-muted);
    background: var(--cls-card-bg);
    border: 1px solid var(--cls-card-border);
    border-radius: 8px;
    padding: 14px 16px;
}
.cls-table__deductions strong { color: var(--cls-text-primary); display: block; margin-bottom: 6px; }
.cls-table__deductions p { margin: 4px 0 0; }

.cls-table__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 14px;
    font-size: 0.75rem;
    color: var(--cls-text-muted);
}

/* ── Playing XI Tab ──────────────────────────────────────────────── */
.cls-playing-xi {
    background: var(--cls-card-bg);
    border: 1px solid var(--cls-card-border);
    border-radius: var(--cls-radius);
    overflow: hidden;
}

.cls-playing-xi__header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(26, 115, 232, 0.08);
    border-bottom: 1px solid var(--cls-card-border);
}
.cls-playing-xi__team-col {
    padding: 12px 16px;
    font-family: var(--cls-font-display);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--cls-text-primary);
    letter-spacing: 0.02em;
}
.cls-playing-xi__team-col--right {
    border-left: 1px solid var(--cls-card-border);
    padding-left: 16px;
}

.cls-playing-xi__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--cls-card-border);
}
.cls-playing-xi__row:last-child { border-bottom: none; }
.cls-playing-xi__row--bench {
    background: rgba(255,255,255,0.02);
}

.cls-playing-xi__player {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
}
.cls-playing-xi__player--right {
    border-left: 1px solid var(--cls-card-border);
    flex-direction: row-reverse;
    text-align: right;
}
.cls-playing-xi__player--right > div { text-align: right; }

.cls-playing-xi__num {
    font-family: var(--cls-font-display);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cls-text-muted);
    min-width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.cls-playing-xi__name {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1a73e8;
    line-height: 1.3;
}
.cls-playing-xi__role {
    display: block;
    font-size: 0.72rem;
    color: var(--cls-text-muted);
    margin-top: 2px;
}

.cls-playing-xi__bench-label {
    font-family: var(--cls-font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--cls-text-muted);
    background: rgba(255,255,255,0.03);
    border-top: 1px solid var(--cls-card-border);
    border-bottom: 1px solid var(--cls-card-border);
    padding: 8px 16px;
    text-transform: uppercase;
}

/* ── Detail Page Responsive ──────────────────────────────────────── */
@media ( max-width: 768px ) {
    .cls-detail__team-name  { font-size: 1.1rem; }
    .cls-detail__team-score { font-size: 1.5rem; }
    .cls-detail__team-flag  { font-size: 1.4rem; }
    .cls-detail__header { flex-direction: column; }
    .cls-career-col { display: none; }
    .cls-th-career-divider { display: none; }
    .cls-detail__subhead th:nth-child(n+2) { display: none; }
}
@media ( max-width: 600px ) {
    .cls-grid { grid-template-columns: 1fr; }
    .cls-title { font-size: 1.25rem; }
    .cls-team__score { font-size: 1.05rem; }
    .cls-detail { padding: 16px 12px 32px; }
    .cls-detail__tab { padding: 10px 14px; font-size: 0.82rem; }
}

/* ================================================================
   Recent Matches Shortcode — Modern Redesign (.crm-*)
   ================================================================ */

/* ── Base & Variables ───────────────────────────────────────────── */
.crm-wrapper {
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f0f4f8;
    padding: 28px 16px 48px;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.crm-container {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ── Filter Wrap — centered, scrollable on mobile ───────────────── */
.crm-filter-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.crm-filter-wrap::-webkit-scrollbar { display: none; }

.crm-filter {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #1e2d3d;
    border-radius: 100px;
    padding: 5px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    flex-shrink: 0;
}

.crm-filter__btn {
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #7a99b0;
    background: transparent;
    border: none;
    border-radius: 100px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    line-height: 1;
}
.crm-filter__btn:hover:not(.crm-filter__btn--active) {
    background: rgba(255, 255, 255, 0.09);
    color: #c4d8e4;
}
.crm-filter__btn--active {
    background: #10b981;
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

/* ── Grid ───────────────────────────────────────────────────────── */
.crm-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: start;
    width: 100%;
}

/* ── Card Link ──────────────────────────────────────────────────── */
.crm-card-link {
    display: flex;
    text-decoration: none;
    color: inherit;
    border-radius: 14px;
    outline: none;
    width: 100%;
    min-width: 0;
}
.crm-card-link:focus-visible .crm-card {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.45), 0 6px 20px rgba(0, 0, 0, 0.1);
}

/* ── Card ───────────────────────────────────────────────────────── */
.crm-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 14px;
    padding: 16px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}
.crm-card-link:hover .crm-card {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
}

/* ── Card Header ────────────────────────────────────────────────── */
.crm-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 11px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 14px;
}
.crm-card__tournament {
    font-size: 0.65rem;
    font-weight: 700;
    color: #0ea5e9;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.crm-card__match-num {
    font-size: 0.63rem;
    font-weight: 500;
    color: #94a3b8;
    background: #f1f5f9;
    border-radius: 5px;
    padding: 3px 7px;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
    line-height: 1.2;
}

/* ── Live card variant ──────────────────────────────────────────── */
.crm-card--live {
    border-color: rgba(220, 38, 38, 0.18);
}
.crm-card__live {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 5px;
    padding: 3px 7px;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
    line-height: 1.2;
}
.crm-live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    animation: cls-pulse-dot 1.4s ease-in-out infinite;
}
.crm-card__badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    padding: 3px 7px;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
    line-height: 1.2;
}
.crm-card__result--live {
    background: #fef2f2;
    border-color: #fecaca;
    border-left-color: #ef4444;
    color: #b91c1c;
}
.crm-card__result--live .crm-live-dot {
    margin-top: 4px;
    flex-shrink: 0;
}

/* ── Teams ──────────────────────────────────────────────────────── */
.crm-card__teams {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.crm-card__team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

/* Winner vs Loser */
.crm-card__team--winner .crm-team-name  { color: #0f172a; }
.crm-card__team--winner .crm-team-score { color: #0f172a; }
.crm-card__team--loser  .crm-team-name  { color: #94a3b8; }
.crm-card__team--loser  .crm-team-score { color: #94a3b8; }
.crm-card__team--loser  .crm-team-logo  { opacity: 0.5; filter: grayscale(45%); }

/* ── Team Logo: Flag Image ──────────────────────────────────────── */
.crm-team-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.01em;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
    border: 2px solid rgba(255, 255, 255, 0.25);
    transition: opacity 0.2s, filter 0.2s;
}
.crm-team-logo--flag {
    background: #e2e8f0;
    border-color: #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.crm-team-logo--flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

/* ── Team Info ──────────────────────────────────────────────────── */
.crm-team-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.crm-team-name {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #0f172a;
    transition: color 0.15s;
}
.crm-team-score {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.1;
    letter-spacing: -0.015em;
    transition: color 0.15s;
}
.crm-team-overs {
    font-size: 0.65rem;
    font-weight: 400;
    color: #94a3b8;
    letter-spacing: 0;
}

/* ── VS Badge ───────────────────────────────────────────────────── */
.crm-vs {
    font-size: 0.55rem;
    font-weight: 700;
    color: #94a3b8;
    background: #f1f5f9;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    min-width: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

/* ── Result Strip ───────────────────────────────────────────────── */
.crm-card__result {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 3px solid #f59e0b;
    border-radius: 0 7px 7px 0;
    padding: 7px 11px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #78350f;
    line-height: 1.4;
    margin-bottom: 13px;
}
.crm-result-icon {
    width: 13px;
    height: 13px;
    min-width: 13px;
    color: #10b981;
    margin-top: 1px;
    flex-shrink: 0;
}

/* ── Card Footer ────────────────────────────────────────────────── */
.crm-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #f1f5f9;
    padding-top: 11px;
}
.crm-card__venue {
    font-size: 0.65rem;
    color: #94a3b8;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.crm-card__date {
    font-size: 0.65rem;
    font-weight: 500;
    color: #64748b;
    white-space: nowrap;
    flex-shrink: 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 3px 8px;
    border-radius: 5px;
}

/* ── No Results ─────────────────────────────────────────────────── */
.crm-no-results {
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    padding: 52px 0;
    grid-column: 1 / -1;
    margin: 0; 
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media ( min-width: 1100px ) {
    .crm-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media ( max-width: 560px ) {
    .crm-wrapper { padding: 20px 12px 40px; }
    .crm-grid { grid-template-columns: 1fr; gap: 12px; }
    .crm-filter-wrap { justify-content: flex-start; }
    .crm-filter__btn { padding: 7px 13px; font-size: 0.68rem; }
    .crm-team-logo { width: 36px; height: 36px; font-size: 0.55rem; }
    .crm-team-score { font-size: 0.9rem; }
    .crm-team-name { font-size: 0.72rem; }
    .crm-card { padding: 13px 13px 11px; }
    .crm-card__header { padding-bottom: 9px; margin-bottom: 11px; }
    .crm-card__result { padding: 6px 10px; font-size: 0.68rem; margin-bottom: 10px; }
    .crm-card__footer { padding-top: 9px; }
}

/* ============================================================
   RECENT MATCH DETAIL (.rmd-*)  — light theme
   ============================================================ */

/* Page wrapper */
.rmd-page {
    font-family: 'Inter', 'Poppins', sans-serif;
    background: #f4f6f9;
    min-height: 100vh;
    color: #1a1a2e;
}

/* ── HEADER ─────────────────────────────────────────────────── */
.rmd-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 28px 16px 20px;
}
.rmd-header__inner {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}
.rmd-header__title {
    font-family: 'Oswald', 'Barlow', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #0d1b2a;
    margin: 0 0 4px;
    text-transform: uppercase;
}
.rmd-header__label {
    font-size: 0.82rem;
    color: #6b7280;
    margin: 0 0 20px;
}
.rmd-header__teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.rmd-header__team {
    display: flex;
    align-items: center;
    gap: 10px;
}
.rmd-header__team-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.rmd-header__team-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a2e;
}
.rmd-header__team-score {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
}
.rmd-header__team-score small {
    font-size: 0.75rem;
    font-weight: 400;
    color: #6b7280;
}
.rmd-header__vs {
    font-size: 0.75rem;
    font-weight: 700;
    color: #9ca3af;
    letter-spacing: 0.05em;
}
.rmd-header__result {
    font-size: 0.88rem;
    font-weight: 600;
    color: #b45309;
    background: #fef3c7;
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    margin: 0;
}

/* ── TABS ───────────────────────────────────────────────────── */
.rmd-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border-bottom: 2px solid #e5e7eb;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 8px;
    scrollbar-width: none;
}
.rmd-tabs::-webkit-scrollbar { display: none; }
.rmd-tab {
    flex-shrink: 0;
    padding: 12px 18px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.82rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
    margin-bottom: -2px;
}
.rmd-tab:hover { color: #f97316; }
.rmd-tab--active { color: #f97316; border-bottom-color: #f97316; }

/* ── PANELS ─────────────────────────────────────────────────── */
.rmd-panels {
    max-width: 860px;
    margin: 0 auto;
    padding: 20px 12px 48px;
}
.rmd-panel { display: none; }
.rmd-panel--active { display: block; }
.rmd-hidden { display: none !important; }

/* ── CARD ───────────────────────────────────────────────────── */
.rmd-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.rmd-card__head {
    background: linear-gradient(to right, #1565C0, #00897B);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 10px 16px;
}
.rmd-card__head-sub {
    font-weight: 400;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    opacity: 0.85;
    margin-left: 6px;
}

/* ── INFO TABLE ─────────────────────────────────────────────── */
.rmd-info-table {
    width: 100%;
    border-collapse: collapse;
}
.rmd-info-table tr { border-bottom: 1px solid #f3f4f6; }
.rmd-info-table tr:last-child { border-bottom: none; }
.rmd-row--alt { background: #f9fafb; }
.rmd-info-table__label {
    padding: 10px 16px;
    font-size: 0.78rem;
    color: #6b7280;
    font-weight: 500;
    width: 38%;
}
.rmd-info-table__value {
    padding: 10px 16px;
    font-size: 0.82rem;
    color: #1a1a2e;
    font-weight: 600;
}

/* ── SQUAD ──────────────────────────────────────────────────── */
.rmd-squad-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.rmd-squad-col {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.rmd-squad-list { padding: 8px 0; }
.rmd-squad-player {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 1px solid #f3f4f6;
}
.rmd-squad-player:last-child { border-bottom: none; }
.rmd-squad-player__avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #374151;
    flex-shrink: 0;
}
.rmd-squad-player__name {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1a1a2e;
}
.rmd-squad-player__role {
    font-size: 0.72rem;
    color: #9ca3af;
}

/* ── POINT TABLE ────────────────────────────────────────────── */
.rmd-pt-wrap { overflow-x: auto; }
.rmd-pt-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 520px;
}
.rmd-pt-table__head {
    background: linear-gradient(to right, #1565C0, #00897B);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}
.rmd-pt-table__head th { padding: 9px 10px; text-align: center; }
.rmd-pt-table__head .rmd-pt-table__team-col { text-align: left; padding-left: 14px; }
.rmd-pt-table__row { border-bottom: 1px solid #f3f4f6; }
.rmd-pt-table__row:last-child { border-bottom: none; }
.rmd-pt-table__row td { padding: 9px 10px; text-align: center; font-size: 0.8rem; color: #374151; }
.rmd-pt-table__team-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 14px !important;
    text-align: left !important;
}
.rmd-pt-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.rmd-pt-name { font-weight: 600; font-size: 0.78rem; color: #1a1a2e; }
.rmd-pt-pts  { font-weight: 700; color: #1565C0; }
.rmd-pt-nrr--pos { color: #16a34a; font-weight: 600; }
.rmd-pt-nrr--neg { color: #dc2626; font-weight: 600; }

/* ── BALL BY BALL ───────────────────────────────────────────── */
.rmd-bbb-toggle,
.rmd-sc-toggle {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.rmd-bbb-btn,
.rmd-sc-btn {
    padding: 7px 16px;
    border-radius: 20px;
    border: 2px solid #d1d5db;
    background: #f3f4f6;
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}
.rmd-bbb-btn--active,
.rmd-sc-btn--active {
    background: #fff;
    border-color: #1a1a2e;
    color: #1a1a2e;
}
.rmd-over {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    margin-bottom: 10px;
}
.rmd-over__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(to right, #1565C0, #00897B);
    cursor: pointer;
    user-select: none;
}
.rmd-over__label { font-size: 0.8rem; font-weight: 700; color: #fff; letter-spacing: 0.04em; }
.rmd-over__chevron { color: #fff; font-size: 1rem; }
.rmd-over__body { padding: 0 8px; }
.rmd-over__empty { padding: 12px; font-size: 0.78rem; color: #9ca3af; text-align: center; }
.rmd-ball-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    border-bottom: 1px solid #f3f4f6;
    flex-wrap: wrap;
}
.rmd-ball-row:last-child { border-bottom: none; }
.rmd-ball {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #6b7280;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rmd-ball--six  { background: #7c3aed; }
.rmd-ball--four { background: #2563eb; }
.rmd-ball--wkt  { background: #dc2626; }
.rmd-ball--dot  { background: #9ca3af; }
.rmd-ball-row__batters {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 0;
    font-size: 0.75rem;
}
.rmd-ball-row__bat1 {
    background: #dcfce7;
    color: #166534;
    border-radius: 4px;
    padding: 2px 7px;
}
.rmd-ball-row__bat2 {
    background: #fee2e2;
    color: #991b1b;
    border-radius: 4px;
    padding: 2px 7px;
}
.rmd-ball-row__score {
    font-size: 0.78rem;
    font-weight: 700;
    color: #1a1a2e;
    min-width: 56px;
    text-align: right;
}
.rmd-ball-row__meta {
    font-size: 0.7rem;
    color: #9ca3af;
    white-space: nowrap;
}

/* ── SCORECARD ──────────────────────────────────────────────── */
.rmd-sc-wrap { overflow-x: auto; }
.rmd-sc-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 420px;
}
.rmd-sc-table thead tr {
    background: linear-gradient(to right, #1565C0, #00897B);
    color: #fff;
}
.rmd-sc-table thead th {
    padding: 9px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: center;
}
.rmd-sc-table__bat-col { text-align: left !important; padding-left: 14px !important; }
.rmd-sc-table tbody tr { border-bottom: 1px solid #f3f4f6; }
.rmd-sc-table tbody tr:last-child { border-bottom: none; }
.rmd-sc-table tbody td { padding: 8px 10px; text-align: center; font-size: 0.78rem; color: #374151; }
.rmd-sc-batter { text-align: left !important; padding-left: 14px !important; }
.rmd-sc-batter__name { font-weight: 600; color: #1a1a2e; font-size: 0.8rem; }
.rmd-sc-batter__dis  { font-size: 0.68rem; color: #9ca3af; }
.rmd-sc-runs { font-weight: 700; color: #1565C0; }
.rmd-sc-extras, .rmd-sc-total { background: #f9fafb; }
.rmd-sc-extras td, .rmd-sc-total td { text-align: left !important; padding-left: 14px !important; font-size: 0.78rem; }
.rmd-sc-dnb {
    padding: 8px 14px;
    font-size: 0.72rem;
    color: #6b7280;
    border-top: 1px solid #f3f4f6;
}

/* ── PLAYER OF THE MATCH ─────────────────────────────────────── */
.rmd-potm-body {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 16px;
    flex-wrap: wrap;
}
.rmd-potm-avatar {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    border: 3px solid;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #374151;
    flex-shrink: 0;
}
.rmd-potm-name  { font-size: 1.15rem; font-weight: 700; color: #1a1a2e; margin: 0 0 4px; }
.rmd-potm-role  { font-size: 0.78rem; color: #6b7280; margin: 0 0 2px; }
.rmd-potm-team  { font-size: 0.78rem; color: #1565C0; font-weight: 600; margin: 0 0 6px; }
.rmd-potm-stats { font-size: 0.9rem; font-weight: 700; color: #f97316; margin: 0; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    .rmd-header__title { font-size: 1.4rem; }
    .rmd-squad-grid { grid-template-columns: 1fr; }
    .rmd-tabs { padding: 0 4px; }
    .rmd-tab { padding: 10px 12px; font-size: 0.75rem; }
    .rmd-panels { padding: 14px 8px 36px; }
    .rmd-ball-row__meta { display: none; }
    .rmd-header__teams { gap: 12px; }
}

/* Upcoming match placeholder panels */
.rmd-upcoming-placeholder {
    text-align: center;
    color: #94a3b8;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 52px 24px;
    line-height: 1.6;
}


/* ============================================================
   Upcoming Matches Shortcode (.cum-*)
   ============================================================ */

/* ── Base ──────────────────────────────────────────────────── */
.cum-wrapper {
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f0f4f8;
    padding: 28px 16px 48px;
    -webkit-font-smoothing: antialiased;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.cum-container {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ── Filter ────────────────────────────────────────────────── */
.cum-filter-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.cum-filter-wrap::-webkit-scrollbar { display: none; }

.cum-filter {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #1e2d3d;
    border-radius: 100px;
    padding: 5px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    flex-shrink: 0;
}

.cum-filter__btn {
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #7a99b0;
    background: transparent;
    border: none;
    border-radius: 100px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
    line-height: 1;
}
.cum-filter__btn:hover:not(.cum-filter__btn--active) {
    background: rgba(255, 255, 255, 0.09);
    color: #c4d8e4;
}
.cum-filter__btn--active {
    background: #6366f1;
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.45);
}

/* ── Grid ──────────────────────────────────────────────────── */
.cum-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: start;
    width: 100%;
}

/* ── Card Wrapper ──────────────────────────────────────────── */
.cum-card-link {
    display: flex;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    border-radius: 14px;
    width: 100%;
    min-width: 0;
}
.cum-card-link:hover .cum-card {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
    border-color: rgba(99, 102, 241, 0.35);
}

/* ── Card ──────────────────────────────────────────────────── */
.cum-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    border-radius: 14px;
    padding: 16px 16px 14px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

/* ── Card Header ───────────────────────────────────────────── */
.cum-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    padding-bottom: 11px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 14px;
}
.cum-card__tournament {
    font-size: 0.65rem;
    font-weight: 700;
    color: #6366f1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cum-card__match-num {
    font-size: 0.63rem;
    font-weight: 500;
    color: #94a3b8;
    background: #f1f5f9;
    border-radius: 5px;
    padding: 3px 7px;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
    line-height: 1.2;
}

/* ── Teams Row ─────────────────────────────────────────────── */
.cum-card__teams {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
}

.cum-card__team {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.cum-card__team--right {
    flex-direction: column;
}

/* ── Team Logo ─────────────────────────────────────────────── */
.cum-team-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.01em;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
    border: 2px solid rgba(255, 255, 255, 0.25);
}
.cum-team-logo--flag {
    background: #e2e8f0;
    border-color: #e2e8f0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.cum-team-logo--flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

/* ── Team Info ─────────────────────────────────────────────── */
.cum-team-info {
    min-width: 0;
    width: 100%;
}
.cum-team-name {
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #0f172a;
    text-align: center;
    display: block;
}

/* ── Countdown Timer ───────────────────────────────────────── */
.cum-countdown {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f59e0b;
    border-radius: 20px;
    padding: 5px 13px;
    flex-shrink: 0;
    min-width: 0;
}

.cum-cd-time {
    font-size: 0.65rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.02em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.cum-cd-live {
    font-size: 0.72rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    animation: cum-pulse 1s ease-in-out infinite;
}

@keyframes cum-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

/* ── Schedule Strip ────────────────────────────────────────── */
.cum-card__schedule {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-left: 3px solid #6366f1;
    border-radius: 0 7px 7px 0;
    padding: 7px 11px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #3730a3;
    line-height: 1.4;
    margin-bottom: 13px;
}

.cum-schedule-icon {
    width: 13px;
    height: 13px;
    min-width: 13px;
    color: #6366f1;
    margin-top: 1px;
    flex-shrink: 0;
}

/* ── Card Footer ───────────────────────────────────────────── */
.cum-card__footer {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #f1f5f9;
    padding-top: 11px;
}
.cum-card__venue {
    font-size: 0.65rem;
    color: #94a3b8;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* ── No Results ────────────────────────────────────────────── */
.cum-no-results {
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    padding: 52px 0;
    grid-column: 1 / -1;
    margin: 0;
}

/* ── Responsive ────────────────────────────────────────────── */
@media ( min-width: 1100px ) {
    .cum-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
@media ( max-width: 560px ) {
    .cum-wrapper { padding: 20px 12px 40px; }
    .cum-grid { grid-template-columns: 1fr; gap: 12px; }
    .cum-filter-wrap { justify-content: flex-start; }
    .cum-filter__btn { padding: 7px 13px; font-size: 0.68rem; }
    .cum-team-logo { width: 36px; height: 36px; font-size: 0.55rem; }
    .cum-team-name { font-size: 0.72rem; }
    .cum-card { padding: 13px 13px 11px; }
    .cum-card__header { padding-bottom: 9px; margin-bottom: 11px; }
    .cum-card__schedule { padding: 6px 10px; font-size: 0.68rem; margin-bottom: 10px; }
    .cum-card__footer { padding-top: 9px; }
    .cum-countdown { padding: 4px 9px; }
    .cum-cd-time { font-size: 0.6rem; }
}

/* ============================================================
   Match Winner Voting (.cls-vote-*)
   ============================================================ */

.cls-vote-widget {
    padding: 20px 20px 0;
    max-width: 860px;
    margin: 0 auto;
}

.cls-vote__inner {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 22px 24px 20px;
    box-shadow: 0 2px 14px rgba(0,0,0,0.06);
}

/* Heading */
.cls-vote__heading {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.cls-vote__subtext {
    font-size: 0.72rem;
    color: #94a3b8;
    text-align: center;
    margin: 0 0 18px;
}

.cls-vote__closed-banner {
    font-size: 0.72rem;
    font-weight: 600;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    text-align: center;
    padding: 7px 14px;
    margin-bottom: 18px;
}

/* Team buttons row */
.cls-vote__options {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 18px;
}

.cls-vote__btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px 14px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s, background 0.2s;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}
.cls-vote__btn:hover:not(:disabled) {
    border-color: var(--tc);
    background: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.09);
}
.cls-vote__btn:disabled {
    cursor: not-allowed;
}
.cls-vote__btn--chosen {
    border-color: var(--tc) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.07) !important;
}
.cls-vote__btn--unchosen {
    opacity: 0.4;
}

.cls-vote__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.02em;
    box-shadow: 0 3px 10px rgba(0,0,0,0.18);
    flex-shrink: 0;
}

.cls-vote__team-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
    line-height: 1.3;
}

.cls-vote__cta-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--tc);
    opacity: 0.85;
}
.cls-vote__btn--chosen .cls-vote__cta-label { display: none; }

.cls-vote__tick {
    display: none;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--tc);
}
.cls-vote__btn--chosen .cls-vote__tick { display: block; }

.cls-vote__vs {
    font-size: 0.6rem;
    font-weight: 800;
    color: #94a3b8;
    background: #f1f5f9;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
}

/* Results bars */
.cls-vote__results {
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
    animation: cls-vote-in 0.4s ease;
}
@keyframes cls-vote-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cls-vote__bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
}
.cls-vote__bar-abbr {
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 32px;
    letter-spacing: 0.04em;
}
.cls-vote__bar-track {
    flex: 1;
    height: 9px;
    background: #f1f5f9;
    border-radius: 100px;
    overflow: hidden;
}
.cls-vote__bar-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.cls-vote__bar-pct {
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    min-width: 34px;
    text-align: right;
}

.cls-vote__total {
    text-align: center;
    font-size: 0.68rem;
    color: #94a3b8;
    font-weight: 500;
    margin: 6px 0 0;
}

/* Feedback message */
.cls-vote__feedback {
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    margin-top: 10px;
    padding: 6px 12px;
    border-radius: 8px;
    color: #b91c1c;
    background: #fef2f2;
}

/* Mobile */
@media (max-width: 560px) {
    .cls-vote-widget { padding: 14px 12px 0; }
    .cls-vote__inner { padding: 16px 14px 14px; }
    .cls-vote__avatar { width: 44px; height: 44px; }
    .cls-vote__team-name { font-size: 0.68rem; }
    .cls-vote__options { gap: 8px; }
}

/* ============================================================
   CricAI Chatbot  (.cai-*)
   ============================================================ */

/* ── Trigger Button ────────────────────────────────────────── */
.cai-trigger {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99998;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1e2d3d;
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 10px 20px 10px 10px;
    cursor: pointer;
    box-shadow: 0 6px 28px rgba(0,0,0,0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s;
    font-family: 'Inter', 'Poppins', sans-serif;
    outline: none;
}
.cai-trigger:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 36px rgba(0,0,0,0.4);
    background: #253d52;
}
.cai-trigger:focus-visible {
    box-shadow: 0 0 0 3px rgba(99,102,241,0.5), 0 6px 28px rgba(0,0,0,0.32);
}
.cai-trigger.cai-trigger--open {
    background: #253d52;
}

/* Ball icon wrapper */
.cai-trigger__ball {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* AI badge */
.cai-trigger__badge {
    position: absolute;
    top: 2px;
    left: 26px;
    background: #ef4444;
    color: #fff;
    font-size: 0.45rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    border-radius: 100px;
    padding: 2px 5px;
    line-height: 1.2;
    border: 1.5px solid #1e2d3d;
    pointer-events: none;
    z-index: 1;
    animation: cai-badge-pulse 2.4s ease-in-out infinite;
}
@keyframes cai-badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.4); }
    50%       { box-shadow: 0 0 0 5px rgba(239,68,68,0); }
}

/* Label */
.cai-trigger__label {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #e2e8f0;
    user-select: none;
}

/* ── Chat Panel ────────────────────────────────────────────── */
.cai-panel {
    position: fixed;
    bottom: 88px;
    right: 24px;
    z-index: 99999;
    width: 360px;
    max-height: 560px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.18), 0 4px 16px rgba(0,0,0,0.08);
    overflow: hidden;
    transform-origin: bottom right;
    /* hidden state */
    opacity: 0;
    transform: scale(0.88) translateY(16px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.cai-panel.cai-panel--open {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: all;
}

/* ── Header ────────────────────────────────────────────────── */
.cai-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, #1e2d3d 0%, #0f172a 100%);
    flex-shrink: 0;
}

.cai-panel__brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.cai-panel__logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cai-panel__brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cai-panel__name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    line-height: 1;
    font-family: 'Inter', 'Poppins', sans-serif;
}

.cai-panel__status {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.65rem;
    color: #7a99b0;
    font-family: 'Inter', sans-serif;
}

.cai-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    animation: cai-status-pulse 2s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes cai-status-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.cai-panel__close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s, color 0.18s;
    flex-shrink: 0;
}
.cai-panel__close:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* ── Messages ──────────────────────────────────────────────── */
.cai-panel__messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
    min-height: 180px;
    scrollbar-width: thin;
    scrollbar-color: #e2e8f0 transparent;
}
.cai-panel__messages::-webkit-scrollbar { width: 4px; }
.cai-panel__messages::-webkit-scrollbar-track { background: transparent; }
.cai-panel__messages::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

/* Bot message */
.cai-msg {
    display: flex;
    gap: 8px;
    animation: cai-msg-in 0.25s ease;
}
@keyframes cai-msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.cai-msg--bot { align-items: flex-start; }
.cai-msg--user { align-items: flex-end; flex-direction: row-reverse; }

.cai-msg__avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #1e2d3d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.cai-msg__bubble {
    max-width: 82%;
    padding: 10px 13px;
    border-radius: 14px;
    font-size: 0.78rem;
    line-height: 1.55;
    font-family: 'Inter', sans-serif;
}

.cai-msg--bot .cai-msg__bubble {
    background: #fff;
    color: #1e293b;
    border-radius: 4px 14px 14px 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    border: 1px solid #f1f5f9;
}

.cai-msg--user .cai-msg__bubble {
    background: #1e2d3d;
    color: #e2e8f0;
    border-radius: 14px 4px 14px 14px;
}

/* Typing indicator */
.cai-typing .cai-msg__bubble {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 12px 16px;
}
.cai-dot-1, .cai-dot-2, .cai-dot-3 {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    animation: cai-bounce 1.2s infinite ease-in-out;
}
.cai-dot-2 { animation-delay: 0.2s; }
.cai-dot-3 { animation-delay: 0.4s; }
@keyframes cai-bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40%            { transform: translateY(-6px); }
}

/* ── Quick Chips ───────────────────────────────────────────── */
.cai-panel__chips {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    overflow-x: auto;
    scrollbar-width: none;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    flex-shrink: 0;
}
.cai-panel__chips::-webkit-scrollbar { display: none; }

.cai-chip {
    font-family: inherit;
    font-size: 0.67rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 5px 11px;
    border-radius: 100px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
    flex-shrink: 0;
}
.cai-chip:hover {
    background: #1e2d3d;
    color: #fff;
    border-color: #1e2d3d;
}

/* ── Composer ──────────────────────────────────────────────── */
.cai-panel__composer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #f1f5f9;
    background: #fff;
    flex-shrink: 0;
}

.cai-input {
    flex: 1;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    padding: 9px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 100px;
    background: #f8fafc;
    color: #1e293b;
    outline: none;
    transition: border-color 0.18s, background 0.18s;
    min-width: 0;
}
.cai-input::placeholder { color: #94a3b8; }
.cai-input:focus {
    border-color: #1e2d3d;
    background: #fff;
}

.cai-send {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #1e2d3d;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.18s, transform 0.15s;
}
.cai-send:hover { background: #253d52; transform: scale(1.06); }
.cai-send:active { transform: scale(0.95); }
.cai-send:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ── Footer ────────────────────────────────────────────────── */
.cai-panel__footer {
    text-align: center;
    font-size: 0.6rem;
    color: #cbd5e1;
    padding: 6px 0 8px;
    background: #fff;
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
}

/* ── Mobile ────────────────────────────────────────────────── */
@media (max-width: 420px) {
    .cai-panel {
        width: calc(100vw - 24px);
        right: 12px;
        bottom: 82px;
    }
    .cai-trigger { right: 12px; bottom: 12px; }
    .cai-trigger__badge { left: 24px; }
}
