/* --- SAYFA DÜZENİ (LAYOUT) --- */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    
    /* ESKİSİ: height: 100%; idi. */
    /* YENİSİ: Hem 100% hem 100dvh yazıyoruz (Garanti olsun diye) */
    height: 100%; 
    height: 100dvh; /* Mobilde adres çubuğunu hesaba katar */
    
    overflow: hidden; 
    font-family: 'Segoe UI', sans-serif;
}


/* Ana Uygulama Kutusu (Yan Yana Dizilim) */
.main-app {
    display: flex;
    width: 100%;
    height: 100vh; /* Tam Ekran Yüksekliği */
}


/* Logo ve Başlıklar normal kalsın */
.sidebar-header, .logo-area, .sidebar > img {
    flex-shrink: 1; /* Varsayılan değer */
}




/* 3. "KATMANLAR" Başlığı: Tam Ortala */
.sidebar-header {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important; /* Alt alta dizilsin */
    align-items: center !important;
    justify-content: center !important;
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
    background: transparent !important;
    flex-shrink: 0;
}

.sidebar-header h3 {
    /* Tarayıcının varsayılan devasa boşluklarını sil */
    margin: 0 !important;
    padding: 0 !important;
    
    font-family: 'Segoe UI', sans-serif;
    font-size: 15px !important;
    font-weight: 800;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1 !important; /* Satırları birbirine yapıştır */
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sidebar-header h3 i {
    color: #3498db;
    font-size: 15px !important;
}

/* Alt Çizgi */
.sidebar-header::after {
    content: "";
    display: block;
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, #3498db, #e67e22);
    /* Yazının hemen dibine çek */
    margin: 4px auto 0 auto !important; 
    border-radius: 2px;
}







.module-card h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-desc {
    font-size: 12px;
    color: #7f8c8d;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

/* Sidebar Butonları */
.sidebar-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-btn {
    padding: 12px;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-family: 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: left;
}

.sidebar-btn:hover {
    transform: translateX(5px); /* Sağa kayma efekti */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.blue-btn { background-color: #3498db; }
.green-btn { background-color: #27ae60; }

/* Katman Önizleme Süslemesi */
.layer-preview {
    display: flex;
    gap: 10px;
}
.lp-item {
    flex: 1;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    text-align: center;
    font-size: 11px;
    color: #555;
}



.info-card ul li {
    font-size: 12px !important;
    color: #555;
    margin-bottom: 4px !important;
}

/* 2. Footer (Bilgi İşlem Yazısı - En Alt) */
.sidebar-footer {
    width: 100% !important;
    flex-shrink: 0 !important; /* Asla büzülmesin */
    
    /* Tasarım */
    background: #f1f2f6 !important; /* Koyu gri yerine açık kurumsal gri */
    border-top: 1px solid #e0e0e0 !important;
    padding: 15px 10px !important; /* Rahat bir boşluk */
    
    /* Yazı Stili */
    font-family: 'Segoe UI', sans-serif;
    font-size: 10px !important; /* Kibar ve küçük font */
    font-weight: 600;
    color: #95a5a6 !important; /* Göz yormayan gri ton */
    text-align: center !important;
    line-height: 1.6 !important;
    text-transform: uppercase; /* Daha resmi görünüm */
    letter-spacing: 0.5px;
    
    /* Konumlandırma */
    margin-top: 0 !important; 
}




/* Harita ve Butonların Kapsayıcısı */
.map-container {
    position: relative; /* BU ÇOK ÖNEMLİ: Butonların harita içinde kalmasını sağlar */
    width: 100%;
    height: 100%;       /* Haritanın tam ekran olmasını sağlar */
    overflow: hidden;   /* Taşan kısımları gizle */
}






@keyframes scroll-left {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}



/* --- SAĞ ÜST MENÜ BUTONLARI --- */

.top-right-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px; /* Butonlar arası boşluk */
    z-index: 50; /* Haritanın üzerinde yüzsün */
}

.menu-btn {
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.menu-btn:hover {
    transform: translateY(-2px); /* Üzerine gelince hafif yukarı kalksın */
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

/* Renkler */
.orange-btn {
    background-color: #e67e22; /* Turuncu (Adres) */
}
.orange-btn:hover {
    background-color: #d35400;
}

.green-btn {
    background-color: #27ae60; /* Yeşil (Parsel) */
}
.green-btn:hover {
    background-color: #219150;
}

/* Mobilde butonlar çok yer kaplamasın diye alt alta alabiliriz */
@media (max-width: 768px) {
    .top-right-menu {
        flex-direction: column;
        top: 60px; /* Zoom butonlarının altına gelsin */
        right: 10px;
        gap: 5px;
    }
    .menu-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* --- AÇILIR PANEL STİLLERİ (DROPDOWN TARZI) --- */

.modal {
    display: none; /* Varsayılan gizli */
    
    /* Konumlandırma: Ekranı kaplamak yerine sağ üste sabitliyoruz */
    position: absolute; 
    top: 75px; /* Butonların hemen altı (20px üst boşluk + buton yüksekliği + boşluk) */
    right: 20px; /* Sağ kenardan 20px içeride (Butonlarla aynı hizada) */
    
    width: 300px; /* Sabit ve kibar bir genişlik */
    z-index: 2000; /* Haritanın üzerinde */
    
    /* Arka plan karartmayı kaldırdık (pointer-events ile tıklamayı engellemiyoruz) */
}

.modal-content {
    background-color: #ffffff;
    padding: 15px 20px;
    border-radius: 8px; /* Köşeleri yuvarlat */
    
    /* Hafif gölge ile havada duruyormuş hissi verelim */
    box-shadow: 0 5px 20px rgba(0,0,0,0.15); 
    border: 1px solid #f0f0f0;
    
    font-family: 'Segoe UI', sans-serif;
    
    /* Küçük bir açılış animasyonu */
    animation: fade-in-up 0.2s ease-out;
    position: relative;
}

/* Panel sanki butondan aşağı kayıyormuş gibi animasyon */
@keyframes fade-in-up {
    from { 
        opacity: 0;
        transform: translateY(-10px); 
    }
    to { 
        opacity: 1;
        transform: translateY(0); 
    }
}

/* Panel Başlıkları */
.modal-content h3 {
    font-size: 16px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Kapatma Butonu (Daha küçük ve köşede) */
.close-btn {
    position: absolute;
    right: 15px;
    top: 12px;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #e74c3c; /* Üzerine gelince kırmızı olsun */
}

/* Form Elemanları (Daha sıkı görünüm için marginleri kıstık) */
.form-group {
    margin-bottom: 10px;
}
.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
    margin-bottom: 3px;
}
.form-control {
    width: 100%;
    padding: 6px 8px;
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fafafa;
}
.form-control:focus {
    background: white;
    border-color: #3498db;
    outline: none;
}

/* Butonun yanındaki küçük büyüteç butonu */
.input-zoom-btn {
    height: 30px; /* Input yüksekliğiyle eşitleyelim */
    width: 30px;
}

/* Aksiyon Butonu */
.action-btn {
    margin-top: 5px;
    padding: 8px;
    font-size: 13px;
    border-radius: 4px;
    background-color: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    width: 100%;
}
.action-btn:hover {
    background-color: #2980b9;
}

/* Sonuç Listesi (Parsel için) */
.sonuc-item {
    padding: 8px;
    border-bottom: 1px solid #f1f1f1;
    font-size: 12px;
    cursor: pointer;
}
.sonuc-item:hover {
    background-color: #f0f8ff;
    color: #2980b9;
}

/* --- YAN YANA HİZALAMA DÜZELTMESİ --- */

.input-group {
    display: flex !important; /* Kesinlikle yan yana olsun */
    align-items: center; /* Dikeyde ortala */
    gap: 5px; /* Aralarında 5px boşluk bırak */
    width: 100%;
}

/* Select kutusu kalan tüm alanı kaplasın */
.input-group select.form-control {
    flex-grow: 1; /* Genişleyebildiği kadar genişlesin */
    width: auto !important; /* %100 genişliği iptal et */
    margin-bottom: 0 !important; /* Alt boşluğu sıfırla */
}

/* Büyüteç Butonu Sabit Kalsın */
.input-zoom-btn {
    flex-shrink: 0; /* Asla büzülmesin/küçülmesin */
    width: 34px;
    height: 34px; /* Select yüksekliğiyle (yaklaşık) aynı olsun */
    border: none;
    background-color: #3498db;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.input-zoom-btn:hover {
    background-color: #2980b9;
}

.input-zoom-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}


/* ======================================================= */
/* 🎨 GLASSMORPHISM POPUP TASARIMI (ARCGIS DEFAULT İÇİN)   */
/* ======================================================= */

.esri-popup__main-container {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-radius: 20px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    width: 300px !important; 
}

/* Popup içindeki widget arka planlarını şeffaf yap (Varsayılan beyazı ezer) */
.esri-popup__main-container .esri-widget {
    background: transparent !important;
}

.esri-popup__header {
    background: transparent !important;
    padding: 15px 15px 5px 15px !important;
    border-bottom: none !important;
}

.esri-popup__header-title {
    color: #1c1c1e !important;
    font-weight: 800 !important;
    font-size: 16px !important;
}

/* Kapatma (X) Tuşu */
.esri-popup__button {
    color: #8e8e93 !important;
    background: #f2f2f7 !important;
    border-radius: 50% !important;
    width: 28px !important;
    height: 28px !important;
    margin: 10px !important;
    transition: background 0.2s, color 0.2s !important;
}

.esri-popup__button:hover {
    background: #e5e5ea !important;
    color: #1c1c1e !important;
}

.esri-popup__content {
    padding: 0 15px 15px 15px !important;
    margin: 0 !important;
}

/* Alt kısımdaki üçgen ibrenin (Pointer) rengi */
.esri-popup__pointer-direction {
    background-color: rgba(255, 255, 255, 0.95) !important;
}

/* Gıcık Sabitleme (Dock) Butonunu Kesin Gizle */
.esri-popup__button--dock {
    display: none !important;
}


/* --- ARAMALI SELECT KUTUSU AYARLARI --- */
.select2-container .select2-selection--single {
    height: 34px !important; /* Senin input yüksekliğin */
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    display: flex;
    align-items: center;
}

/* Ok işaretini hizala */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 32px !important;
}

/* Modal içinde listenin düzgün açılması için z-index ayarı */
.select2-container--open {
    z-index: 9999999 !important;
}
.select2-dropdown {
    z-index: 9999999 !important;
}

/* --- SAĞ ALT KÖŞE ZORUNLU HİZALAMA --- */

/* ArcGIS'in sağ alt köşesini zorla dikey yap */
.esri-ui-bottom-right {
    flex-direction: column !important; /* Yan yana gelmeyi engelle */
    align-items: flex-end !important;  /* Sağa yasla */
    gap: 10px; /* Buton grupları arasına boşluk koy */
}

/* --- AKILLI ÖLÇÜM MENÜSÜ VE SONUÇ PANELİ --- */

/* Ana Kapsayıcı (Sağa yaslı, esnek) */
.measure-widget-wrapper {
    display: flex;
    align-items: center; /* Dikeyde ortala */
    justify-content: flex-end; /* Her şeyi sağa yasla */
    background: transparent;
    margin-top: 10px;
    position: relative;
    pointer-events: none; /* Boşluklar haritayı engellemesin */
}

/* Tıklanabilir alanların haritayı kullanabilmesi için */
.measure-widget-wrapper > * {
    pointer-events: auto;
}

/* Ölçüm Sonuç Paneli (ArcGIS Widget'ı Buraya Gelecek) */
#active-measure-container {
    display: none; /* Başlangıçta gizli */
    background: white;
    padding: 0;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    margin-right: 10px; /* Butonlarla arasına boşluk */
    min-width: 250px; /* Widget'ın düzgün görünmesi için */
    overflow: hidden;
}

/* ArcGIS Widget'ının kendi kenarlıklarını temizle */
#active-measure-container .esri-widget {
    box-shadow: none !important;
    margin: 0 !important;
}

/* Araç Butonları (Mesafe, Alan, Çöp) */
.measure-tools-panel {
    display: flex;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    overflow: hidden;
    
    /* Gizleme Efektleri */
    max-width: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    margin-right: 5px; /* Logo ile arasına boşluk */
}

/* Ana İkon (Logo) */
.measure-main-icon {
    width: 32px;
    height: 32px;
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #6e6e6e;
    font-size: 16px;
    z-index: 2;
    transition: color 0.3s;
}

/* Hover Efekti: Sadece logoya gelince araçları aç */
/* .measure-widget-wrapper:hover yerine, doğrudan ikonun parentına bakıyoruz */
.measure-widget-wrapper:hover .measure-tools-panel {
    max-width: 200px;
    opacity: 1;
    visibility: visible;
}

.measure-widget-wrapper:hover .measure-main-icon {
    color: #0079c1;
}

/* Küçük Butonlar */
.m-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-right: 1px solid #eee;
    background: white;
    color: #6e6e6e;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.m-btn:last-child { border-right: none; }
.m-btn:hover { background: #f3f3f3; color: #333; }
.m-btn.active { background: #0079c1; color: white; }
.m-btn.trash:hover { color: #d63031; background: #fff0f0; }

/* --- SAĞ ÜST MENÜNÜN YAZILI HALE GELMESİ --- */

/* Butonun genel yapısını genişletiyoruz */
.top-right-menu .menu-btn {
    width: auto !important;       /* Sabit kare genişliğini iptal et */
    height: 40px !important;      /* Yüksekliği sabitle */
    padding: 0 20px !important;   /* Yazının kenarlarına boşluk ver */
    display: flex !important;     /* İkon ve yazıyı yan yana diz */
    align-items: center;          /* Dikeyde ortala */
    justify-content: center;
    gap: 10px;                    /* İkon ile yazı arasına boşluk koy */
    border-radius: 25px !important; /* Köşeleri yuvarla (Hap şekli) */
    font-family: 'Segoe UI', sans-serif; /* Okunaklı font */
    font-size: 14px;
    font-weight: 600;             /* Yazıyı biraz kalınlaştır */
    white-space: nowrap;          /* Yazının alt satıra geçmesini engelle */
    text-decoration: none;
}

/* İkon Ayarı */
.top-right-menu .menu-btn i {
    font-size: 16px;
}

/* Mobil Uyumluluk (Opsiyonel): Ekran çok küçükse sadece ikon kalsın istersen */
@media screen and (max-width: 600px) {
    .top-right-menu .menu-btn span {
        display: none; /* Mobilde yazıyı gizle */
    }
    .top-right-menu .menu-btn {
        width: 40px !important; /* Tekrar kare yap */
        padding: 0 !important;
        border-radius: 50% !important; /* Yuvarlak yap */
    }
}

/* --- BUTON RENKLENDİRME --- */

/* 1. Adres Sorgu Butonu (Mavi Tonları) */
#btn-open-query {
    background: linear-gradient(135deg, #3498db, #2980b9) !important; /* Açık maviden koyuya */
    color: white !important; /* Yazı rengi beyaz */
    border: none !important;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.4) !important; /* Mavi gölge */
    transition: transform 0.2s, box-shadow 0.2s;
}

#btn-open-query:hover {
    transform: translateY(-2px); /* Üstüne gelince hafif yukarı kalksın */
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.6) !important;
}

/* 2. Parsel Sorgu Butonu (Turuncu/Kiremit Tonları) */
#btn-open-parsel {
    background: linear-gradient(135deg, #e67e22, #d35400) !important; /* Turuncudan koyuya */
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(230, 126, 34, 0.4) !important; /* Turuncu gölge */
    transition: transform 0.2s, box-shadow 0.2s;
}

#btn-open-parsel:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(230, 126, 34, 0.6) !important;
}

/* İkonların Rengi */
.menu-btn i {
    color: white !important; /* İkonlar da beyaz olsun */
}

/* --- SIDEBAR İÇERİK DÜZENİ (DÜZELTİLMİŞ) --- */

/* Sidebar'ın içindeki genel boşlukları ayarlayalım */
.sidebar .layer-content {
    padding: 10px 15px; /* Sağdan ve soldan 15px boşluk bırak */
}

/* --- SİDEBAR HİZALAMA DÜZELTMESİ (KESİN ÇÖZÜM) --- */



/* 2. Logo: Geniş, Ortada ve Altı Çizgili */
.sidebar-logo {
    display: block !important;
    width: auto !important;     /* Genişlik serbest */
    max-width: 80% !important;  /* Ama kenarlara yapışmasın */
    max-height: 100px !important; /* Yüksekliği abartma */
    object-fit: contain !important;
    
    /* Ortalamak için margin ayarı */
    margin: 20px auto 15px auto !important; 
    
    /* Logoya özel alt çizgi */
    padding-bottom: 15px !important;
    border-bottom: 1px solid #e0e0e0 !important; 
    flex-shrink: 0; /* Asla büzülmesin */
}



/* Çizginin başlığın yanına değil ALTINA gelmesini garantiye al */
.sidebar-header::after {
    margin: 5px auto 0 auto !important; /* Auto ile ortala */
}

/* 4. Katman Listesi: Ortadaki boşluğu kaplasın */
.layer-content {
    width: 100% !important; /* Paneli doldur */
    flex-grow: 1 !important; /* Kalan tüm boşluğu bu alsın (Footer'ı aşağı iter) */
    overflow-y: auto !important; /* Sadece burası kaydırılabilsin */
    text-align: left !important; /* İçindeki yazılar sola yaslı olsun (Okunabilirlik için) */
    padding: 0 10px !important; /* Kenarlardan hafif boşluk */
}


/* Scroll Çubuğu Görünümü (Chrome/Safari için opsiyonel güzellik) */
.layer-content::-webkit-scrollbar {
    width: 6px;
}
.layer-content::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}
.layer-content::-webkit-scrollbar-track {
    background: transparent;
}


/* Başlıkların kenara yapışmasını engelleyelim */
.group-title {
    font-size: 11px;
    text-transform: uppercase;
    color: #95a5a6;
    font-weight: 800;
    margin: 20px 0 10px 5px; /* Hafif soldan boşluk */
    letter-spacing: 0.5px;
}

/* --- GELİŞMİŞ KATMAN KARTI TASARIMI --- */

.layer-card {
    background-color: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 8px;
    padding: 10px 15px;
    transition: all 0.2s ease;
}

.layer-card:hover {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-color: #ddd;
}

/* Kartın Üst Kısmı (İsim ve Buton) */
.layer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.layer-header span {
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #34495e;
}

/* --- GİZLİ SAYDAMLIK PANELİ --- */
.opacity-panel {
    display: none; /* Varsayılan olarak GİZLİ */
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
    animation: fadeIn 0.3s ease; /* Açılırken yumuşak gelsin */
}

/* Panel Açılma Efekti */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.opacity-panel .op-label {
    font-size: 11px;
    color: #7f8c8d;
    display: block;
    margin-bottom: 5px;
}

/* --- ESKİ ŞIK ON/OFF BUTON TASARIMI --- */
.switch {
    position: relative;
    display: inline-block;
    width: 44px; /* Genişlik */
    height: 22px; /* Yükseklik */
    margin-left: 10px;
    flex-shrink: 0;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc; /* Kapalıyken gri */
    transition: .4s;
    border-radius: 34px; /* Yuvarlak hatlar */
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px; /* Topun boyutu */
    width: 16px;
    left: 4px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%; /* Topu yuvarlak yap */
}

/* Açıkken (Checked) Renk */
input:checked + .slider {
    background-color: #3498db; /* Mavi */
}

/* Açıkken Topun Hareketi */
input:checked + .slider:before {
    transform: translateX(20px);
}

/* --- YAZIYA TIKLAYINCA İMLEÇ DEĞİŞSİN --- */
.layer-header span {
    cursor: pointer; /* Tıklanabilir el işareti */
    user-select: none; /* Yazı seçilmesin */
    flex-grow: 1; /* Boşluğa tıklayınca da algılasın */
}


/* --- ŞEFFAF & YÜZEN (GLASSMORPHISM) SIDEBAR --- */

.sidebar {
    /* 1. Haritanın üzerine çıkartıyoruz (Float) */
    position: absolute !important; 
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 2000; /* Harita kontrollerinin üzerinde olsun */
    
    
    /* 3. ŞEFFAFLIK VE BUZLU CAM EFEKTİ */
    background-color: rgba(255, 255, 255, 0.85) !important; /* %85 Opak Beyaz */
    backdrop-filter: blur(8px) !important; /* Arkadaki haritayı bulanıklaştır */
    box-shadow: 2px 0 15px rgba(0,0,0,0.15) !important; /* Derinlik gölgesi */
    border-right: 1px solid rgba(255, 255, 255, 0.5); /* İnce parlak kenar */

    /* 4. İç Düzen (Önceki hizalama ayarlarını koruyoruz) */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    overflow: hidden !important;
    padding: 0 !important;
}



/* 3. Logo: Tepede Kalsın */
.sidebar-logo {
    margin-bottom: 0 !important; /* Logodan sonra hemen boşluk başlamasın, yay devreye girsin */
}

/* --- YENİ DÜZENLEMELER (EN ALTA EKLE) --- */

/* 1. SOL MENÜ (SIDEBAR) - Varsayılan: KAPALI (Solda gizli) */
.sidebar {
    left: -360px !important; /* Ekranın dışına ittik */
    transition: left 0.3s ease !important;
    width: 360px !important;
    z-index: 3000 !important; /* En üstte */
    background: rgba(255, 255, 255, 0.95) !important; /* Biraz daha opak olsun */
}

/* Menü Açılınca */
.sidebar.open {
    left: 0 !important; /* Geri gelir */
}

/* 2. SOL TARAFTAKİ KAYAN BUTONLARIN GENEL STİLİ */
.floating-left {
    position: absolute;
    left: 20px; /* Kapalıyken soldan boşluk */
    z-index: 2500;
    transition: left 0.3s ease; /* Kayma animasyonu */
}

/* Sol Panel Açıldığında Tüm Butonları İtiyoruz */
/* Body'ye 'menu-acik' sınıfı eklendiğinde çalışır */
body.menu-acik .floating-left,
body.menu-acik .basemap-widget-container {
    left: 380px !important; /* Panel (320px) + 20px Boşluk */
}

/* --- SOL MENÜ AÇIKKEN KATMAN PANELİNİ KAYDIR --- */
body.menu-acik .floating-panel {
    /* Hesaplama: 
       Sol Menü Genişliği (400px) + 
       Düğmelerin Eski Konumu (20px) + 
       Düğme Genişliği (40px) + 
       Boşluk (10px) 
       = 470px
    */
    left: 430px !important; 
}

/* 3. YENİ BUTONLARIN TASARIMI */
.map-btn {
    width: 40px;
    height: 40px;
    background-color: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    cursor: pointer;
    color: #2c3e50;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 20px; /* Varsayılan üst boşluk */
}
.map-btn:hover {
    background-color: #3498db;
    color: white;
}



.floating-panel {
    /* Temel Görünüm Ayarları */
    display: none;
    position: absolute;
    top: 70px;
    width: 280px; /* Panel genişliği */
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 3000;
    padding-bottom: 10px;

    /* --- HAREKET MANTIĞI BURADA --- */
    
    /* 1. Varsayılan Konum (Sol Panel KAPALIYKEN) */
    left: 70px !important; 
    
    /* 2. Animasyon (Hem sağa gidiş hem sola dönüş için) */
    transition: left 0.3s ease !important; 

    max-height: calc(100vh - 90px); /* Panel boyunu ekranın altına çarpmayacak şekilde sınırlar */
    overflow-y: auto;               /* İçerik taştığı an dikey scroll çıkartır */
}
.floating-panel.active {
    display: block;
}

/* Panel Başlığı */
.panel-header {
    background: #3498db;
    color: white;
    padding: 10px 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky; 
    top: 0;
    z-index: 10;
}
.panel-header h3 { margin: 0; font-size: 14px; }
.close-panel { cursor: pointer; font-size: 20px; }

/* Panel İçerik Scroll */
.layer-content-scroll {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

/* Resim butonun içine sığsın ve ortalansın */
.custom-bm-icon {
    width: 60%;
    height: 60%;
    object-fit: contain;
    display: block;
}

/* --- KESİN ÇÖZÜM: HARİTA ALTLIKLARI SIKI GÖRÜNÜM --- */



/* 2. Her Bir Harita Kutusunun Ayarı */
.bm-item {
    margin: 0 !important;          /* Haritaların kendi etrafındaki boşluğu sil */
    padding: 0 !important;
    width: 70px !important;        /* Genişliği sabitledik (İstersen 80px yap) */
    background: transparent !important;
    border: none !important;       /* Varsa görünmez sınırları sil */
}

/* 3. Resimlerin Kutuya Tam Oturması (EN ÖNEMLİ KISIM) */
.bm-preview {
    width: 100% !important;        /* Kutunun tamamını kapla */
    height: 50px !important;       /* Yüksekliği sabitle */
    
    /* Resim kutunun kenarlarına kadar uzasın (Boşluk kalmasın) */
    background-size: cover !important;  
    background-position: center !important;
    background-repeat: no-repeat !important;
    
    /* Kenarlık ve Köşeler */
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    box-shadow: none !important;   /* İç gölgeyi kaldır */
    margin: 0 !important;          /* Resmin dışındaki boşluğu sıfırla */
}

/* 4. Seçili Olanın Mavi Çerçevesi */
.bm-item.active .bm-preview {
    border: 2px solid #3498db !important; /* Çerçeveyi dışa değil sınıra ver */
}

/* 5. Altındaki Yazıları Biraz Yaklaştır ve Küçült */
.bm-label {
    margin-top: 3px !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
    color: #333 !important;
}




/* --- HARİTA YÜKSEKLİĞİNİ DÜZELT --- */
/* Footer artık yer kaplamadığı için harita %100 uzamalı */
.map-container, #viewDiv {
    height: 100vh !important; /* Tam ekran yap */
}



/* --- SOL PANELİ YERE KADAR UZAT --- */
.sidebar {
    height: 100vh !important; /* Ekranın tamamını kapla */
    bottom: 0 !important;     /* Alt sınıra sıfırla */
    
    /* Eğer panelin alt köşeleri yuvarlaksa, yere değdiği için dik yapalım */
    border-bottom-right-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}





/* --- MOBİLDE POP-UP PENCERESİNİ ORTALAMA --- */

@media screen and (max-width: 768px) {
    
    /* ArcGIS'in "dock" (yapışma) modundaki kapsayıcısını hedef alıyoruz */
    .esri-popup--is-docked-bottom .esri-popup__main-container,
    .esri-popup--is-docked .esri-popup__main-container,
    .esri-ui .esri-popup__main-container {
        
        /* 1. Alta yapışmayı iptal et ve ekranın ortasına sabitle */
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        bottom: auto !important;
        right: auto !important;
        
        /* 2. Tam merkezlemek için matematiksel kaydırma */
        transform: translate(-50%, -50%) !important;
        margin: 0 !important;

        /* 3. Genişlik ve Görünüm Ayarları */
        width: 85% !important;       /* Ekranın %85'ini kaplasın */
        max-width: 350px !important; /* Çok da devasa olmasın */
        max-height: 70vh !important; /* Ekran boyunu aşmasın */
        
        /* 4. Şıklık Katalım */
        border-radius: 12px !important; /* Köşeleri yuvarla */
        box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important; /* Derin gölge */
        z-index: 9999 !important;
    }

    /* Alt kısımdaki gereksiz ikonları gizle (Dock/Undock butonu vb.) */
    .esri-popup__footer {
        display: none !important;
    }
}


/* --- SOL PANEL İÇERİK TASARIMI --- */

/* Bölüm Başlığı */
.section-title {
    width: 100%;
    font-size: 11px;
    font-weight: 800;
    color: #95a5a6;
    letter-spacing: 1px;
    margin: 20px 0 15px 0;
    padding-left: 20px; /* Soldan hizala */
    text-align: left;
    border-left: 3px solid #3498db; /* Soluna mavi çizgi */
}

/* --- 3'LÜ IZGARA - GENİŞ BOŞLUKLU FİNAL VERSİYON --- */

/* 1. Izgara Yapısı */
.quick-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 Eşit Kolon */
    
    /* ÖNEMLİ: Yan yana boşluğu iyice açtık (Eskisi 14px idi, şimdi 20px) */
    gap: 20px;        
    
    /* Kenar boşluğunu da artırdık (Kutular ortada toplansın) */
    padding: 0 20px;  
    
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 15px; /* Alt kısımdaki widget ile mesafeyi de açtık */
}

