/* =========================================
   1. GENEL SAYFA VE HARİTA DÜZENİ
   ========================================= */
body, html { 
    width: 100%; height: 100%; margin: 0; padding: 0; 
    overflow: hidden; background: #000; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#cesiumContainer { 
    position: absolute; 
    top: 0; left: 0; 
    width: 100%; height: 100%; 
    z-index: 0; /* En altta */
}

/* =========================================
   2. PANELLER (SOL VE SAĞ) - HİZALAMA: 10PX
   ========================================= */
#params-panel, #data-table {
    position: absolute; 
    top: 10px; /* Daha fazla harita alanı için yukarı aldık */
    background: rgba(15, 23, 42, 0.95); /* Biraz daha koyu ve opak */
    backdrop-filter: blur(10px); 
    border-radius: 8px;
    color: white; 
    z-index: 10;
    box-sizing: border-box;
    max-height: 95vh; /* Ekranın %95'ini kaplayabilsin */
    overflow-y: auto; 
    border: 1px solid #334155;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* Sol Panel (Ayarlar) */
#params-panel { 
    left: 10px; 
    width: 290px; 
    padding: 15px; 
}

/* Sağ Panel (Nav Log) */
#data-table { 
    right: 10px; 
    width: 320px; 
    padding: 15px; 
}

/* =========================================
   3. INPUT, BUTON VE ETİKETLER
   ========================================= */
.input-group { margin-bottom: 12px; }

label { 
    display: block; font-size: 10px; color: #94a3b8; 
    text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; font-weight: 600;
}

input, select { 
    width: 100%; padding: 8px; 
    background: #1e293b; border: 1px solid #334155; 
    color: white; border-radius: 4px; box-sizing: border-box; font-size: 12px;
}

button {
    width: 100%; padding: 10px; border-radius: 4px; 
    font-weight: bold; cursor: pointer; margin-top: 8px; 
    border: none; color: white; transition: all 0.2s ease; font-size: 11px;
}
button:hover { opacity: 0.9; transform: translateY(-1px); }

