/* ==========================================================
   ATATÜRK ATLASI — basemap.css
   Altlık stilleri (tonlama), il sınırı/adı etiketleri,
   katman seçici paneli
   ========================================================== */

/* --- ALTLIK TONLAMALARI (sadece karo katmanı etkilenir) --- */
.bm-tarihi .leaflet-tile-pane,
.bm-tarihi-thumb { filter: sepia(0.35) saturate(1.15) brightness(1.03); }

#map.bm-tarihi { background: #e9dcc3; }
#map.bm-koyu   { background: #1f2937; }
#map.bm-acik   { background: #f2f3f0; }
#map.bm-uydu   { background: #0b1d2a; }

/* --- İL ADLARI --- */
.prov-label-icon { background: none; border: none; }
.prov-label {
    position: absolute;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--prov-label, #475569);
    text-shadow:
        0 0 2px var(--prov-halo, #fff), 0 0 3px var(--prov-halo, #fff),
        1px 1px 0 var(--prov-halo, #fff), -1px -1px 0 var(--prov-halo, #fff);
    pointer-events: none;
    opacity: 0.9;
}
.prov-z-far .prov-label { font-size: 9px; }
.prov-label-hidden { display: none; }

/* --- KATMAN SEÇİCİ --- */
.basemap-control {
    position: absolute;
    top: 24px;
    right: 98px;
    z-index: 470;
}
.basemap-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 16px;
    border: 0;
    cursor: pointer;
}
.basemap-toggle:hover { background: rgba(255, 255, 255, 0.95); }
.basemap-toggle:focus-visible { outline: 3px solid rgba(220, 38, 38, 0.4); outline-offset: 2px; }

.basemap-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 286px;
    padding: 12px;
    border-radius: 18px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.basemap-control.open .basemap-panel { opacity: 1; visibility: visible; transform: none; }

.basemap-head {
    font-family: 'Inter', sans-serif;
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #94a3b8;
    margin: 0 2px 8px;
}
.basemap-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bm-option {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}
.bm-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 10px;
    background-size: 200%;
    background-position: 45% 40%;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.bm-thumb.is-local { background-size: cover; background-position: center; }
.bm-option:hover .bm-thumb { transform: scale(1.03); }
.bm-option.active .bm-thumb { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #dc2626; }
.bm-option:focus-visible { outline: none; }
.bm-option:focus-visible .bm-thumb { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0f172a; }
.bm-name { font-size: 0.66rem; font-weight: 700; color: #334155; text-align: center; }
.bm-option.active .bm-name { color: #b91c1c; }

.basemap-toggles {
    display: flex;
    gap: 14px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
}
.bm-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
}
.bm-check input { accent-color: #dc2626; width: 14px; height: 14px; }

@media (max-width: 768px) {
    .leaflet-control-attribution { font-size: 9px; line-height: 1.3; max-width: 100vw; }
    .basemap-panel { width: min(286px, calc(100vw - 32px)); right: -74px; }
}
