/* ══════════════════════════════════════════════════════════════
   Gelibolu Revival — Timeline Stilleri
   ══════════════════════════════════════════════════════════════ */

.timeline {
    flex-shrink: 0;
    background: var(--timeline-bg);
    border-top: 1px solid var(--border);
    padding: 6px 14px 8px;
    display: flex;
    align-items: center;
    gap: 10px
}

.timeline-label {
    font-family: var(--mono);
    font-size: .7rem;
    color: var(--accent);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .06em;
    min-width: 60px
}

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

.timeline-btn {
    border: 1px solid var(--border-light);
    background: rgba(80, 75, 60, .12);
    color: var(--text);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .75rem;
    font-family: var(--mono);
    cursor: pointer;
    transition: background .2s
}

.timeline-btn:hover {
    background: rgba(80, 75, 60, .25)
}

.timeline-track {
    flex: 1;
    position: relative;
    height: 44px;
    display: flex;
    align-items: center;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) transparent
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border);
    border-radius: 2px;
    transform: translateY(-50%)
}

.timeline-phases {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 1;
    padding: 0 6px;
    min-width: max-content
}

/* ── Phase Marker ── */
.phase-marker {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 36px;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: transform .2s
}

.phase-marker:hover {
    transform: translateY(-1px) scale(1.08)
}

.phase-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: #444;
    transition: transform .16s linear, background .2s, border-color .2s, box-shadow .2s
}

.phase-marker.major .phase-dot {
    width: 13px;
    height: 13px;
    border-width: 2px;
    border-color: var(--red-dim);
    background: var(--red-dim)
}

.phase-marker:hover .phase-dot {
    transform: scale(1.3);
    background: var(--accent);
    border-color: var(--accent)
}

.phase-marker.active .phase-dot {
    background: var(--red);
    border-color: var(--red);
    box-shadow: 0 0 6px rgba(140, 58, 58, .4);
    transform: scale(1.2)
}

/* ── Phase Tooltip ── */
.phase-tooltip {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translate(-50%, 8px) scale(.96);
    padding: 8px 12px;
    background: rgba(10, 10, 12, .97);
    border: 1px solid var(--red-dim);
    border-radius: 10px;
    color: #fff;
    font-family: var(--mono);
    font-size: .75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: transform .18s ease, opacity .18s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .6)
}

.phase-tooltip-date {
    display: block;
    color: var(--accent);
    font-size: .68rem;
    margin-top: 3px
}

.phase-marker:hover .phase-tooltip,
.phase-marker:focus-visible .phase-tooltip {
    opacity: 1;
    transform: translate(-50%, -4px) scale(1)
}

.phase-marker.active .phase-tooltip {
    border-color: var(--red)
}

@keyframes pulsePhase {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, .42)
    }

    100% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0)
    }
}

/* ── Mobile Timeline ── */
@media(max-width:768px){
    .timeline{
        flex-wrap:wrap;
        padding:6px 8px 8px;
        gap:6px
    }
    .timeline-label{
        display:none
    }
    .timeline-controls{
        order:-1;
        width:100%
    }
    .timeline-btn{
        flex:1;
        text-align:center;
        padding:8px 14px;
        font-size:.78rem
    }
    .timeline-track{
        height:36px;
        -webkit-overflow-scrolling:touch
    }
    .timeline-phases{
        gap:3px
    }
    .phase-marker{
        width:10px;
        height:28px
    }
    .phase-dot{
        width:5px;
        height:5px
    }
    .phase-marker.major .phase-dot{
        width:10px;
        height:10px
    }
    .phase-marker:not(.major){
        display:none
    }
    .phase-marker.active:not(.major){
        display:flex
    }
}
