:root {
    --viz-accent: #00a8fc;
    --viz-fg: #dbdee1;
    --viz-fg-dim: #949ba4;
    --viz-surface: #313338;
    --viz-border: rgba(255, 255, 255, 0.08);
    --viz-font-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.live-viz-mount {
    margin: 1rem 0;
}

.live-viz-mount--chart .chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.85rem;
    margin-top: 0.65rem;
    padding: 0;
    list-style: none;
    font-size: 0.82rem;
}

.live-viz-mount--chart .chart-legend__sw {
    display: inline-block;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 2px;
    margin-right: 0.35rem;
    vertical-align: middle;
}

.live-pace-heatmap {
    overflow-x: auto;
    font-size: 0.72rem;

}

.live-pace-heatmap__row {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 2px;
}

.live-pace-heatmap__row--head {
    font-family: var(--viz-font-mono);
    opacity: 0.75;
    margin-bottom: 0.35rem;
}

.live-pace-heatmap__label {
    flex: 0 0 7rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 0.35rem;
}

.live-pace-heatmap__lap {
    flex: 0 0 1.5rem;
    text-align: center;
}

.live-pace-heatmap__cell {
    flex: 0 0 1.5rem;
    height: 1.25rem;
    border-radius: 2px;
    background: color-mix(
        in srgb,
        #d4a017 calc(var(--pace-intensity, 0) * 85%),
        #2ecc71 calc((1 - var(--pace-intensity, 0)) * 75%)
    );
}

.live-pace-heatmap__cell--empty {
    background: rgba(255, 255, 255, 0.06);
}

.live-race-replay__track {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.65rem 0;
}

.live-race-replay__lane {
    display: grid;
    grid-template-columns: 7rem 1fr;
    align-items: center;
    gap: 0.5rem;
}

.live-race-replay__lane::before {
    content: '';
    position: absolute;
    /*top: 50%;*/
    left: 130px;
    border-top: 1px solid darkgrey;
    background: black;
    width: calc(100% - 140px);
    transform: translateY(-50%);
}

.live-race-replay__name {
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

}

.live-race-replay__lane::after {
    content: '';
    grid-column: 2;
    grid-row: 1;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
}

.live-race-replay__dot {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    justify-self: start;
    margin-left: calc(var(--replay-progress, 0%) - 0.375rem);
    transition: margin-left 0.1s linear;
    z-index: 1;
}

.live-race-replay__laps {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 3px;
    font-size: 0.65rem;
    line-height: 1;
    font-family: var(--viz-font-mono);
    color: var(--viz-fg);
    opacity: 0.8;
    pointer-events: none;
    white-space: nowrap;
}

.live-race-replay__timeline {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 0.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--viz-border);
    padding-top: 0.5rem;
}

.live-race-replay__timeline-inner {
    grid-column: 2;
    position: relative;
    height: 1.25rem;
}

.live-race-replay__timeline-marker {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-size: 0.65rem;
    font-family: var(--viz-font-mono);
    color: var(--viz-fg-dim);
    line-height: 1;
}

.live-race-replay__timeline-marker::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    width: 1px;
    height: 4px;
    background: var(--viz-border);
}

.live-race-replay__controls {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.live-viz-disclaimer {
    margin: 0.85rem 0 0.5rem;
    font-size: 0.82rem;
    opacity: 0.7;
}
