/* Frise de période — la piste, ses graduations, la sélection et ses poignées, glissées pour cadrer
   une série. */

@layer components {
    .timeline {
        position: relative;
        height: 56px;
        margin-top: 10px;
    }
    .timeline-ticks {
        position: absolute;
        left: 0;
        right: 0;
        top: 8px;
        height: 18px;
    }
    .timeline-tick {
        position: absolute;
        top: 0;
        width: 1px;
        height: 18px;
        transform: translateX(-50%);
    }
    .timeline-track {
        position: absolute;
        left: 0;
        right: 0;
        top: 12px;
        height: 10px;
    }
    .timeline-selection {
        position: absolute;
        top: 9px;
        height: 16px;
        box-sizing: border-box;
    }
    .timeline-handle {
        position: absolute;
        top: 50%;
        width: 14px;
        height: 14px;
        transform: translateY(-50%);
        box-sizing: border-box;
    }
    .timeline-handle--start {
        left: -7px;
    }
    .timeline-handle--end {
        right: -7px;
    }
    .timeline-labels {
        position: absolute;
        left: 0;
        right: 0;
        top: 30px;
        display: flex;
        justify-content: space-between;
        gap: 12px;
    }

    .timeline-tick {
        background: var(--canon-theme-line-hover);
    }
    .timeline-track {
        background: var(--canon-theme-highlight);
        border: 1px solid var(--canon-theme-line);
        border-radius: var(--canon-radius-pill);
    }
    .timeline-selection {
        background: var(--local-color-decor-selection);
        border: 2px solid var(--canon-theme-action);
        border-radius: var(--canon-radius-pill);
    }
    .timeline-handle {
        background: var(--canon-theme-action);
        border: 2px solid var(--canon-theme-surface);
        border-radius: 50%;
    }

    .timeline-labels {
        font-size: var(--canon-size-fine);
        color: var(--canon-theme-faint);
    }
    .timeline-selected {
        color: var(--canon-theme-muted);
        font-weight: var(--canon-weight-label);
    }

    .timeline {
        user-select: none;
        touch-action: none;
    }
    .timeline-ticks {
        pointer-events: none;
    }
    .timeline-track {
        cursor: crosshair;
    }
    .timeline-selection {
        cursor: grab;
    }
    .timeline-selection:active {
        cursor: grabbing;
    }
    .timeline-handle {
        cursor: ew-resize;
    }
}