/* 2. Kutu Tasarımı (Daha Küçük ve Karemsi) */
.quick-item {
    background-color: white;
    border: 1px solid #eee;
    border-radius: 12px;
    
    /* Yükseklik biraz daha kısıldı (Kibarlaştı) */
    height: 75px !important; 
    
    width: 100%;
    
    padding: 4px; /* İç boşluk azaldı */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px; /* İkon ve yazı birbirine yaklaştı */
    
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

/* Hover Efekti */
.quick-item:hover {
    transform: translateY(-3px); /* Hafif yukarı zıplama */
    border-color: #3498db;
    box-shadow: 0 5px 12px rgba(0,0,0,0.08);
}

/* 3. İkon Kutusu */
.icon-box {
    width: 40px; /* İdeal küçük boyut */
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    
    font-size: 15px; /* İkon boyutu */
    color: white;
    margin: 0;
    flex-shrink: 0;
}

/* 4. Yazı Stili */
.quick-item span {
    font-family: 'Segoe UI', sans-serif;
    font-size: 11px !important; 
    font-weight: 700;
    color: #555;
    text-align: center;
    line-height: 1.1;
    
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Renkler */
.icon-box.blue { background: linear-gradient(135deg, #3498db, #2980b9); }
.icon-box.green { background: linear-gradient(135deg, #2ecc71, #27ae60); }
.icon-box.red { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.icon-box.orange { background: linear-gradient(135deg, #f39c12, #d35400); }
.icon-box.purple { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.icon-box.whatsapp { background: linear-gradient(135deg, #25D366, #128C7E); }

/* Toplanma alanları için özel canlı yeşil geçişi */
.icon-box.assembly { 
    background: linear-gradient(135deg, #00b09b, #96c93d); 
}



/* --- HAVA DURUMU WIDGET --- */
.weather-widget {
    margin: 20px 15px;
    background: linear-gradient(135deg, #3498db, #5dade2);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.ww-icon {
    font-size: 32px;
    opacity: 0.9;
}

.ww-info {
    text-align: right;
}

.ww-degree {
    font-size: 24px;
    font-weight: 700;
}

.ww-city {
    font-size: 12px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- HIZLI ERİŞİM BUTON RENKLERİ --- */

/* 1. İstek Şikayet: Kurumsal Mavi/Mor */
.icon-box.crm { 
    background: linear-gradient(135deg, #4facfe, #00f2fe); 
}

/* 2. Ulaşım: Turuncu (Otobüs rengi) */
.icon-box.transport { 
    background: linear-gradient(135deg, #f093fb, #f5576c); 
}

/* 3. Web Sitesi: Deniz Mavisi */
.icon-box.website { 
    background: linear-gradient(135deg, #43e97b, #38f9d7); 
}

/* 4. Mezarlık: Koyu Yeşil/Gri (Saygınlık) */
.icon-box.cemetery { 
    background: linear-gradient(135deg, #434343, #000000); 
}

/* 5. Afet Bilgi: Turuncu/Sarı (Dikkat) */
.icon-box.disaster { 
    background: linear-gradient(135deg, #f6d365, #fda085); 
}

/* 6. Eczane: Kırmızı (Acil Sağlık) */
.icon-box.pharmacy { 
    background: linear-gradient(135deg, #ff9a9e, #fecfef); 
    background: linear-gradient(135deg, #e74c3c, #c0392b); /* Daha net kırmızı */
}

/* 7. Kapalı Yollar: Koyu Gri/Mavi (Asfalt tonu) */
.icon-box.traffic { 
    background: linear-gradient(135deg, #667eea, #764ba2); 
}

/* 8. Deprem: Kahverengi/Kiremit (Toprak) */
.icon-box.quake { 
    background: linear-gradient(135deg, #ebc0fd, #d9ded8); 
    background: linear-gradient(135deg, #d35400, #a04000); /* Toprak tonu */
}


/* 9. Şarj İstasyonları: Turuncu Tonları */
.icon-box.charge { 
    background: linear-gradient(135deg, #f39c12, #e67e22); 
}


/* Uzun yazıların kutuya sığması için ek ayar */
.quick-item span {
    text-align: center;
    line-height: 1.2;
    font-size: 11px !important; /* Biraz küçülttük ki sığsın */
}


/* Parsel Sonuç Listesi Tasarımı */
.sonuc-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sonuc-item:hover {
    background-color: #f0fdf4; /* Açık yeşil hover */
}

.sonuc-item strong {
    color: #2c3e50;
    display: block;
}

.sonuc-item span {
    color: #7f8c8d;
    font-size: 11px;
}

.sonuc-badge {
    background: #27ae60;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
}

/* Haritadan Seçim Modu İmleci (ZORLA UYGULA) */
.secim-modu-aktif, 
.secim-modu-aktif .esri-view-surface,
.secim-modu-aktif canvas {
    cursor: crosshair !important; /* !important ArcGIS'i ezer */
}


/* Sıralama Butonu Stili */
.sort-btn {
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    cursor: pointer;
    color: #555;
    float: right; /* Sağa yasla */
    transition: all 0.2s;
}

.sort-btn:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* --- DİNAMİK LİSTE TASARIMI --- */

.data-item {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s;
}

.data-item:hover {
    transform: translateX(5px);
    border-color: #3498db;
}

/* Sol Taraf: Deprem Büyüklüğü (Kutu) */
.mag-box {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

/* Sağ Taraf: Yer ve Zaman */
.info-box {
    display: flex;
    flex-direction: column;
}

.info-place {
    font-size: 12px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2px;
}

.info-time {
    font-size: 10px;
    color: #95a5a6;
}

/* Büyüklüğe Göre Renkler */
.mag-low { background-color: #27ae60; }   /* Yeşil (<3) */
.mag-med { background-color: #f39c12; }   /* Turuncu (3-5) */
.mag-high { background-color: #e74c3c; }  /* Kırmızı (>5) */


/* --- SCROLL DÜZELTMESİ (EN ALTA EKLE) --- */

/* 1. Yeni Scroll Alanı Ayarları */
.sidebar-scroll-area {
    width: 100%;
    flex: 1;             /* Header ve Footer arasındaki tüm boşluğu kapla */
    overflow-y: auto;    /* İçerik taşarsa dikey scroll aç */
    overflow-x: hidden;  /* Yatay taşmayı engelle */
    padding: 0 5px;      /* Kenarlardan hafif boşluk */
    margin-bottom: 10px; /* Alttaki widget ile arasına mesafe koy */
}

/* 2. Scroll Çubuğu Görünümü (Chrome/Edge/Safari için şıklaştırma) */
.sidebar-scroll-area::-webkit-scrollbar {
    width: 5px;
}
.sidebar-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-scroll-area::-webkit-scrollbar-thumb {
    background-color: #bdc3c7;
    border-radius: 4px;
}
.sidebar-scroll-area::-webkit-scrollbar-thumb:hover {
    background-color: #95a5a6;
}

/* Firefox için Scroll Desteği */
.sidebar-scroll-area {
    scrollbar-width: thin; /* İnce çubuk */
    scrollbar-color: #bdc3c7 transparent; /* Çubuk Rengi / Arka Plan */
}

/* 3. Eski CSS'teki hatalı flex'i temizle */
.sidebar {
    /* flex-direction ve diğer ayarların korunsun, sadece overflow'u teyit et */
    overflow: hidden !important; 
}

/* 4. İçerik kutularının genişlik sorunu varsa düzelt */
.quick-menu-grid {
    padding-bottom: 20px; /* Listenin en altı kesilmesin diye boşluk */
}





/* =======================================================
   POPUP "DOCK" (SABİTLEME) BUTONUNU GİZLEME
   ======================================================= */
.esri-popup__button--dock {
    display: none !important; /* O gıcık butonu yok et */
}


/* --- DENİZLİM MODÜLÜ TASARIMI --- */

/* Geri Dön Butonu Stili */
.back-btn-style {
    width: 100%;
    background: #ecf0f1;
    color: #2c3e50;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}
.back-btn-style:hover {
    background: #bdc3c7;
}

.panel-header-title {
    margin: 10px 0 5px 5px;
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

/* 1. KATEGORİ KARTLARI (FOTO 1) */
.dz-cat-card {
    position: relative;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.dz-cat-card:hover {
    transform: scale(1.02);
}
.dz-cat-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dz-cat-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 700;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* 2. LİSTE ELEMANLARI (FOTO 2) */
.dz-list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    background: white;
    transition: background 0.2s;
}
.dz-list-item:hover {
    background: #f9f9f9;
}
.dz-list-img {
    width: 50px;
    height: 50px;
    border-radius: 50%; /* Yuvarlak Resim */
    object-fit: cover;
    border: 2px solid #eee;
}
.dz-list-name {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
}

/* 3. DETAY SAYFASI (FOTO 3) */
.dz-detail-hero {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}
.dz-detail-title {
    font-size: 20px;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 10px;
}
.dz-detail-text {
    font-size: 13px;
    line-height: 1.6;
    color: #555;
    text-align: justify;
    padding: 0px 20px 0px 5px;
    display: block;
}
/* İlk harfi büyük yapma efekti (Drop Cap) */
.dz-detail-text::first-letter {
    font-size: 3em;
    float: left;
    margin-right: 8px;
    line-height: 0.8;
    font-weight: bold;
    color: #2c3e50;
}


/* --- TIKLANABİLİR LOGO AYARI --- */
.logo-link {
    display: block;
    cursor: pointer;
    transition: transform 0.2s;
}

.logo-link:hover {
    transform: scale(1.05); /* Üzerine gelince %5 büyüsün */
    opacity: 0.9;
}


/* --- BASEMAP (ALTLIK) BUTONU - DÜZELTİLMİŞ FİNAL HALİ --- */
.basemap-widget-container {
    position: absolute !important;
    z-index: 2500 !important;
    
    /* Başlangıç Konumu */
    top: 120px !important;    /* Diğer butonların altında */
    left: 20px !important;    /* Sol kenardan mesafe */
    
    /* Boyut ve Görünüm */
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important; /* Arka planı içindeki butona bırak */
    border: none !important;
    
    /* ANİMASYON SİHRİ BURADA */
    /* Sadece 'left' özelliği değiştiğinde animasyon yap */
    transition: left 0.3s ease !important; 
}

/* --- MENÜ AÇILINCA SAĞA KAYMA HAREKETİ --- */
/* Body'ye 'menu-acik' sınıfı gelince çalışır */
body.menu-acik .basemap-widget-container {
    left: 380px !important; /* Panel (360px) + 20px boşluk */
}

.basemap-toggle-btn {
    width: 100% !important;   /* Kapsayıcının (40px) tamamını kapla */
    height: 100% !important;  /* Yüksekliği tam kapla */
    
    background-color: white;
    border-radius: 8px;       /* Diğer butonlar gibi karemsi */
    border: none !important;  /* Kenarlık varsa kaldır */
    margin: 0 !important;     /* Kayma yapan boşlukları sil */
    
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #2c3e50;
    font-size: 18px;
}

.basemap-toggle-btn:hover {
    background-color: #3498db;
    color: white;
}

/* --- SAĞ ALT KÖŞE ZORUNLU HİZALAMA --- */

/* ArcGIS'in sağ alt köşesini zorla dikey yap ve YUKARI KALDIR */
.esri-ui-bottom-right {
    flex-direction: column !important; /* Yan yana gelmeyi engelle */
    align-items: flex-end !important;  /* Sağa yasla */
    gap: 10px; /* Buton grupları arasına boşluk koy */
    
    /* YENİ EKLEME: Alttan 80px yukarı itiyoruz */
    bottom: 80px !important; 
}

@media (max-width: 768px) {
    .esri-ui-bottom-right {
        bottom: 175px !important; /* Zaman tüneli ve panellerin üstüne çıkardık */
    }
}

/* --- SOL PANEL SABİTLEME VE HİZALAMA (FİNAL DÜZELTME) --- */

/* 1. ANA İSKELET: Paneli dikey, esnek bir kutu yapıyoruz */
.sidebar {
    display: flex !important;
    flex-direction: column !important; /* Alt alta diz */
    align-items: stretch !important;    /* İçerik sağa/sola tam yayılsın */
    height: 100vh !important;           /* Ekranın tamamını kapla */
    overflow: hidden !important;        /* Ana panelde scroll çıkmasın */
    padding: 0 !important;              /* İç boşlukları sıfırla */
}

/* 2. ORTA KISIM (LİSTE): Kalan tüm boşluğu bu doldursun */
.sidebar-scroll-area {
    flex: 1 !important;             /* Boşluğu doldur (Büyü) */
    overflow-y: auto !important;    /* Sadece burası kaydırılsın */
    overflow-x: hidden !important;  /* Yatay kaymayı engelle */
    width: 100% !important;         /* Genişliği tam kapla */
    padding: 0 5px !important;      /* İçerik kenara yapışmasın */
    margin-bottom: 0 !important;
}

/* 3. HAVA DURUMU (KAYMA DÜZELTMESİ) */
.weather-widget {
    flex-shrink: 0 !important;      /* Asla büzülme, sabit kal */
    
    /* Genişlik Ayarı (Sağa kaymayı çözer) */
    width: auto !important;         /* %100 değil, otomatiğe al */
    margin: 10px 15px !important;   /* Sağdan/Soldan 15px boşluk bırak */
    
    /* Görünüm */
    border-radius: 12px !important;
    box-sizing: border-box !important; /* Kenarlıkları genişliğe dahil et */
}

/* 4. İLETİŞİM KUTUSU */
.info-card {
    flex-shrink: 0 !important;      /* Sabit kal */
    width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;    /* Köşeleri düzle (Footer ile birleşsin) */
    background-color: rgba(255, 255, 255, 0.9) !important;
    padding: 10px 15px !important;
    box-sizing: border-box !important;
    border-top: 1px solid #eee;
}

/* 5. FOOTER (BİLGİ İŞLEM) */
.sidebar-footer {
    flex-shrink: 0 !important;      /* Sabit kal */
    width: 100% !important;
    margin: 0 !important;
    background: #f1f2f6 !important;
    padding: 15px 10px !important;
    box-sizing: border-box !important; /* Taşmayı engelle */
    z-index: 20;
}




/* --- POPUP İÇİ NAVİGASYON BUTONLARI --- */
.popup-nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* 3 Eşit Parça */
    gap: 6px;
    margin-top: 10px;
}

.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    border-radius: 6px;
    text-decoration: none;
    color: white !important;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    transition: transform 0.2s, opacity 0.2s;
    line-height: 1.2;
}

.nav-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.nav-btn i {
    font-size: 16px;
    margin-bottom: 4px;
}

/* Markalara Özel Renkler */
.btn-google { background-color: #4285F4; } /* Google Mavisi */
.btn-apple  { background-color: #333333; } /* Apple Siyahı */
.btn-yandex { background-color: #FC3F1D; } /* Yandex Kırmızısı */



/* --- DİL DEĞİŞTİRME (SAĞ ÜST KÖŞE SABİTLEME) --- */

/* Önce Header'ın referans noktası olduğunu belirtelim */
.sidebar-header {
    position: relative; /* İçindeki öğeleri buna göre konumlandır */
    width: 100%;        /* Panelin tamamını kaplasın */
    display: flex;
    justify-content: center; /* Logoyu ortada tutar */
    align-items: center;
}

/* Dil Butonlarını Sağ Üste Çiviliyoruz */
.lang-switch-container {
    position: absolute;  /* Bağımsız hareket et */
    right: 15px;         /* Sağdan 15px boşluk */
    top: 20px;           /* Yukarıdan 20px boşluk */
    
    font-size: 11px;     /* Biraz daha kibar dursun */
    font-weight: 700;
    background: rgba(255,255,255,0.8); /* Yazı üstüne gelirse okunsun diye */
    padding: 3px 6px;
    border-radius: 4px;
    
    display: flex;
    gap: 6px;
    z-index: 10;
}

.lang-btn {
    cursor: pointer;
    color: #95a5a6;
    transition: color 0.3s;
}

.lang-btn:hover {
    color: #3498db;
}

.lang-btn.active {
    color: #2c3e50;
    text-decoration: underline;
}

.lang-separator {
    color: #eee;
}


/* --- HAVA DURUMU & KALİTE (CSS GRID SİSTEMİ) --- */
.weather-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* İki tarafı TAM EŞİT böl */
    gap: 10px; /* Aradaki boşluk */
    padding: 10px 15px;
    margin-bottom: 5px;
}

.info-card {
    background: white;
    height: 50px; /* Yükseklik kesinlikle sabit */
    border-radius: 10px;
    display: flex;
    align-items: center; /* İçindekileri dikey ortala */
    padding: 0 10px;
    gap: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden; /* Taşmayı engelle */
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* İKON KISMI */
.card-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f2f5;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0; /* İkonun sıkışmasını engelle */
}

/* YAZI KISMI */
.card-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
    overflow: hidden; /* Yazı taşarsa gizle */
}

.card-title {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    font-weight: 700;
    white-space: nowrap;
}

.card-value {
    font-size: 14px;
    color: #333;
    font-weight: 800;
    white-space: nowrap;
}

/* --- RENKLENDİRMELER --- */
/* Hava Durumu: Güneşli/Bulutlu vb. */
.weather-sunny .card-icon { background: #fff3cd; color: #f39c12; }
.weather-cloudy .card-icon { background: #e2e6ea; color: #7f8c8d; }
.weather-rainy .card-icon { background: #d1ecf1; color: #3498db; }

/* Hava Kalitesi: İyi/Orta/Kötü */
.aqi-good { border-left: 3px solid #27ae60; }
.aqi-good .card-icon { background: #d4edda; color: #27ae60; }

.aqi-fair { border-left: 3px solid #f39c12; }
.aqi-fair .card-icon { background: #fff3cd; color: #f39c12; }

.aqi-poor { border-left: 3px solid #c0392b; }
.aqi-poor .card-icon { background: #f8d7da; color: #c0392b; }

/* --- MODAL (AYNEN KALIYOR) --- */
.custom-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px);
    display: none; justify-content: center; align-items: center; z-index: 9999;
}
.custom-modal-content {
    background: white; width: 85%; max-width: 320px; border-radius: 20px; padding: 20px;
    text-align: center; position: relative; animation: slideUp 0.3s;
}
.modal-close-btn { position: absolute; top: 10px; right: 10px; border:none; background:none; font-size:20px; cursor:pointer;}
.modal-big-icon { font-size: 40px; margin-bottom: 10px; }
.modal-title { font-size: 16px; font-weight: bold; margin-bottom: 5px; }
.modal-desc { font-size: 12px; color: #666; margin-bottom: 15px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; }
.modal-item { background: #f8f9fa; padding: 8px; border-radius: 8px; }
.modal-item span { display: block; font-size: 10px; color: #999; }
.modal-item strong { display: block; font-size: 13px; color: #333; }
@keyframes slideUp { from { transform: translateY(20px); opacity:0; } to { transform: translateY(0); opacity:1; } }




/* --- MODAL İÇİ İLÇE SEÇİMİ --- */
.modal-district-select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px; /* Altındaki detaylarla mesafe */
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: #f1f2f6;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    /* Ok İşareti */
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='gray' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

.modal-district-select:hover {
    background-color: #e2e6ea;
}

/* --- POPUP İÇİ 5 GÜNLÜK TAHMİN LİSTESİ --- */
.forecast-list {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.forecast-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 5px;
    border-bottom: 1px solid #f9f9f9;
}

.forecast-item:last-child { border-bottom: none; }

.f-day { font-size: 12px; font-weight: 600; color: #555; width: 80px; text-align: left; }
.f-icon { font-size: 14px; color: #777; width: 30px; text-align: center; }
.f-temp { font-size: 12px; font-weight: 700; color: #333; }
.f-temp span { color: #999; font-weight: normal; margin-left: 5px; } /* Min derece rengi */



/* --- AÇILIŞ EKRANI (DÜZELTİLMİŞ & ORTALANMIŞ) --- */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0; /* width/height yerine dört köşeden gerdirdik */
    
    background-color: rgba(255, 255, 255, 0.9); /* Biraz daha opak */
    backdrop-filter: blur(10px);
    z-index: 999999; /* En en üste */
    
    /* MERKEZLEME SİHRİ */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Dikeyde ortala */
    align-items: center;     /* Yatayda ortala */
    text-align: center;      /* İçindeki metinleri ortala */
    
    transition: opacity 0.5s ease, visibility 0.5s;
}

#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    /* İçerik kapsayıcısı */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    
    /* Mobil taşmalarını önlemek için */
    max-width: 90%; 
    padding: 20px;
}

/* Logo Ayarları */
.splash-logo {
    display: block; /* Satır içi boşlukları siler */
    max-width: 150px; /* Logo çok büyükse sınırlar */
    width: auto;
    height: auto;
    margin: 0 auto; /* Logoyu kendi içinde de ortalar */
    
    animation: pulseLogo 2s infinite ease-in-out;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
}

@keyframes pulseLogo {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Loader (Dönen Halka) */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.loader-circle {
    width: 45px;
    height: 45px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #27ae60; /* Denizli Yeşili */
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-family: 'Segoe UI', sans-serif;
    font-size: 13px;
    color: #555;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 10px;
}


/* --- TOGGLE SWITCH (AÇ/KAPA BUTONU) --- */
.toggle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f1f2f6;
    border-bottom: 1px solid #ddd;
    margin-bottom: 10px;
    border-radius: 6px;
}

.toggle-label {
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
}

/* Switch Gövdesi */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

/* Yuvarlak Kısım */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #27ae60; /* Açıkken Yeşil */
}

input:checked + .slider:before {
    transform: translateX(18px);
}


/* --- IFRAME (İstek Şikayet İçin) --- */
.full-panel-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    min-height: 400px; /* Panel içinde kaybolmasın */
}

/* --- SIDEBAR RESIZER (GÜNCELLENMİŞ) --- */
.resizer {
    width: 15px; /* Tutma alanı daha geniş olsun ki kolay yakalansın */
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    cursor: col-resize !important; /* İmleç değişimi zorunlu */
    z-index: 99999; /* Her şeyin üzerinde olsun (Scroll bar'ın bile) */
    background: transparent;
    /* Test etmek için aşağıdaki satırı açarsan çubuğu kırmızı görürsün: */
    /* background: red; opacity: 0.5; */
}

/* Sidebar genişlerken metinlerin seçilmesini engelle */
body.resizing {
    cursor: col-resize !important;
    user-select: none; /* Yazı seçimini kapat */
}

/* --- YATAY SCROLL GİZLEME --- */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Sidebar genişlerken iframe takılmasın (Mouse olaylarını iframe yutar yoksa) */
body.resizing iframe {
    pointer-events: none;
}


/* --- BUGÜN DEFNEDİLENLER BUTON RENGİ --- */
.icon-box.burial { 
    background: linear-gradient(135deg, #555555, #222222); /* Koyu Gri / Siyah Tonu */
}

/* Modal içindeki iframe'in köşeleri düzgün dursun */
#defin-modal .custom-modal-content iframe {
    display: block;
}


/* --- KOMPAKT SWIPE TASARIMI --- */

/* Galeri Kutusunu Dikey Hizala */
.basemap-gallery {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important; /* Dış boşluğu sıfırla */
    width: max-content; /* İçerik kadar genişle */
    min-width: unset !important; /* Genişlik zorlamasını kaldır */
}

/* Header (Başlık ve Switch) - Çok İnce Yapıyoruz */
.swipe-header-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 4px 8px; /* Çok az boşluk */
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    gap: 10px;
}

/* Switch (Anahtar) - Küçültülmüş */
.switch-small {
    position: relative;
    display: inline-block;
    width: 30px;  /* Genişlik küçüldü */
    height: 16px; /* Yükseklik küçüldü */
    margin: 0;
}
.switch-small input { opacity: 0; width: 0; height: 0; }
.slider-small {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}
.slider-small:before {
    position: absolute;
    content: "";
    height: 12px; width: 12px; /* Top küçüldü */
    left: 2px; bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider-small { background-color: #3498db; }
input:checked + .slider-small:before { transform: translateX(14px); }

/* Seçim Paneli (Açılınca Görünecek) */
#swipe-settings {
    padding: 8px;
    background: #fff;
    border-bottom: 1px solid #eee;
    width: 100%;
    box-sizing: border-box;
}

/* Select Kutuları - Daha Kibar */
.swipe-select {
    width: 100%;
    font-size: 10px; /* Yazı küçüldü */
    padding: 2px;
    height: 20px;
}

/* Galeri Listesi (Resimlerin olduğu yer) */
#gallery-items-wrapper {
    padding: 5px;
    width: 100%;
    box-sizing: border-box;
}


/* --- ALTLIK GALERİSİ (TEMİZLENMİŞ & DÜZELTİLMİŞ) --- */

/* --- ALTLIK GALERİSİ (ORİJİNAL GİZLEME AYARLARIYLA) --- */
.basemap-gallery {
    /* Konumlandırma */
    position: absolute !important;
    top: 0 !important;
    left: 50px !important;
    
    /* GİZLEME AYARLARI (Sildiğimiz kodlar bunlardı) */
    opacity: 0;               /* Görünmez yap */
    visibility: hidden;       /* Tıklanamaz yap */
    transform: translateX(-10px); /* Hafif solda başlasın (Efekt için) */
    pointer-events: none;     /* Mouse ile etkileşimi kes */
    
    /* Diğer Görsel Ayarlar */
    background-color: white !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    width: max-content !important;
    min-width: 250px !important;
    z-index: 5000 !important;
    
    /* Geçiş Efekti (Yumuşak açılması için) */
    transition: all 0.3s ease-in-out;
}

/* --- GALERİ AÇIKKEN (AKTİF) --- */
/* Bu sınıf eklendiğinde görünür olacak */
.basemap-gallery.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
    pointer-events: auto !important;
}

/* Galeri Aktifken (JS 'flex' yapıyor ama garanti olsun) */
.basemap-widget-container.active .basemap-gallery {
    display: flex !important;
    animation: fadeIn 0.3s ease;
}

/* Basit açılış animasyonu */
@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- İÇERİK STİLLERİ (Swipe, Header, Resimler) --- */

/* Başlık ve Switch Kısmı */
.swipe-header-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    box-sizing: border-box;
}

/* Ayar Paneli (Dropdownlar vs.) */
#swipe-settings {
    padding: 10px;
    background: #fff;
    border-bottom: 1px solid #eee;
    width: 100%;
    box-sizing: border-box;
}

/* Resimlerin Yatay Listesi */
#gallery-items-wrapper {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    /* Scroll çubuğu görünümü */
    scrollbar-width: thin;
}

/* --- Harita Kartları (Tekil) --- */
.bm-item {
    width: 70px;
    cursor: pointer;
    text-align: center;
    flex-shrink: 0; /* Sıkışmasın */
}

.bm-preview {
    width: 100%;
    height: 50px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #eee;
    margin-bottom: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bm-item.active .bm-preview {
    border: 2px solid #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.bm-label {
    font-size: 10px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ======================================================= */
/* 🔹 KOMPAKT & PROFESYONEL KATMAN PANELİ (V2) 🔹 */
/* ======================================================= */

/* --- 1. GRUP KONTEYNERLERİ --- */
.layer-group-container {
    background-color: transparent !important;
    margin-bottom: 10px !important; /* Boşluk azaltıldı */
    border: none !important;
}

/* --- 2. GRUP BAŞLIKLARI (Master Switch Hizalaması) --- */
.layer-group-header {
    /* Görünüm */
    background: #f8f9fa !important;
    border: 1px solid #dcdcdc !important;
    border-left: 4px solid #3498db !important; /* Mavi Çizgi */
    border-radius: 6px !important; /* Daha az yuvarlak */
    
    /* Boyutlar (Kompakt) */
    padding: 6px 10px !important; /* İç boşluklar kısıldı */
    margin-bottom: 8px !important;
    
    /* HİZALAMA (Şalteri Sağa Atan Kısım) */
    display: flex !important;
    justify-content: space-between !important; /* Sola ve Sağa yasla */
    align-items: center !important; /* Dikey ortala */
    width: 100% !important;
    box-sizing: border-box !important;
}

.group-label {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-grow: 1 !important; /* Boşluğu doldur ki şalteri iteklesin */
}

.group-label span {
    font-family: 'Segoe UI', sans-serif !important;
    font-size: 13px !important; /* Yazı küçüldü */
    font-weight: 700 !important;
    color: #333 !important;
}

/* --- 3. İÇERİK KUTUSU --- */
.group-content {
    padding: 0 4px !important;
}

/* --- 4. KATMAN SATIRLARI (Kartlar) --- */
.layer-item {
    background-color: #fff !important;
    border: 1px solid #eee !important; /* Çok ince kenarlık */
    border-radius: 5px !important;
    margin-bottom: 5px !important; /* Satırlar birbirine yaklaştı */
    box-shadow: 0 1px 2px rgba(0,0,0,0.03) !important; /* Hafif gölge */
    transition: background 0.2s ease !important;
}

.layer-item:hover {
    background-color: #fcfcfc !important;
    border-color: #ccc !important;
}

/* Katman Başlık Satırı */
.layer-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 8px 10px !important; /* Daha ince satır */
    cursor: pointer !important;
    min-height: 30px !important;
}

.layer-name {
    font-size: 12px !important; /* Okunaklı ama küçük */
    font-weight: 600 !important;
    color: #555 !important;
}

/* Aktif (Seçili) Olduğunda Yazı */
.layer-header input:checked ~ .layer-name,
.layer-header:has(input:checked) .layer-name {
    color: #2980b9 !important;
}

/* --- 5. iOS SWITCH (Küçültülmüş Boyut) --- */
.ios-switch {
    position: relative !important;
    display: inline-block !important;
    width: 34px !important;  /* Genişlik kısıldı (Eski: 42px) */
    height: 18px !important; /* Yükseklik kısıldı (Eski: 24px) */
    flex-shrink: 0 !important;
    margin-left: 10px !important;
}

.ios-switch .slider {
    border-radius: 34px !important;
}

.ios-switch .slider:before {
    height: 14px !important; /* Top küçüldü */
    width: 14px !important;
    left: 2px !important;
    bottom: 2px !important;
}

/* Açıkken Topu Sağa Kaydır */
.ios-switch input:checked + .slider:before {
    transform: translateX(16px) !important;
}

/* --- 6. SAYDAMLIK PANELİ (Kompakt) --- */
.layer-settings {
    background-color: #f9f9f9 !important;
    padding: 8px 10px !important; /* Daha az yer kaplasın */
    border-top: 1px solid #eee !important;
    display: none;
}

.opacity-label {
    font-size: 10px !important;
    color: #999 !important;
    margin-bottom: 4px !important;
}

/* Slider Çubuğu */
input[type=range]::-webkit-slider-runnable-track {
    height: 4px !important; /* Daha ince çubuk */
}

input[type=range]::-webkit-slider-thumb {
    height: 14px !important; /* Daha küçük top */
    width: 14px !important;
    margin-top: -5px !important;
}


/* ======================================================= */
/* HIZLI ERİŞİM LİNKLERİ VE POP-UP TASARIMI */
/* ======================================================= */

/* Linkleri Saran Kutu */
.quick-links-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 5px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
}

/* Tekil Link Satırı */
.quick-link-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    margin-bottom: 4px;
    background-color: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.quick-link-item:hover {
    background-color: #eef6fb; /* Açık mavi hover */
    border-color: #3498db;
    transform: translateX(3px); /* Hafif sağa kayma */
}

.quick-link-item span {
    font-size: 12px;
    font-weight: 600;
    color: #444;
    margin-left: 10px;
    flex-grow: 1; /* Yazı alanı doldursun */
}

.link-arrow {
    font-size: 10px;
    color: #ccc;
}

/* Ayırıcı Çizgi */
.separator-line {
    border: 0;
    height: 1px;
    background: #e1e4e8;
    margin: 10px 0;
}

/* --- POP-UP (MODAL) PENCERE --- */
.custom-modal-overlay {
    position: fixed;
    z-index: 10000 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    
    /* BURAYI DEĞİŞTİRİYORUZ: flex yerine none yapıyoruz */
    display: none; 
    
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
}

.custom-modal-box {
    background-color: #fff;
    width: 80%; /* Ekranın %80'i genişlik */
    height: 80%; /* Ekranın %80'i yükseklik */
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: zoomIn 0.3s ease; /* Açılış animasyonu */
}

/* Modal Başlık Kısmı */
.custom-modal-header {
    padding: 15px;
    background-color: #3498db;
    color: white;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Kapatma (X) Tuşu */
.custom-close-btn {
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}
.custom-close-btn:hover { color: #ddd; }

/* İçerik (Iframe) Kısmı */
.custom-modal-body {
    flex-grow: 1;
    background: #fff;
    position: relative;
}

#modal-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Basit Açılış Animasyonu */
@keyframes zoomIn {
    from {transform: scale(0.9); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}


/* ======================================================= */
/* 🔹 GRUP BAŞLIKLARINI BÜYÜTME (DAHA BELİRGİN) 🔹 */
/* ======================================================= */

/* 1. Başlık Kutusunu Genişlet */
.layer-group-header {
    padding: 14px 15px !important; /* Yüksekliği artırdık */
    margin-bottom: 12px !important; /* Alt boşluğu artırdık */
    background-color: #f4f6f8 !important; /* Hafif koyu zemin */
    border-left-width: 6px !important; /* Mavi çizgiyi kalınlaştırdık */
}

/* 2. Yazı Fontunu Büyüt ve Kalınlaştır */
.group-label span {
    font-size: 13px !important; /* Yazı boyutu büyüdü (Eskisi 13px) */
    font-weight: 700 !important; /* Daha kalın (Bold) oldu */
    color: #2c3e50 !important; /* Koyu lacivert ton */
    letter-spacing: 0.5px !important; /* Harf aralığı */
    text-transform: uppercase !important; /* İstersen BÜYÜK HARF yapar (İstemezsen bu satırı sil) */
}

/* 3. Ok İşaretini Büyüt */
.arrow-icon {
    font-size: 14px !important;
    margin-right: 5px !important;
}

/* 4. Sağdaki Ana Şalteri (Master Switch) Ortalama */
/* Kutu büyüyünce switch yukarıda kalmasın diye */
.layer-group-header .ios-switch {
    transform: scale(1.1); /* Switch'i de çok hafif büyüt */
}


/* ======================================================= */
/* 📱 MOBİL İÇİN HARİTA ALTLIĞI KAYDIRMA (SCROLL) AYARI */
/* ======================================================= */

@media (max-width: 768px) {
    
    /* 1. KUTU KONUMU (DÜZELTİLDİ) */
    .basemap-gallery {
        /* Butonun üzerine binmemesi için sağa itiyoruz */
        left: 70px !important; 
        top: 0 !important;

        /* Ortalama kodlarını İPTAL ET (Burası önemli) */
        transform: none !important; 
        
        /* Genişlik Ayarı: Ekranın kalan kısmını doldursun */
        /* (Ekran genişliği - Soldaki boşluk - 10px güvenlik payı) */
        width: auto !important;
        max-width: calc(100vw - 80px) !important; 
    }

    /* 2. İçindeki Listeyi Kaydırılabilir Yap (Aynen kalıyor) */
    #gallery-items-wrapper {
        display: flex !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px !important;
        gap: 10px !important;
    }

    /* 3. Resimlerin Küçülmesini Engelle */
    .bm-item {
        flex-shrink: 0 !important;
    }
    
    /* Scroll Çubuğunu Gizle */
    #gallery-items-wrapper::-webkit-scrollbar {
        display: none; 
    }
}

/* ======================================================= */
/* 📱 MOBİLDE SAĞ ÜST BUTONLARI YUKARI TAŞIMA */
/* ======================================================= */

@media (max-width: 768px) {
    .top-right-menu {
        /* Eskiden 60px idi. Yukarı çıkması için sayıyı küçültüyoruz */
        top: 25px !important; 
    }
}







/* ======================================================= */
/* 🤏 ALT BİLGİ ALANI DARALTMA (KOMPAKT GÖRÜNÜM)       */
/* ======================================================= */

/* 1. En Alttaki Gri Alan (Footer) */
.sidebar-footer {
    padding: 5px !important;       /* Eskiden 15px idi, 5px'e düşürdük */
    line-height: 1.3 !important;   /* Satırları birbirine yaklaştırdık */
    font-size: 9px !important;     /* Yazıyı çok hafif küçülttük */
    min-height: auto !important;   /* Gereksiz yükseklik varsa sil */
}

/* Footer içindeki alt başlıkları (Müdürlük vb.) biraz daha sıkı yapalım */
.sidebar-footer span {
    display: inline-block;
    margin-bottom: 1px !important; /* Alt alta gelen yazıları yapıştır */
}


/* 2. İletişim Kutusu (Telefon vb. yazan yer) */
.module-card.info-card {
    padding: 6px 10px !important;  /* İç boşluğu azalttık */
    margin-bottom: 0 !important;   /* Altındaki footer ile boşluk bırakmasın */
    border-bottom: none !important; /* Alt çizgiyi kaldırıp footer ile birleştirdik */
}

/* İletişim Başlığı (H4) */
.module-card h4 {
    margin: 0 0 3px 0 !important;  /* Başlık altı boşluğunu aldık */
    font-size: 13px !important;    /* Başlığı biraz küçülttük */
}

/* İletişim Listesi (Telefon numaraları) */
.module-card ul {
    margin: 0 !important;
    padding: 5 !important;
}

.module-card ul li {
    margin-bottom: 1px !important; /* Satır aralarını kıstık */
    font-size: 11px !important;
}


/* ======================================================= */
/* 🔙 HIZLI ERİŞİM MENÜSÜ (YAN YANA 2'Lİ DÜZEN)        */
/* ======================================================= */

.quick-menu-grid {
    /* 3'lü yapıyı iptal edip 2'liye çeviriyoruz */
    grid-template-columns: repeat(2, 1fr) !important; 
    
    /* Kutular arası boşluğu ayarlıyoruz */
    gap: 10px !important; 
    padding: 0 10px !important;
}

/* Kutular 2'li olunca genişleyecek, yüksekliği de orantılı olsun */
.quick-item {
    height: 80px !important; 
}


/* ======================================================= */
/* 🔳 HIZLI ERİŞİM (FERAH 2'Lİ GÖRÜNÜM)                */
/* ======================================================= */

.quick-menu-grid {
    /* 1. Yine 2 Sütun olsun */
    grid-template-columns: repeat(2, 1fr) !important; 
    
    /* 2. Butonların BİRBİRİYLE olan arası (Hem alt-üst hem yan-yana) */
    gap: 20px !important;      /* Eskiden 10px idi, 20px yaptık (İyice açıldı) */
    
    /* 3. Panelin KENAR boşlukları (Duvarlara yapışmasın) */
    padding: 0 25px !important; /* Sağdan ve soldan 25px boşluk bıraktık */
    
    margin-bottom: 20px !important; /* Altındaki menüyle de arası açılsın */
    box-sizing: border-box !important;
}

/* Kutuların Görünümü */
.quick-item {
    height: 85px !important;   /* Yüksekliği ideal boyuta getirdik */
    width: 100% !important;    /* Bulunduğu alanı doldursun */
    box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important; /* Hafif gölge ile derinlik verelim */
}


/* ======================================================= */
/* 📱 MOBİL İÇİN SIDEBAR DARALTMA (ÖZEL AYAR)          */
/* ======================================================= */

@media (max-width: 768px) {

    /* 1. Sidebar Genişliğini Daralt (Masaüstü: 360px -> Mobil: 280px) */
    .sidebar {
        width: 280px !important; 
        /* Kapalıyken ekran dışına itilme mesafesini de güncellemeliyiz */
        left: -280px !important; 
    }

    /* 2. Menü Açıldığında Butonların Kayacağı Yer */
    /* Hesap: 280px (Panel) + 10px (Boşluk) = 290px */
    body.menu-acik .floating-left,
    body.menu-acik .basemap-widget-container {
        left: 300px !important; /* Butonları panelin hemen sağına it */
    }

    /* 3. Menü Açıldığında Katman Panelinin (Floating Panel) Yeri */
    /* Butonların biraz daha sağına gelmeli */
    body.menu-acik .floating-panel {
        left: 350px !important; 
        width: 200px !important; /* Panel daraldığı için bu pencereyi de biraz küçültelim */
    }
    
    /* 4. İçeriklerin Sığması İçin Ufak Ayarlar */
    .quick-item {
        height: 70px !important; /* Kutuları mobilde biraz daha alçalt */
    }
    
    .quick-menu-grid {
        padding: 0 15px !important; /* Kenar boşluklarını mobilde biraz kıs */
        gap: 15px !important;       /* Araları biraz daha sıkı olsun */
    }
}

/* ======================================================= */
/* 🧭 YENİ KOMPAKT PUSULA TASARIMI (MOBİL UYUMLU)      */
/* ======================================================= */

#my-custom-compass {
    /* Konumlandırma */
    position: absolute !important;
    top: auto !important;          /* Üstten bağı kopar */
    bottom: 300px !important;      /* Sağ alttaki butonların üzerine al */
    right: 20px !important;        /* Sağ kenardan boşluk */
    transform: none !important;    /* Ortalamayı iptal et, manuel yerleştirdik */
    
    /* Masaüstü Boyutu (Daha Kibar) */
    width: 40px !important;
    height: 40px !important;
    
    z-index: 50 !important;
    cursor: pointer;
    border-radius: 50%;
    
    /* Gölge ve Geçiş */
    box-shadow: 0 2px 6px rgba(0,0,0,0.15) !important;
    transition: transform 0.2s ease, bottom 0.3s ease;
    background: transparent !important; /* SVG'nin kendi background'u var */
}

/* Hover Efekti */
#my-custom-compass:hover {
    transform: scale(1.1) !important;
}

/* İkonun Kendisi */
.compass-icon {
    width: 100%;
    height: 100%;
    display: block;
    /* Dönme Animasyonu JS Tarafından Yapılıyor */
}

/* 📱 MOBİL İÇİN ÖZEL AYAR (DAHA KÜÇÜK) */
@media (max-width: 768px) {
    #my-custom-compass {
        /* Boyutu Küçült */
        width: 32px !important;
        height: 32px !important;
        
        /* Konumu Ayarla (Butonlara Çarpmasın) */
        right: 15px !important;
        bottom: 300px !important; /* Zoom butonlarının biraz daha üstüne */
    }
}


/* ======================================================= */
/* 🖱️ HARİTA TIKLAMA MENÜSÜ (AKILLI POPUP)             */
/* ======================================================= */

.smart-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2'li yan yana */
    gap: 8px;
    padding: 5px;
}

.smart-btn {
    border: none;
    border-radius: 6px;
    padding: 10px 5px;
    font-family: 'Segoe UI', sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: transform 0.2s, background 0.2s;
    color: white;
    text-align: center;
}

.smart-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.smart-btn i {
    font-size: 16px;
    margin-bottom: 2px;
}

/* Renkler */
.sb-adres { background: linear-gradient(135deg, #e67e22, #d35400); }
.sb-parsel { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.sb-google { background: linear-gradient(135deg, #3498db, #2980b9); }
.sb-copy   { background: linear-gradient(135deg, #7f8c8d, #2c3e50); }


/* ======================================================= */
/* 🧹 TEMİZLEME BUTONU (HARİTA BUTONLARI TARZI)        */
/* ======================================================= */

#clear-map-btn {
    /* Konumlandırma: Diğer butonların akışına uysun */
    position: relative !important; 
    top: auto !important;
    left: auto !important;
    right: auto !important;
    
    /* Şekil ve Boyut (Standart Harita Butonu) */
    width: 32px;  /* Diğer butonların geneli 32px olur */
    height: 32px;
    background-color: #ffffff;
    
    /* Hizalama ve Aralık */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px; /* Üstteki butonla arasına boşluk koy */
    
    /* Görsel Detaylar */
    border-radius: 2px; /* Hafif yumuşak köşe */
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    cursor: pointer;
    font-size: 15px;
    color: #6e6e6e; /* Standart gri renk */
    transition: all 0.2s ease;
}

#btn-clear-map:hover {
    color: #e74c3c !important; /* Üzerine gelince Kırmızı olsun */
    background-color: #fafafa !important;
}

/* Eğer bu butonlar bir grup içindeyse mobilde kaymayı zaten yapacaklardır. */
/* Ama ekstra garanti olsun diye mobilde boyutunu ayarlayalım */
@media (max-width: 768px) {
    #clear-map-btn {
        width: 32px;
        height: 32px;
    }
}


/* ======================================================= */
/* 🎨 SADECE POPUP (BİLGİ PENCERESİ) MİNİMAL AYARLARI    */
/* ======================================================= */

/* 1. KUTUCUĞU DARALT VE KÜÇÜLT */
.esri-popup__main-container {
    width: 250px !important;       /* Genişliği kıstık (Eskisi 340px civarıydı) */
    max-height: 400px !important;  /* Çok uzamasını engelle */
    border-radius: 8px !important; /* Köşeleri yumuşat */
    padding: 0 !important;
}

/* 2. BAŞLIK KISMINI İNCELT */
.esri-popup__header {
    padding: 8px 10px !important;  /* Boşlukları azalttık */
    font-size: 13px !important;    /* Yazıyı küçülttük */
    background-color: #f8f9fa;     /* Hafif gri arka plan */
    min-height: unset !important;  /* Gereksiz yüksekliği al */
}

/* Başlık yanındaki X kapatma tuşu */
.esri-popup__button {
    margin: 8px 8px 0 0 !important;
    padding: 0 !important;
}

/* 3. İÇERİK ALANI BOŞLUKLARINI AL */
.esri-popup__content {
    padding: 8px !important;       /* İçerik kenar boşluğu */
    margin: 0 !important;
}

/* --- İÇERİDEKİ BUTONLARIN TASARIMI --- */

/* Koordinat Yazısı */
.smart-menu-container div:first-child {
    font-size: 11px !important;
    color: #666;
    margin-bottom: 8px !important;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

/* Butonları Yan Yana Diz (Izgara) */
.smart-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* İki sütun yap */
    gap: 6px !important;            /* Buton arası boşluk */
}

/* Butonların Kendisi */
.smart-btn {
    display: flex !important;
    flex-direction: column;         /* İkon üstte, yazı altta olsun */
    align-items: center;
    justify-content: center;
    
    padding: 8px 4px !important;    /* İç boşluk */
    font-size: 11px !important;     /* Yazı boyutu */
    
    background: #fff;
    border: 1px solid #ddd;
    color: #444;
    border-radius: 6px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

/* Butonların Üzerine Gelince */
.smart-btn:hover {
    background: #f0f4f8;
    border-color: #3498db;
    color: #3498db;
}

/* İkon Boyutu */
.smart-btn i {
    font-size: 14px !important;
    margin-right: 0 !important;     /* Yan boşluğu sıfırla */
    margin-bottom: 4px !important;  /* Yazı ile arayı aç */
    display: block !important;
}

/* --- RENKLENDİRME (İsteğe Bağlı - Hafif Renkler) --- */
/* Adres Butonu İkonu */
.sb-adres i { color: #e74c3c; } 
/* Parsel Butonu İkonu */
.sb-parsel i { color: #9b59b6; }
/* Google Butonu İkonu */
.sb-google i { color: #2ecc71; }
/* Kopyala Butonu İkonu */
.sb-copy i { color: #34495e; }



/* ======================================================= */
/* 💎 YENİ KART TASARIMI (GLASS DOCK STYLE)              */
/* ======================================================= */

.glass-dock {
    display: none; /* Başlangıçta gizli */
    position: absolute;
    bottom: -300px; /* Altta gizli başlar */
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(20px); /* Buzlu cam efekti */
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    padding: 20px;
    z-index: 9999;
    transition: bottom 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.glass-dock.active {
    bottom: 60px; /* Aktif olunca yukarı çıkar */
}

.glass-dock.wide-dock {
    width: fit-content !important;
    max-width: 90% !important;
}

/* İçerik Düzeni */
.dock-handle {
    width: 40px; height: 5px; background: #e5e5ea;
    border-radius: 10px; margin: -10px auto 20px auto;
}
.dock-close-btn {
    position: absolute; top: 15px; right: 15px;
    width: 30px; height: 30px; border-radius: 50%;
    background: #f2f2f7; border: none; color: #8e8e93; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.dock-row { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.dock-icon-box {
    width: 48px; height: 48px;
    background: #eaf2ff; color: #007aff;
    border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.dock-info-text { display: flex; flex-direction: column; }
.dock-info-text .label { font-size: 11px; color: #8e8e93; font-weight: 600; text-transform: uppercase; }
.dock-info-text .value { font-size: 16px; font-weight: 700; color: #1c1c1e; font-family: monospace; }

/* Butonlar */
.dock-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dock-card-btn {
    background: none; border: none; cursor: pointer; padding: 0;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.dock-card-btn span { font-size: 12px; font-weight: 500; color: #333; }
.icon-circle {
    width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: white; transition: transform 0.2s;
}
.dock-card-btn:hover .icon-circle { transform: scale(1.1); }

/* Renkler */
.blue { background: #007aff; } 
.purple { background: #af52de; }
.green { background: #34c759; } 
.gray { background: #8e8e93; }

/* Detay Ekranı */
.result-card { text-align: center; animation: fadeIn 0.3s ease; }
.big-title { font-size: 24px; font-weight: 800; color: #1c1c1e; margin: 5px 0; }
.sub-title { font-size: 14px; color: #3a3a3c; }
.back-pill {
    background: #f2f2f7; color: #007aff; border: none; padding: 6px 15px;
    border-radius: 20px; font-size: 12px; font-weight: 600; margin-bottom: 15px; cursor: pointer;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }




/* ======================================================= */
/* 💎 FİNAL ALT BİLGİ DÜZENİ (ŞEFFAF VE GENİŞ AÇILI)     */
/* ======================================================= */

/* 1. ANA KAPLAYICI */
.bottom-info-container {
    position: absolute;
    bottom: 25px; 
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 40;
    pointer-events: none;
}

/* 3. KAYAN YAZI (EBEVEYN DİV'DEN KURTARILMIŞ HALİ) */
.marquee-stage {
    width: 85vw; /* % yerine vw kullandık! Artık ekranın sağından ve solundan pay bırakarak tüm ekranı kullanacak */
    max-width: 1200px;
    height: 24px;
    background: transparent !important;
    display: flex;
    align-items: center;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    pointer-events: none;
}

.marquee-content {
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.9);
    white-space: nowrap;
    padding-left: 100%; /* Bu kısım aynı kalıyor */
    animation: scroll-text 40s linear infinite; 
}

@keyframes scroll-text {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* 3. ORTA BİLGİ ÇUBUĞU (DAHA ŞEFFAF) */
.info-bar-row {
    /* 🛠️ ŞEFFAFLIK AYARI: 0.85 -> 0.50 (Daha saydam) */
    background: rgba(255, 255, 255, 0.50); 
    
    /* Bulanıklığı artırdık ki arkadaki harita yazıyı bozmasın */
    backdrop-filter: blur(20px); 
    -webkit-backdrop-filter: blur(20px);
    
    /* Kenarlığı da incelttik */
    border: 1px solid rgba(255, 255, 255, 0.4);
    
    border-radius: 50px; 
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    
    height: 34px; /* Biraz daraltıldı */
    padding: 0 15px; /* Padding azaltıldı */
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Boşluk azaltıldı */
    position: relative; 
    pointer-events: auto;
    width: auto !important;
    min-width: 250px;
}

/* 4. SOL KAPSÜL (MAHALLE) - BU DA ŞEFFAF OLSUN */
.mouse-widget-style {
    /* Burayı da şeffaflaştırdık */
    background: rgba(255, 255, 255, 0.50); 
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    
    padding: 0 15px;
    height: 44px;
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    
    display: flex;
    align-items: center;
    white-space: nowrap;
}

/* --- Diğer ayarlar aynı --- */
.pos-left {
    position: absolute;
    left: -45vw;
    bottom: 0;
    display: flex;
    align-items: center;
}

@media (min-width: 1200px) { .pos-left { left: -38vw; } }
@media (max-width: 1199px) { .pos-left { left: -30vw; } }
@media (max-width: 768px) { 
    .pos-left { display: none; } 
    .marquee-stage { display: none; }
    .bottom-info-container { bottom: 125px !important; } /* 90px -> 120px yaptık */
}

.info-widget {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #1a252f; /* Yazılar koyu kalsın ki okunsun */
    font-size: 12px;
    font-weight: 800; /* Biraz daha kalın yaptık */
    font-family: 'Segoe UI', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-widget i { color: #007aff; font-size: 15px; }

#coords-x, #coords-y {
    font-variant-numeric: tabular-nums;
    font-family: monospace;
    font-size: 13px;
    color: #1a252f;
}

.pos-right {
    border-left: 1px solid rgba(0,0,0,0.1);
    padding-left: 15px;
}

#mouse-info-text { font-weight: 700; color: #1a252f; }

@media (max-width: 768px) {
    #capsule-left { display: none; } 
    .marquee-stage { display: none; } 
    .bottom-info-container { bottom: 40px !important; } 

    /* 🔍 MOBİLDE KOORDİNATLARI VE ARADAKİ ÇİZGİLERİ GİZLE */
    #coords-y, 
    #coords-x, 
    .min-sep, 
    .min-divider {
        display: none !important;
    }
}


/* ======================================================= */
/* 💎 MİNİMAL ALT BİLGİ (GHOST STRIP TASARIMI)           */
/* ======================================================= */

/* Orta Çubuğun Yeni Hali */
.minimal-bar {
    /* Çok hafif, neredeyse görünmez zemin */
    background: rgba(255, 255, 255, 0.25) !important; 
    
    /* Arkası bulanık olsun ki rakamlar okunsun */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    /* Çok ince, zarif kenarlık */
    border: 1px solid rgba(255, 255, 255, 0.2);
    
    /* Daha ince yükseklik (Eskisi 44px idi) */
    height: 32px !important; 
    padding: 0 20px !important;
    
    border-radius: 20px; /* Daha küçük oval */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); /* Gölgeyi azalttık */
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    
    pointer-events: auto;
    min-width: 200px;
}

/* Rakamlar (Monospace font ile hizalı) */
.min-text {
    font-family: 'Consolas', 'Monaco', monospace; /* Kod fontu gibi */
    font-size: 11px;
    font-weight: 600;
    color: #34495e; /* Koyu gri/lacivert */
    letter-spacing: -0.5px;
}

/* Araya konan virgül */
.min-sep {
    color: #bdc3c7;
    margin: 0 2px;
}

/* "Ölçek:" yazısı (Çok silik) */
.min-label {
    font-size: 10px;
    font-weight: 600;
    color: #95a5a6; /* Gri */
    text-transform: uppercase;
    margin-right: 2px;
}

/* Dikey Ayıraç Çizgisi */
.min-divider {
    width: 1px;
    height: 12px;
    background: rgba(0, 0, 0, 0.15); /* Hafif çizgi */
    margin: 0 5px;
}

/* Hover Efekti: Mouse üzerine gelince belirginleşsin */
.minimal-bar:hover {
    background: rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}


/* ======================================================= */
/* 💎 FİNAL VE GARANTİ: TEMİZ ALT BİLGİ TASARIMI         */
/* ======================================================= */

/* 1. ANA KAPLAYICI */
.bottom-info-container {
    position: absolute;
    bottom: 25px; 
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center; /* Ortala */
    gap: 5px;            /* Yazı ile şerit arası boşluk */
    z-index: 40;
    pointer-events: none; /* Boşluğa tıklanınca harita çalışsın */
}

/* 2. SOLDAKİ MAHALLE KUTUSU */
#capsule-left {
    position: absolute;
    left: 20px;
    bottom: 0;
    
    /* Beyaz Buzlu Cam */
    background: rgba(255, 255, 255, 0.60); 
    backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 30px;
    height: 40px;
    padding: 0 20px;
    
    display: flex;
    align-items: center;
    pointer-events: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.info-widget { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.info-widget i { color: #007aff; }




/* 4. MİNİMAL ŞERİT (ORTADAKİ RAKAMLAR) */
.minimal-bar-row {
    /* Çok hafif şeffaf zemin */
    background: rgba(255, 255, 255, 0.20) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    
    height: 28px; /* İncecik */
    padding: 0 12px;
    border-radius: 20px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    pointer-events: auto;
    transition: 0.3s;
}

/* Mouse üzerine gelince belirginleşsin */
.minimal-bar-row:hover {
    background: rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Rakam Stilleri */
.min-text {
    font-family: monospace;
    font-size: 12px;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: -0.5px;
}
.min-sep { color: #ccc; margin: 0 2px; }
.min-label { font-size: 10px; color: #7f8c8d; font-weight: 600; text-transform: uppercase; }
.min-divider { width: 1px; height: 12px; background: rgba(0,0,0,0.2); margin: 0 5px; }

/* 📱 MOBİL UYUM */
@media (max-width: 768px) {
    #capsule-left { display: none; } /* Mobilde mahalleyi gizle */
    .marquee-stage { display: none; } /* Mobilde kayan yazıyı gizle */
    .bottom-info-container { bottom: 90px; }
}

.glass-dock.active {
    bottom: 80px !important; /* Panel açılınca alttan 60px yukarıda dursun */
}


/* ======================================================= */
/* 🔍 WEB (MASAÜSTÜ) ARAMA ÇUBUĞU AYARLARI                 */
/* ======================================================= */
#smart-search-wrapper {
    position: absolute;
    transition: left 0.3s ease; /* Menü açılıp kapanırken akıcı kayma için */
    margin-left: 50px !important; /* Web için eski orijinal konumlandırma (Sol butondan pay bırakır) */
}

.smart-search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid #eee;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    width: 320px; /* Masaüstü orijinal genişliği */
    height: 40px;
    padding: 0 15px;
}

.smart-search-box .search-icon {
    color: #3498db;
    font-size: 16px;
    margin-right: 10px;
}

#smart-search-input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #2c3e50;
    font-weight: 600;
}

#smart-search-input::placeholder {
    color: #95a5a6;
    font-weight: 500;
}

#smart-search-clear {
    background: transparent;
    border: none;
    color: #95a5a6;
    cursor: pointer;
    font-size: 16px;
    margin-left: 5px;
    transition: color 0.2s;
}

#smart-search-clear:hover {
    color: #e74c3c;
}

.smart-search-dropdown {
    position: absolute;
    top: 50px;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    max-height: 350px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 5px 0;
    border: 1px solid #f0f0f0;
}

.smart-result-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-bottom: 1px solid #f9f9f9;
    transition: background 0.2s;
}

.smart-result-item:last-child {
    border-bottom: none;
}

.smart-result-item:hover {
    background: #f0f8ff;
}

.smart-result-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    flex-shrink: 0;
}

.icon-parsel { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.icon-adres { background: linear-gradient(135deg, #e67e22, #d35400); }
.icon-yer { background: linear-gradient(135deg, #2ecc71, #27ae60); }

.smart-result-text {
    display: flex;
    flex-direction: column;
}

.smart-result-title {
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
}

.smart-result-subtitle {
    font-size: 11px;
    color: #7f8c8d;
}

/* Mobil Uyumluluk - Arama Çubuğu */
@media (max-width: 768px) {
    /* ======================================================= */
    /* 📱 SADECE MOBİL ARAMA ÇUBUĞU AYARLARI                   */
    /* ======================================================= */
    #smart-search-wrapper {
        width: 60vw !important; 
        max-width: 220px !important; /* Sağdaki butonlara çarpmaması için sınır */
        
        left: 65px !important; /* Sol menü tuşunun hemen yanına çeker */
        margin-left: 0 !important; /* Masaüstündeki 50px'lik kaymayı mobilde sıfırlar */
        right: auto !important; 
    }
    
    .smart-search-box {
        width: 100%;
        box-sizing: border-box !important; 
    }
    
    /* Mobil menü açıldığında ekran dar olduğu için arama çubuğunu gizleyen mevcut kuralınız */
    body.menu-acik #smart-search-wrapper {
        opacity: 0 !important;
        pointer-events: none !important;
    }
}



/* ======================================================= */
/* 🔍 ARAMA SONUÇLARI İÇİN ÖZEL İKON RENKLERİ              */
/* ======================================================= */
.icon-ilce    { background: linear-gradient(135deg, #34495e, #2c3e50); } /* Koyu Lacivert (Resmi) */
.icon-mahalle { background: linear-gradient(135deg, #3498db, #2980b9); } /* Mavi (Ferah) */
.icon-sokak   { background: linear-gradient(135deg, #f39c12, #d35400); } /* Turuncu (Yol/Sokak) */
.icon-bina    { background: linear-gradient(135deg, #e74c3c, #c0392b); } /* Kırmızı (Yapı/Bina) */
.icon-parsel  { background: linear-gradient(135deg, #9b59b6, #8e44ad); } /* Mor (Mülkiyet) */



/* ======================================================= */
/* 🗺️ SOL ALT: HARİTA ALTLIĞI BUTONU TASARIMI              */
/* ======================================================= */

#basemap-ui-wrapper {
    position: absolute;
    bottom: 80px; /* Sol alt kapsülün üstü */
    left: 20px;
    z-index: 2000;
    pointer-events: none;
    /* YENİ: Akıcı kayma animasyonu */
    transition: left 0.3s ease !important; 
}

/* YENİ: Sol panel açıldığında butonu sağa it */
body.menu-acik #basemap-ui-wrapper {
    left: 380px !important; /* Panel genişliği (360px) + 20px boşluk */
}

#basemap-switch-box {
    display: flex;
    align-items: center;
    cursor: pointer;
    pointer-events: auto; /* Tıklanabilir olmasını sağlar */
}

.bm-main-btn {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    border: 2px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background-color: white; 
}

#basemap-switch-box:hover .bm-main-btn {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Kayarak çıkan "Altlık Değiştir" yazısı */
.bm-slide-btn {
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 15px 10px 25px; 
    margin-left: -15px; /* Ana butonun arkasına gizlenmesi için */
    border-radius: 0 12px 12px 0;
    font-family: 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
    box-shadow: 2px 4px 10px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.5);
    border-left: none;
    
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#basemap-switch-box:hover .bm-slide-btn {
    opacity: 1;
    transform: translateX(0);
}

/* ======================================================= */
/* ⏱️ ORTA ALT: ZAMAN ÇİZELGESİ (TIMELINE) TASARIMI        */
/* ======================================================= */

#timeline-wrapper {
    display: none; 
    position: absolute;
    bottom: 80px; 
    left: 50%;
    transform: translateX(-50%); 
    
    width: 45vw; 
    max-width: 600px;
    min-width: 320px;
    z-index: 2000;
    
    /* ŞEFFAFLIK BURADA: %80'den %20'ye düşürdük */
    background: rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(15px); /* Arkadaki haritayı bulanıklaştırarak yazıyı öne çıkarır */
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4); /* Kenarlıklar daha ince ve zarif */
    border-radius: 16px;
    /* YENİ PADDING DEĞERİ (İçeriği yukarı iter, kutu sabit kalır) */
    padding: 15px 30px 25px 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Gölgeyi hafiflettik */
    
    animation: slideUpCenter 0.3s ease;
}

/* Merkezde yukarı doğru açılma efekti */
@keyframes slideUpCenter {
    from { opacity: 0; transform: translate(-50%, 15px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

.timeline-line {
    position: absolute;
    top: 26px; /* Çizgiyi de noktalarla beraber yukarı çektik */
    left: 35px;
    right: 35px;
    height: 3px; 
    background: rgba(0, 0, 0, 0.15); 
    border-radius: 2px;
    z-index: 1;
}

.timeline-nodes {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.t-node {
    width: 16px;
    height: 16px;
    background: white;
    border: 4px solid #bdc3c7;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.t-year {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 800;
    color: #2c3e50; /* Açık gri yerine çok daha net ve koyu bir lacivert/gri */
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9); /* OKUNABİLİRLİK SİHRİ: Arkasına beyaz parlama verir */
    transition: color 0.2s ease;
}

/* Seçili Olan Nokta */
.t-node.active {
    background: #3498db;
    border-color: #3498db;
    transform: scale(1.4);
    box-shadow: 0 0 12px rgba(52, 152, 219, 0.6);
}

/* Seçili Olan Noktanın Yazısı */
.t-node.active .t-year {
    color: #007aff; /* iOS Mavisi */
    text-shadow: 0 1px 4px rgba(255, 255, 255, 1); /* Mavinin etrafı daha çok parlasın */
    font-size: 9px; 
    margin-top: 2px;
}

.t-node:hover:not(.active) {
    border-color: #3498db;
    transform: scale(1.2);
}



/* ======================================================= */
/* ⏱️ ZAMAN ÇİZELGESİ AÇMA / KAPATMA BUTONLARI             */
/* ======================================================= */

/* Timeline İçindeki X (Kapat) Butonu - Rozet Tasarımı */
#btn-close-timeline {
    position: absolute;
    top: -12px;  /* Kutunun üstünden dışarı taşır */
    right: -12px; /* Kutunun sağından dışarı taşır */
    font-size: 14px;
    color: white;
    background: #e74c3c; /* Şık bir kırmızı */
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4); /* Kırmızı parlama efekti */
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

#btn-close-timeline:hover {
    background: #c0392b; /* Üzerine gelince biraz daha koyu kırmızı */
    transform: scale(1.1); /* Tıklanma hissi için büyür */
}

/* Sol Alttaki Mini Zaman (Geri Açma) Butonu */
.bm-mini-btn {
    pointer-events: auto; /* KİLİT ÇÖZÜMÜ: Artık tıklanabilir! */
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c3e50;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    margin-bottom: 12px; 
    margin-left: 6px;    
}

.bm-mini-btn:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: scale(1.1);
}




/* ======================================================= */
/* ⏱️ ZAMAN ÇİZELGESİ (TIMELINE) GÜNCELLENMİŞ YAPI         */
/* ======================================================= */

#timeline-wrapper {
    display: none; 
    position: absolute;
    bottom: 80px; 
    left: 50%;
    transform: translateX(-50%); 
    
    /* Genişliği artırdık ki buton gelince yıllar sıkışmasın */
    width: 60vw; 
    max-width: 800px;
    min-width: 380px;
    z-index: 2000;
    
    background: rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4); 
    border-radius: 16px;
    padding: 15px 30px 25px 25px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    
    animation: slideUpCenter 0.3s ease;
}

.timeline-container-inner {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 15px; /* Elemanlar arası boşluk */
    position: relative;
}

/* Yılların Sağlıklı Dağılması İçin */
.timeline-nodes {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

/* Çizgi, sadece yılların olduğu kısmın altından geçecek şekilde ayarlandı */
.timeline-line {
    position: absolute;
    top: 22px; 
    left: 105px; /* Buton ve ayırıcıdan sonra başlar */
    right: 0px;
    height: 3px; 
    background: rgba(0, 0, 0, 0.15); 
    border-radius: 2px;
    z-index: 1;
}

/* Ayırıcı Dikey Çizgi */
.timeline-divider {
    width: 1px;
    height: 35px;
    background: rgba(0, 0, 0, 0.15);
    margin: 0 5px;
}

/* Kıyasla Butonu (Timeline İçinde) */
.timeline-swipe-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #2c3e50;
    min-width: 65px;
    padding: 5px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.timeline-swipe-btn i {
    font-size: 18px;
    margin-bottom: 4px;
}

.timeline-swipe-btn span {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-swipe-btn:hover {
    color: #3498db;
    background: rgba(255,255,255,0.4);
}

/* ======================================================= */
/* 👁️ ÜST ORTA: KIYASLAMA (SWIPE) KAPSÜL PANELI            */
/* ======================================================= */

#swipe-panel-wrapper {
    position: absolute;
    top: 90px; /* Arama çubuğunun biraz altında */
    left: 50%;
    transform: translateX(-50%);
    z-index: 2500;
}

#swipe-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 40px; /* Tam yuvarlak hap şekli */
    padding: 6px 6px 6px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.swipe-select-box select {
    background: transparent;
    border: none;
    font-family: 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #2c3e50;
    cursor: pointer;
    outline: none;
    appearance: none; 
    text-align: center;
    padding-right: 10px;
}

.swipe-select-box select option {
    background: white;
    color: #333;
}

#btn-swap-swipe {
    background: rgba(0, 122, 255, 0.1);
    border: none;
    color: #007aff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#btn-swap-swipe:hover {
    background: #007aff;
    color: white;
    transform: rotate(180deg);
}

#btn-close-swipe {
    background: #e74c3c;
    border: none;
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#btn-close-swipe:hover {
    background: #c0392b;
    transform: scale(1.1);
}




/* ======================================================= */
/* 🎨 ARCGIS POPUP GLASSMORPHISM (CALCITE SHADOW DOM İÇİN) */
/* ======================================================= */

/* 1. Calcite (Shadow DOM) Renk Değişkenlerini Şeffaf Yapıyoruz */
.esri-popup {
    --calcite-color-background: transparent !important;
    --calcite-color-foreground-1: transparent !important;
    --calcite-color-foreground-2: transparent !important;
    --calcite-color-foreground-3: transparent !important;
    --calcite-color-text-1: #1c1c1e !important; 
    --calcite-color-text-2: #555555 !important;
    --calcite-panel-background: transparent !important;
    --calcite-panel-background-color: transparent !important;
}

/* 2. Ana Kutuya Buzlu Cam (Glass) Efektini Veriyoruz */
.esri-view .esri-popup__main-container {
    background: rgba(255, 255, 255, 0.70) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-radius: 20px !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
    overflow: hidden !important;
}

/* 3. İçerideki Tüm Widget'ları ve Panelleri Zorla Şeffaf Yap */
.esri-view .esri-popup__main-container .esri-widget,
.esri-view .esri-popup__main-container calcite-panel {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

/* 4. Başlık Çizgisini Gizle ve Yazıyı Şıklaştır */
.esri-popup__header {
    background: transparent !important;
    border-bottom: none !important;
    padding: 15px 15px 5px 15px !important;
}
.esri-popup__header-title {
    font-weight: 800 !important;
    font-size: 16px !important;
}

/* 5. Gıcık Kapatma ve Sabitleme (X) Butonları */
.esri-popup__button {
    background: rgba(0, 0, 0, 0.05) !important;
    border-radius: 50% !important;
    width: 30px !important;
    height: 30px !important;
    margin: 12px 12px 0 0 !important;
    color: #555 !important;
}
.esri-popup__button:hover {
    background: rgba(0, 0, 0, 0.15) !important;
}

/* Dock ve Aksiyon Butonlarını Tamamen Gizle */
.esri-popup__button--dock, 
calcite-action[title="Dock"], 
calcite-action[text="Dock"],
.esri-popup__footer,
.esri-popup__actions {
    display: none !important;
}

/* 6. Alt İşaretçi Oku (Pointer) */
.esri-popup__pointer-direction {
    background: rgba(255, 255, 255, 0.70) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: none !important;
}

/* 7. JS İçinden Gelen Kartların İç Çizgileri */
.esri-popup__content {
    padding: 0 15px 15px 15px !important;
}
.esri-popup__content .result-card div {
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
}
.esri-popup__content .result-card div:last-child {
    border-bottom: none !important;
}

/* ======================================================= */
/* 📘 SOL PANEL: YENİ KILAVUZ BUTONU TASARIMI              */
/* ======================================================= */

.sidebar-guide-btn {
    display: flex;
    align-items: center;
    width: calc(100% - 20px); /* Kenarlardan 10'ar px boşluk */
    margin: 5px 10px 10px 10px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #1abc9c, #16a085); /* Turkuaz/Zümrüt Yeşili */
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(26, 188, 156, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: left;
}

.sidebar-guide-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(26, 188, 156, 0.4);
    background: linear-gradient(135deg, #16a085, #1abc9c);
}

.sidebar-guide-btn .guide-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-right: 12px;
    flex-shrink: 0;
}

.sidebar-guide-btn .guide-text {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.sidebar-guide-btn .guide-text strong {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.sidebar-guide-btn .guide-text span {
    font-size: 10px;
    opacity: 0.9;
    font-weight: 500;
}

.sidebar-guide-btn .arrow-right {
    font-size: 14px;
    opacity: 0.8;
    transition: transform 0.2s;
}

.sidebar-guide-btn:hover .arrow-right {
    transform: translateX(4px); /* Üzerine gelince ok sağa kaysın */
}

/* Kılavuz Modal Kapatma Butonu Hover Efekti */
#btn-close-guide:hover {
    background: rgba(231, 76, 60, 0.9) !important; /* Üzerine gelince kırmızı olsun */
    transform: scale(1.1);
}

   /* =======================================================
   🗺️ YENİ NESİL TAM CAM (GLASSMORPHISM) ALTLIK MENÜSÜ 
   ======================================================= */

#basemap-switch-box {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    margin-bottom: 20px;
    width: 55px; /* YENİ: Kutu sadece ana simge kadar yer kaplar. Sağdaki hayalet alanı yok eder. */
    height: 55px;
}

/* --- Ana Buton --- */
.bm-main-btn {
    width: 55px;
    height: 55px;
    border-radius: 16px; /* Tatlı bir kavis */
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background-color: white; 
    position: relative;
}

#basemap-switch-box:hover .bm-main-btn {
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}

/* --- YENİ: Ekrana Taşmayan, Sağa Doğru Büyüyen Kapsül Panel --- */
.bm-slide-panel {
    position: absolute !important; /* YENİ: Paneli kutu genişliği hesabından çıkarır */
    top: 50% !important; /* Dikeyde ortalar */
    left: 65px !important; /* Ana butonun hemen yanından (55px + 10px boşluk) başlatır */
    
    display: flex !important;
    gap: 12px !important; 
    
    background: rgba(255, 255, 255, 0.65) !important; 
    backdrop-filter: blur(20px) saturate(120%) !important; 
    -webkit-backdrop-filter: blur(20px) saturate(120%) !important;
    
    border: 1px solid rgba(255, 255, 255, 0.8) !important; 
    border-radius: 20px !important; 
    box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important; 

    padding: 10px 12px !important; 
    
    opacity: 0;
    /* YENİ: translateY(-50%) eklendi ki dikey ortalama bozulmasın */
    transform: translateY(-50%) scale(0.9) !important; 
    transform-origin: left center !important; 
    transition: all 0.35s cubic-bezier(0.19, 1, 0.22, 1) !important; 
    z-index: 1; 
    pointer-events: none; 
}

/* Paneli Açan Animasyon (Hover VEYA Mobil Tıklama) */
#basemap-switch-box:hover .bm-slide-panel,
#basemap-switch-box.mobil-panel-acik .bm-slide-panel {
    opacity: 1;
    transform: translateY(-50%) translateX(5px) scale(1) !important; 
    pointer-events: auto;
}

/* --- Panel İçindeki Seçenek Kartları --- */
.bm-option-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px; /* Resim ile yazıyı biraz yaklaştırdık */
    transition: transform 0.2s;
}

.bm-option-item:hover {
    transform: translateY(-3px); /* Hover olunca hafif havaya kalkar */
}

/* --- İçerdeki Harita Kareleri --- */
.bm-preview-box {
    width: 50px; /* Daha kibar durması için 55'ten 50'ye çektik */
    height: 50px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    border: 2px solid white; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.15); 
    position: relative;
    transition: all 0.2s ease;
}

/* Aktif Harita Vurgusu */
.bm-option-item.active .bm-preview-box {
    border-color: #007aff; 
    box-shadow: 0 0 12px rgba(0, 122, 255, 0.3);
    transform: scale(1.08); /* Tatlı detay: Seçili olan harita panelde 1 tık büyük durur */
}

.bm-option-item.active .bm-label {
    color: #007aff;
    background: rgba(0, 122, 255, 0.1); 
    border-color: rgba(0, 122, 255, 0.2);
}

/* --- İsim Etiketleri --- */
.bm-label {
    font-family: 'Roboto', 'Segoe UI', sans-serif; 
    font-size: 10px; /* Kibar boyut */
    font-weight: 700; 
    color: #1d1d1f; 
    text-transform: uppercase;
    letter-spacing: 0.5px; 
    transition: all 0.2s;
    
    background: rgba(255, 255, 255, 0.85); 
    padding: 3px 8px; 
    border-radius: 10px; 
    border: 1px solid rgba(255, 255, 255, 0.9); 
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* --- Ana Butonun Üzerinde Çıkan "Altlık Değiştir" Etiketi --- */
.bm-main-label {
    position: absolute;
    top: -10px; 
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    transform-origin: bottom center;
    white-space: nowrap;
    
    font-family: 'Roboto', 'Segoe UI', sans-serif; 
    font-size: 11px; 
    font-weight: 800; 
    color: #1d1d1f; 
    text-transform: uppercase;
    letter-spacing: 0.5px; 
    
    background: rgba(255, 255, 255, 0.9); 
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    padding: 4px 10px; 
    border-radius: 12px; 
    border: 1px solid rgba(255, 255, 255, 0.8); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 20;
}

/* Üstteki Yazıyı Gösteren Animasyon (Hover VEYA Mobil Tıklama) */
#basemap-switch-box:hover .bm-main-label,
#basemap-switch-box.mobil-panel-acik .bm-main-label {
    opacity: 1;
    visibility: visible;
    top: -32px; 
    transform: translateX(-50%) scale(1);
}

/* YENİ: Buton ile Menü Arasındaki Görünmez Farenin Düşmesini Engelleyen Köprü */
.bm-slide-panel::before {
    content: '';
    position: absolute;
    top: -20px;
    bottom: -20px;
    left: -20px; /* O aradaki boşluğu görünmez şekilde kaplar */
    width: 20px;
    background: transparent;
}



   @media screen and (max-width: 768px) {
    
        /* 1. ÖLÇEK BARI: EN ALTA, EKRANIN GÜVENLİ BÖLGESİNE YAPIŞTIRILDI */
        .bottom-info-container { 
            /* Altta menü barı varsa onun üstünde kalır, yoksa en dibe iner */
            bottom: calc(0px + env(safe-area-inset-bottom)) !important; 
        }
        #capsule-left { display: none; } 
        .marquee-stage { display: none; } 
        #coords-y, #coords-x, .min-sep, .min-divider { display: none !important; }

        /* 2. ALTLIK DEĞİŞTİRME KUTUSU VE MİNİ ZAMAN TÜNELİ BUTONU */
        #basemap-ui-wrapper {
            /* Ölçek barının üzerinde duracak şekilde güvenli mesafeye ayarlandı */
            bottom: calc(110px + env(safe-area-inset-bottom)) !important; 
            left: 15px !important; 
            z-index: 2500 !important;
        }
        .bm-mini-btn {
            margin-left: 8px !important; 
            margin-bottom: 10px !important; 
        }
        #basemap-switch-box {
            bottom: auto !important; 
            top: auto !important;
            margin-bottom: 0 !important; 
        }

        /* 3. ZAMAN TÜNELİ ANA KUTUSU */
        #timeline-wrapper {
            /* Altlığın da üzerine çıkması için mesafe daha da artırıldı */
            bottom: calc(200px + env(safe-area-inset-bottom)) !important; 
            top: auto !important;
            left: 50% !important;
            transform: translateX(-50%) !important;
            width: 300px !important; 
            min-width: 280px !important; 
            max-width: 95vw !important; 
            box-sizing: border-box !important; 
            padding: 12px 10px 20px 10px !important; 
            background: rgba(255, 255, 255, 0.40) !important; 
            backdrop-filter: blur(10px) !important;
            -webkit-backdrop-filter: blur(10px) !important;
            border-radius: 16px !important;
            border: 1px solid rgba(255, 255, 255, 0.4) !important;
            z-index: 3000 !important;
        }
        
        /* Zaman tüneli içindeki ufak tefek hizalamalar */
        .timeline-container-inner { gap: 8px !important; }
        .timeline-swipe-btn {
            min-width: 32px !important; width: 32px !important; height: 32px !important;
            padding: 0 !important; border-radius: 50% !important;
            background: rgba(255, 255, 255, 0.7) !important;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
            justify-content: center !important;
        }
        .timeline-swipe-btn i { font-size: 14px !important; margin-bottom: 0 !important; }
        .timeline-swipe-btn span { display: none !important; } 
        .timeline-divider { height: 25px !important; margin: 0 4px !important; }
        .timeline-line { top: 16px !important; left: 60px !important; right: 0 !important; }
        #timeline-wrapper .t-node {
            width: 14px !important; height: 14px !important; border-width: 3px !important; 
            margin: 0 !important; background: #fff !important; color: #333 !important;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
        }
        #timeline-wrapper .t-node.active { background: #3498db !important; transform: scale(1.3) !important; }
        #timeline-wrapper .t-year { font-size: 10px !important; top: 18px !important; }
        #timeline-wrapper .t-node.active .t-year { color: #fff !important; font-size: 9px !important; margin-top: 1px !important; }
        #btn-close-timeline { top: -10px !important; right: -10px !important; width: 24px !important; height: 24px !important; font-size: 12px !important; }

        /* 4. HOME VE ZOOM TUŞLARI KUTUSU */
        .esri-ui-bottom-right {
            /* Zaman tüneli ve panellerin tam üstünde kalmasını garanti ediyoruz */
            bottom: calc(160px + env(safe-area-inset-bottom)) !important; 
        }

        #capsule-left { display: none; } 
        .marquee-stage { display: none; } 
        .bottom-info-container { bottom: 125px !important; } 

        /* 🔍 MOBİLDE KOORDİNATLARI VE ARADAKİ ÇİZGİLERİ GİZLE */
        #coords-y, 
        #coords-x, 
        .min-sep, 
        .min-divider {
            display: none !important;
        }
    }


/* ======================================================= */
/* 📱 MOBİL İÇİN DOCK (ALT PANEL) KOMPAKT KÜÇÜLTME AYARI   */
/* ======================================================= */

@media screen and (max-width: 768px) {
    
    /* 1. Ana Dock Kutusunu Daralt ve İç Boşlukları Kıs */
    .glass-dock {
        width: 70% !important; /* Kenarlardan biraz daha boşluk bırak */
        padding: 12px 10px !important; /* Eski 20px padding'i yarı yarıya düşürdük */
        border-radius: 18px !important; /* Köşeleri biraz daha keskinleştir */
    }

    /* 2. Dock'un Açık Konumunu Alt Şeritlere Göre Ayarla */
    .glass-dock.active {
        bottom: 25px !important; /* Alt şeritler mobilde gizli olduğu için ekranın altına oturabilir */
    }

    /* 3. Üstteki Gri Çekme Çubuğu (Handle) ve Çarpı Tuşu */
    .dock-handle {
        margin: -5px auto 8px auto !important;
        width: 35px !important;
        height: 4px !important;
    }
    .dock-close-btn {
        top: 10px !important;
        right: 10px !important;
        width: 24px !important;
        height: 24px !important;
        font-size: 12px !important;
    }

    /* 4. İlk Ekrandaki Koordinat ve İkon Alanı */
    .dock-row {
        margin-bottom: 12px !important;
        gap: 10px !important;
    }
    .dock-icon-box {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
        border-radius: 10px !important;
    }
    .dock-info-text .label { font-size: 10px !important; }
    .dock-info-text .value { font-size: 13px !important; }

    /* 5. Yuvarlak Yönlendirme Butonları (Adres, Parsel, Git vb.) */
    .dock-grid {
        gap: 4px !important; /* Butonlar arası boşluk */
    }
    .icon-circle {
        width: 36px !important; /* Butonları daha kompakt yaptık */
        height: 36px !important;
        font-size: 15px !important;
    }
    .dock-card-btn span {
        font-size: 9px !important; /* Yazıları çok hafif daha küçülttük */
        margin-top: -2px !important;
    }

    /* 6. Adres ve Parsel Detay Ekranı (Liste Görünümü) */
    .glass-dock .result-card {
        padding: 0 5px !important;
    }
    
    /* Satır aralıklarını daralt */
    .glass-dock .result-card > div {
        padding: 6px 0 !important; /* Eski 12px boşlukları yarıya indirdik */
    }
    
    /* Yazı boyutlarını kibarlaştır */
    .glass-dock .result-card span {
        font-size: 11px !important;
    }
    .glass-dock .result-card span:nth-child(2) {
        font-size: 12px !important; /* Değer kısmı çok az büyük kalsın */
    }

    /* 7. Navigasyon "Buraya Git" ve "Geri" Butonları */
    .glass-dock button[onclick*="nav-apps"] {
        padding: 8px !important;
        font-size: 12px !important;
        margin-top: 5px !important;
    }
    .back-pill {
        padding: 4px 12px !important;
        font-size: 11px !important;
        margin-bottom: 10px !important;
    }
}

/* --- SOL PANEL YENİ (FLEX) DÜZENİ --- */
#sidebar-content-panel {
    
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden !important; 
}

.panel-sticky-header {
    flex-shrink: 0; 
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #fff;
    border-bottom: 1px solid #e1e8ed;
    z-index: 10;
}

.back-btn {
    background: #f1f2f6;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    color: #2f3542;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.back-btn:hover {
    background: #dfe4ea;
}

#dynamic-list {
    flex: 1; 
    overflow-y: auto !important; 
    padding: 10px;
    padding-bottom: 30px;
}

/* --- YENİ MODÜL BAŞLIK TASARIMI --- */
.new-style-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 15px 15px 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f4f6f9 100%);
    border-bottom: 1px solid #e1e8ed;
    position: sticky;
    top: 0;
    z-index: 10;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 4px 6px -4px rgba(0,0,0,0.05);
}

.new-panel-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #2c3e50;
    letter-spacing: -0.3px;
}

.new-back-btn {
    background: transparent;
    border: none;
    color: #3498db;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    transition: all 0.2s ease;
    width: fit-content;
}

.new-back-btn:hover {
    color: #2980b9;
    transform: translateX(-3px);
}

/* --- ŞARJ İSTASYONLARI FİLTRE VE SIRALAMA ÇUBUĞU --- */
.sarj-filter-bar {
    display: flex;
    gap: 8px;
    padding: 10px;
    background: #f8f9fa;
    border: 1px solid #e1e8ed;
    align-items: center;
}

.sarj-filter-select {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #dcdde1;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #2c3e50;
    background-color: #fff;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.sarj-filter-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

/* --- POPUP MINI ZOOM BUTONU --- */
.mini-zoom-btn {
    margin-top: 10px;
    padding: 6px 12px;
    background-color: #e0f2fe;
    color: #0284c7;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.mini-zoom-btn:hover {
    background-color: #bae6fd;
    color: #0369a1;
}

/* Çevremde Ne Var Butonları ve Kategori Seçimi */
.btn-dist {
    flex: 1;
    padding: 8px 4px;
    background: #f1f2f6;
    border: 1px solid #dcdde1;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-dist:hover { background: #e2e6ea; }
.btn-dist.active {
    background: #3498db;
    color: white;
    border-color: #2980b9;
    box-shadow: 0 2px 6px rgba(52,152,219,0.3);
}
.cat-select-label {
    background: #f8f9fa;
    border: 1px solid #eee;
    padding: 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}
.cat-select-label:hover { background: #eef2f5; }


