/* ==========================================================
   ATATÜRK ATLASI — zones.css
   Zaman çizelgesi bölgeleri: harita etiketleri, tooltip,
   "Bu tarihte" lejant paneli, oynat düğmesi
   ========================================================== */

/* --- HARİTA ETİKETLERİ --- */
.zone-label-icon { background: none; border: none; }
.zone-label {
    position: absolute;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.15;
    pointer-events: none;
    text-shadow:
        0 0 2px #fff, 0 0 4px #fff, 0 0 6px rgba(255,255,255,0.9),
        1px 1px 0 rgba(255,255,255,0.9), -1px -1px 0 rgba(255,255,255,0.9);
    animation: zoneLabelIn 0.45s ease both;
}
.zone-label-out .zone-label { animation: zoneLabelOut 0.3s ease both; }
.zones-labels-hidden .zone-label-icon { display: none; }

@keyframes zoneLabelIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes zoneLabelOut { from { opacity: 1; } to { opacity: 0; } }

/* --- TOOLTIP --- */
.leaflet-tooltip.zone-tooltip {
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #f8fafc;
    box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.45);
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
}
.leaflet-tooltip.zone-tooltip::before { display: none; }
.zone-tip-title { font-size: 0.72rem; font-weight: 900; letter-spacing: 0.04em; filter: brightness(1.6) saturate(0.9); }
.zone-tip-place { font-size: 0.78rem; font-weight: 700; margin-top: 2px; }
.zone-tip-date  { font-size: 0.66rem; font-weight: 600; color: #cbd5e1; margin-top: 2px; }

/* --- LEJANT PANELİ --- */
.zone-legend {
    position: absolute;
    top: 84px;
    right: 24px;
    width: 300px;
    max-width: calc(100vw - 48px);
    z-index: 455;
    overflow: hidden;
    border-radius: 18px;
}
.zone-legend-head {
    width: 100%;
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 12px 16px;
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
    font-family: 'Inter', sans-serif;
    color: #0f172a;
}
.zone-legend-kicker {
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #94a3b8;
}
.zone-legend-date {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-weight: 900;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
}
.zone-legend-chevron {
    margin-left: auto;
    align-self: center;
    color: #94a3b8;
    transition: transform 0.25s ease;
}
.zone-legend.open .zone-legend-chevron { transform: rotate(180deg); }

.zone-legend-list {
    max-height: 0;
    overflow-y: auto;
    transition: max-height 0.3s ease;
    border-top: 1px solid transparent;
}
.zone-legend.open .zone-legend-list {
    max-height: min(52vh, 440px);
    border-top-color: rgba(226, 232, 240, 0.8);
}
.zone-legend-empty {
    padding: 12px 16px 14px;
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
}
.zone-legend-item {
    display: flex;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 11px 16px;
    background: none;
    border: 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s ease;
    animation: zoneLabelIn 0.35s ease both;
}
.zone-legend-item:last-child { border-bottom: 0; }
.zone-legend-item:hover,
.zone-legend-item:focus-visible { background: rgba(255, 255, 255, 0.75); outline: none; }
.zone-legend-swatch {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    margin-top: 2px;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.zone-legend-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.zone-legend-title { font-size: 0.76rem; font-weight: 800; color: #0f172a; line-height: 1.25; }
.zone-legend-meta  { font-size: 0.66rem; font-weight: 600; color: #64748b; line-height: 1.3; }
.zone-legend-desc  { font-size: 0.68rem; color: #475569; line-height: 1.45; margin-top: 3px; }

/* --- OYNAT DÜĞMESİ --- */
.timeline-play {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    margin-right: 16px;
    margin-bottom: 26px;            /* pip etiketleriyle hizala */
    border-radius: 50%;
    border: 0;
    display: grid;
    place-items: center;
    background: #0f172a;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
    transition: transform 0.15s ease, background 0.2s ease;
}
.timeline-play:hover { transform: scale(1.06); }
.timeline-play:focus-visible { outline: 3px solid rgba(220, 38, 38, 0.45); outline-offset: 2px; }
.timeline-play svg { width: 16px; height: 16px; grid-area: 1 / 1; }
.timeline-play .icon-pause { display: none; }
.timeline-play.playing { background: #dc2626; }
.timeline-play.playing .icon-play  { display: none; }
.timeline-play.playing .icon-pause { display: block; }

/* --- MOBİL --- */
@media (max-width: 768px) {
    .zone-legend {
        top: auto;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
        bottom: 132px;
    }
    .zone-legend.open .zone-legend-list { max-height: 34vh; }
    .zone-label { font-size: 10px; }
    .timeline-play { width: 32px; height: 32px; margin-right: 12px; margin-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .zone-label, .zone-legend-item { animation: none; }
    .zone-legend-list, .zone-legend-chevron { transition: none; }
}
