/* ================================================================
   TIME SLIDER — Controle temporal da cena 3D
   Barra horizontal na base do viewport para navegacao entre campanhas.
   Ownership: .time-slider-* classes only.
   ================================================================ */

.time-slider-panel {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: min(90%, 720px);
    background: var(--bg1);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    z-index: 15;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
}

.time-slider-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-slider-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg2, var(--bg1));
    color: var(--text1);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s;
}

.time-slider-btn:hover {
    background: var(--bg3, var(--border));
}

.time-slider-track-wrap {
    flex: 1;
    position: relative;
    min-width: 120px;
}

.time-slider-range {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.time-slider-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent, #3b82f6);
    cursor: grab;
    border: 2px solid var(--bg1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.time-slider-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent, #3b82f6);
    cursor: grab;
    border: 2px solid var(--bg1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.time-slider-markers {
    position: absolute;
    top: 50%;
    left: 8px;
    right: 8px;
    height: 0;
    pointer-events: none;
}

.time-slider-marker {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent, #3b82f6);
    transform: translate(-50%, -50%);
    border: 1px solid var(--bg1);
    pointer-events: auto;
    cursor: help;
}

.time-slider-label {
    font-size: 12px;
    color: var(--text2, var(--text1));
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
    user-select: none;
}

.time-slider-speed {
    width: 52px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg1);
    color: var(--text1);
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Focus state for keyboard accessibility */
.time-slider-range:focus-visible {
    outline: 2px solid var(--accent, #3b82f6);
    outline-offset: 2px;
}

.time-slider-btn:focus-visible,
.time-slider-speed:focus-visible {
    outline: 2px solid var(--accent, #3b82f6);
    outline-offset: 1px;
}
