/* Backtest Timeline Scrubber
 *
 * Lives under document.body via direct DOM attachment inside the dialog's chart area.
 * All colors derived from design-tokens.css -- no hardcoded hex values except where
 * the canvas paints pixels (those are embedded in backtest-timeline.js).
 */

.bt-timeline-root {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px 0 0 0;
    outline: none;
    font-family: var(--degen-font-sans, 'Space Grotesk', sans-serif);
    color: var(--degen-text-primary, #E9E9E9);
}

.bt-timeline-root:focus-visible {
    outline: 1px solid var(--degen-color-primary, #B8F84E);
    outline-offset: 2px;
    border-radius: 4px;
}

.bt-timeline-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 0 2px;
    font-family: var(--degen-font-mono, 'Source Code Pro', monospace);
    font-size: 11px;
    color: var(--degen-text-secondary, #A2A2A2);
}

.bt-timeline-btn-group,
.bt-timeline-speed,
.bt-timeline-filter {
    display: inline-flex;
    gap: 2px;
    background: var(--degen-bg-secondary, #0D1215);
    border-radius: 4px;
    padding: 2px;
}

.bt-timeline-btn {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: var(--degen-text-secondary, #A2A2A2);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    min-width: 26px;
    height: 22px;
    line-height: 1;
    cursor: pointer;
    border-radius: 3px;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.bt-timeline-btn:hover {
    background: rgba(184, 248, 78, 0.08);
    color: var(--degen-text-primary, #E9E9E9);
}

.bt-timeline-btn.bt-active {
    background: rgba(184, 248, 78, 0.15);
    color: var(--degen-color-primary, #B8F84E);
    border-color: rgba(184, 248, 78, 0.35);
}

.bt-timeline-readout {
    margin-left: auto;
    font-family: var(--degen-font-mono, 'Source Code Pro', monospace);
    font-size: 11px;
    color: var(--degen-text-primary, #E9E9E9);
    letter-spacing: 0.02em;
}

.bt-timeline-canvas-host {
    position: relative;
    width: 100%;
    background: var(--degen-bg-secondary, #0D1215);
    border: 1px solid rgba(184, 248, 78, 0.12);
    border-radius: 4px;
    overflow: hidden;
    touch-action: none;
}

.bt-timeline-canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: ew-resize;
}

/* Mobile: controls wrap to a second row, readout gets its own line */
@media (max-width: 768px) {
    .bt-timeline-controls {
        font-size: 10px;
    }
    .bt-timeline-btn {
        min-width: 28px;
        height: 24px;
        padding: 2px 6px;
    }
    .bt-timeline-readout {
        width: 100%;
        text-align: right;
        margin-left: 0;
    }
}
