/* Match state chart — worm line + over momentum bars */

.ex-match-chart {
    position: relative;
    padding: 0.5rem 0.65rem 0.65rem;
    min-height: 12rem;
}

.ex-match-chart__modes {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 0.1rem;
    padding: 0.1rem;
    border-radius: var(--theme-radius-pill, 999px);
    background: var(--ex-surface-subhead);
    border: 1px solid var(--theme-match-list-columns-border, var(--ex-border));
    box-shadow: 0 1px 4px var(--bp-alpha-ink-18);
}

.ex-match-chart__mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    width: 1.45rem;
    height: 1.45rem;
    min-width: 1.45rem;
    padding: 0;
    border: 0;
    border-radius: var(--theme-radius-pill, 999px);
    background: transparent;
    color: var(--ex-muted);
    cursor: pointer;
}

.ex-match-chart__mode-btn svg {
    width: 0.7rem;
    height: 0.7rem;
}

.ex-match-chart__mode-label {
    display: none;
}

.ex-match-chart__mode-btn.is-active {
    background: var(--ex-surface-row, var(--ex-surface));
    color: var(--ex-text-strong);
    box-shadow: 0 1px 2px var(--bp-alpha-ink-08);
}

.ex-match-chart__mode-btn:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--color-primary) 55%, transparent);
    outline-offset: 1px;
}

.ex-match-chart__canvas-wrap {
    position: relative;
    height: 11.5rem;
    width: 100%;
}

.ex-match-chart__canvas-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.ex-match-chart__badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    z-index: 2;
    padding: 0.1rem 0.4rem;
    border-radius: var(--theme-radius-pill, 999px);
    background: color-mix(in srgb, var(--ex-muted) 22%, transparent);
    color: var(--ex-muted);
    font-size: var(--theme-type-label-size, var(--theme-text-sm));
    font-weight: var(--theme-type-label-weight, var(--theme-weight-semibold, 600));
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.4;
    pointer-events: none;
}

.ex-match-chart__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    margin-top: 0.45rem;
    padding-top: 0.35rem;
    border-top: 1px solid color-mix(in srgb, var(--ex-border) 80%, transparent);
}

.ex-match-chart__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--ex-muted);
    font-size: var(--theme-type-label-size, var(--theme-text-sm));
    font-weight: var(--theme-type-label-weight, var(--theme-weight-semibold, 600));
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ex-match-chart__legend-swatch {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: var(--theme-radius-chip, 4px);
    flex-shrink: 0;
}

.ex-match-chart__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 10rem;
    padding: 1rem 0.75rem;
    text-align: center;
    color: var(--ex-muted);
}

.ex-match-chart__empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.65;
}

.ex-match-chart__empty-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.ex-match-chart__empty-title {
    margin: 0 0 0.25rem;
    color: var(--ex-text-strong, var(--ex-runner-text));
    font-size: var(--theme-type-caption-size, var(--theme-text-sm));
    font-weight: var(--theme-weight-semibold, 600);
}

.ex-match-chart__empty-text {
    margin: 0;
    font-size: var(--theme-type-odds-size-liquidity, var(--theme-text-xs));
    line-height: 1.35;
}

.ex-live-score-panel--cricket .ex-match-chart {
    padding: 0.45rem 0.5rem 0.55rem;
}

@media (min-width: 576px) {
    .ex-match-chart__canvas-wrap {
        height: 13rem;
    }
}

@media (min-width: 992px) {
    .ex-match-chart__canvas-wrap {
        height: 14rem;
    }
}