.btn-primary { background: #10b981; } /* Yeşil */
.btn-export { background: #0ea5e9; }  /* Mavi */
.btn-pdf { background: #8b5cf6; }     /* Mor */

/* =========================================
   4. TABLO VE LİSTELER (NAV LOG)
   ========================================= */
.nav-log-table { 
    width: 100%; border-collapse: collapse; font-size: 11px; margin-top: 5px; 
}
.nav-log-table th { 
    color: #38bdf8; text-align: left; border-bottom: 1px solid #334155; padding: 5px; 
}
.nav-log-table td { 
    padding: 6px 5px; border-bottom: 1px solid #1e293b; color: #cbd5e1; 
}

/* Görev Listesi (Library) */
.mission-item {
    padding: 8px; border-bottom: 1px solid #1e293b; cursor: pointer; 
    display: flex; justify-content: space-between; align-items: center;
}
.mission-item:hover { background: #334155; }
.scrollable-list {
    max-height: 250px; overflow-y: auto;
    scrollbar-width: thin; scrollbar-color: #334155 #0f172a;
}

/* =========================================
   5. MENU ACCORDION (AÇILIR/KAPANIR)
   ========================================= */
.menu-section { margin-bottom: 8px; border-bottom: 1px solid #334155; }
.menu-header {
    padding: 8px 0; cursor: pointer; display: flex; 
    justify-content: space-between; align-items: center; 
    font-size: 11px; font-weight: bold; color: #e2e8f0;
}
.menu-header:hover { color: #38bdf8; }
.menu-content { display: none; padding-bottom: 10px; animation: fadeIn 0.3s; }

/* =========================================
   6. SEKMELER (TABS)
   ========================================= */
.tab-header { display: flex; gap: 5px; margin-bottom: 10px; border-bottom: 1px solid #334155; padding-bottom: 5px; }
.tab-btn { 
    flex: 1; background: transparent; border: none; color: #64748b; 
    padding: 5px; cursor: pointer; font-size: 10px; font-weight: bold; 
    border-bottom: 2px solid transparent; 
}
.tab-btn.active { color: #38bdf8; border-bottom: 2px solid #38bdf8; }
.tab-content { display: none; animation: fadeIn 0.3s; }

/* =========================================
   7. HARİTA BUTONLARI (CESIUM TOOLBAR)
   ========================================= */
/* Sağ panelin (320px) + 10px boşluk = 330px. 
   Butonları bunun soluna, 340px'e koyuyoruz. */
.cesium-viewer-toolbar {
    position: absolute;
    top: 10px !important;       /* Panelle aynı hiza */
    right: 340px !important;    /* Panelin solu */
    display: flex !important;
    gap: 5px;
}

.cesium-viewer-geocoderContainer {
    position: absolute;
    top: 10px !important;
    right: 380px !important;    /* Toolbar'ın solu */
}

/* Buton Görselleri */
.cesium-button {
    background-color: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid #334155 !important;
    border-radius: 4px !important;
    width: 32px !important; height: 32px !important;
}
.cesium-button:hover { background-color: #38bdf8 !important; }

/* =========================================
   8. DİĞER BİLEŞENLER (TOAST, REKLAM, SWITCH)
   ========================================= */
/* Toast Bildirimleri */
#toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999; }
.toast {
    background: rgba(15, 23, 42, 0.95); color: #fff; padding: 10px 20px; 
    margin-bottom: 5px; border-radius: 6px; border-left: 4px solid #3b82f6; 
    font-size: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}
.toast.success { border-left-color: #10b981; }
.toast.error { border-left-color: #ef4444; }

/* Alt Reklam Barı (DÜZELTİLDİ) */
.bottom-ad-bar {
    position: absolute; 
    bottom: 0; /* BURASI BOŞTU, DÜZELTİLDİ */
    left: 50%; transform: translateX(-50%);
    width: 728px; height: 90px; 
    background: rgba(15, 23, 42, 0.8); 
    border-top: 1px solid #334155; border-radius: 8px 8px 0 0;
    z-index: 90; display: flex; align-items: center; justify-content: center;
}
.ad-tag { font-size: 8px; color: #64748b; margin-bottom: 2px; }

/* Switch Toggle */
.switch { position: relative; display: inline-block; width: 34px; height: 18px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #334155; transition: .4s; border-radius: 18px; }
.slider:before { position: absolute; content: ""; height: 12px; width: 12px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #0ea5e9; }
input:checked + .slider:before { transform: translateX(16px); }

/* Animasyonlar */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }











/* --- AKILLI ARAMA KUTUSU TASARIMI --- */
.input-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.suggestion-box {
    position: absolute;
    top: 100%; /* Kutunun tam altına yapış */
    left: 0;
    right: 0;
    background: #0f172a; /* Koyu lacivert arka plan */
    border: 1px solid #38bdf8; /* Mavi çerçeve */
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    display: none; /* Başlangıçta gizli */
}

.suggestion-item {
    padding: 10px 12px;
    font-size: 12px;
    color: #cbd5e1;
    cursor: pointer;
    border-bottom: 1px solid #1e293b;
    transition: all 0.2s;
}

.suggestion-item:hover {
    background: #38bdf8; /* Üzerine gelince mavi olsun */
    color: #000; /* Yazı siyah olsun */
}

.suggestion-item strong {
    color: #38bdf8; /* Kodlar (SAW, IST) mavi görünsün */
}

.suggestion-item:hover strong {
    color: #000;
}





/* --- FOOTER & REKLAM AYARLARI --- */

/* Footer her zaman en altta sabit kalır */
.legal-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #0f172a; /* Koyu lacivert */
    border-top: 1px solid #1e293b;
    text-align: center;
    padding: 8px 0;
    font-size: 11px;
    z-index: 2000; /* Haritanın ve her şeyin üstünde */
    color: #94a3b8;
}

.legal-footer a {
    color: #38bdf8; /* Mavi link rengi */
    text-decoration: none;
    margin: 0 8px;
    font-weight: bold;
}

.legal-footer a:hover {
    text-decoration: underline;
    color: #fff;
}

/* Sol paneldeki reklam alanı */
.sidebar-ad-area {
    margin-top: 20px;
    padding: 5px;
    background: rgba(0, 0, 0, 0.2); /* Hafif koyu zemin */
    border-radius: 6px;
    min-height: 250px; /* Reklam gelene kadar yer tutsun */
    text-align: center;
    /* Footer'ın arkasında kalmaması için alt boşluk */
    margin-bottom: 40px; 
}











/* Reklamın footer arkasında kalmasını engeller */
.sidebar-ad-area {
    margin-top: 20px;
    padding: 10px;
    background: rgba(30, 41, 59, 0.4);
    border-radius: 8px;
    min-height: 250px;
    z-index: 1; /* Altta kalması için düşük değer */
}














/* --- YASAL SAYFALAR & FOOTER --- */
.legal-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #0f172a;
    border-top: 1px solid #1e293b;
    text-align: center;
    padding: 10px 0;
    font-size: 11px;
    z-index: 2000; /* Haritanın üzerinde kalsın */
    color: #94a3b8;
}
.legal-footer a { color: #38bdf8; text-decoration: none; margin: 0 5px; cursor: pointer; }
.legal-footer a:hover { text-decoration: underline; }

/* MODAL PENCERE */
.legal-modal {
    display: none;    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90%; max-width: 600px;
    max-height: 80vh;
    background: #0f172a;
    border: 1px solid #38bdf8;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    z-index: 3000; /* En üstte */
    overflow-y: auto;
    padding: 20px;
    border-radius: 8px;
}





/* --- FEEDBACK BUTONU (KESİN ÇÖZÜM) --- */
#feedback-btn {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    
    /* KİLİT NOKTA: Boyutları sabitledik, çıldırmasını engelledik */
    width: 35px !important;  
    height: 110px !important; 
    
    background: #f59e0b;
    color: #fff;
    border: none;
    padding: 0 !important;
    font-size: 14px;
    font-weight: bold;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: -2px 0 10px rgba(0,0,0,0.5);
    transition: 0.3s;
    
    /* Dikey Yazı Ayarları */
    writing-mode: vertical-rl;
    text-orientation: mixed;
    
    /* İçindeki yazıyı tam merkeze oturtur */
    display: flex;
    align-items: center;
    justify-content: center;
}

#feedback-btn:hover {
    background: #d97706;
    width: 45px !important; /* Üzerine gelince sadece 10px sola uzar */
}
