/* uydu.css - Astrovek Uydu Takip Modülü Stilleri */

:root {
    --bg-main: #0b0d17;
    --card-bg: rgba(20, 20, 40, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-primary: #fff;
    --text-secondary: #aaa;
    --accent: #00d2ff;
    --accent-hover: #3a7bd5;

    --quality-good: rgba(46, 204, 113, 0.2);
    /* Yeşilimsi */
    --quality-mid: rgba(241, 196, 15, 0.2);
    /* Sarımtırak */
    --quality-bad: rgba(230, 126, 34, 0.2);
    /* Turuncumsu */
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Override for Uydu Page */
header {
    background: rgba(10, 10, 20, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo span {
    color: var(--accent);
}

.nav-link:hover {
    text-decoration: underline !important;
    color: var(--accent) !important;
}

.uydu-main {
    display: flex;
    flex: 1;
    padding: 20px;
    gap: 20px;
    /* Sağ ve Sol panelin eşit boyda (oranda) hizalanmasını sağlar */
    align-items: stretch;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .uydu-main {
        flex-direction: column;
        height: auto;
        padding: 15px !important;
        /* Mobilde solda/sağda aynı tatlı boşluk */
        width: 100% !important;
        /* 100vw yerine 100% kullan ki taşırma olmasın */
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .uydu-left-panel {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 250px !important;
        /* Harita küçülsün ki kartlar yukarı çıksın */
        box-sizing: border-box !important;
    }

    .uydu-right-panel {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .card {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px !important;
        /* Kart içini darattık */
        overflow: hidden !important;
    }

    .table-container {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        min-width: 0 !important;
    }

    /* Tablo çok küçülüp ezilmesin, kaydırma çubuğunu tetiklesin */
    table {
        min-width: 300px !important;
        /* biraz daha küçültelim */
        white-space: nowrap !important;
        font-size: 0.75rem !important;
    }

    .countdown-timer {
        font-size: 1.8rem !important;
        letter-spacing: 1px !important;
    }
}

/* SOL PANEL - Harita */
.uydu-left-panel {
    flex: 1.2;
    /* Eski 1.5 oranı küçültüldü */
    display: flex;
    flex-direction: column;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 210, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 210, 255, 0.1);
    min-height: 400px;
    /* Minimum estetik sınır */
}

.map-container {
    flex: 1;
    width: 100%;
    background-color: #111;
    /* Yüklenirken siyah görünsün */
}

.map-legend {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(5px);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    z-index: 1000;
    /* Leaflet'in üstünde kalmalı */
}

/* SAĞ PANEL - Kontroller */
.uydu-right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* Eskiden 20px idi */
    min-width: 420px;
    /* Sıkışmayı önle */
}

/* Sağ panel scrollbarı gizleme/kibarlaştırma */
.uydu-right-panel::-webkit-scrollbar {
    width: 6px;
}

.uydu-right-panel::-webkit-scrollbar-track {
    background: transparent;
}

.uydu-right-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.control-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Search Box (Custom Dropdown) */
.search-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.search-container label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.custom-dropdown {
    position: relative;
    width: 100%;
}

.custom-dropdown input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
    transition: border 0.3s, background 0.3s;
}

.custom-dropdown input:focus {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.6);
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 15, 25, 0.95);
    border: 1px solid var(--accent);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
    backdrop-filter: blur(10px);
}

.dropdown-list.active {
    display: block;
}

.dropdown-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #dedede;
    transition: background 0.2s, color 0.2s;
}

.dropdown-item:hover {
    background: rgba(0, 210, 255, 0.2);
    color: #fff;
}

/* Geri Sayım Kutusu */
.countdown-container {
    background: radial-gradient(circle at top right, rgba(0, 210, 255, 0.1), transparent 70%),
        linear-gradient(135deg, rgba(30, 30, 50, 0.6), rgba(15, 15, 25, 0.8));
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(0, 210, 255, 0.2);
}

.countdown-timer {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    /* Sayıların zıplamasını önler */
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

.countdown-status {
    font-size: 0.9rem;
    color: #ffd700;
    margin-top: 5px;
    font-weight: bold;
}

/* Tablo Kartı */
.table-card {
    flex: 1;
    /* Kalan alanı doldur */
    display: flex;
    flex-direction: column;
}

.filters {
    display: flex;
    gap: 5px;
}

.filter-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.filter-btn.active {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    font-weight: bold;
}

/* Tablo Stilleri */
.table-container {
    flex: 1;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    max-height: 250px;
    /* Tablonun boyunu kısıtlar ve scrolla zorlar */
}

/* Scrollbar table container için */
.table-container::-webkit-scrollbar {
    width: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: transparent;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    /* Yazıları biraz ufalttık okunaklılık için */
    text-align: left;
}

thead {
    position: sticky;
    top: 0;
    background: rgba(15, 15, 25, 0.98);
    /* Şeffaflık azaltıldı table-header okunur olsun */
    z-index: 10;
}

th,
td {
    padding: 8px 6px;
    /* Boşluklar sıkıştırıldı */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    color: var(--text-secondary);
    font-weight: 600;
}

tbody tr {
    transition: background 0.2s;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.05) !important;
}

/* Tablo Satır Renkleri (Geçiş Kalitesine Göre) */
.pass-good {
    background: var(--quality-good);
}

.pass-mid {
    background: var(--quality-mid);
}

.pass-bad {
    background: var(--quality-bad);
}

/* Buton Stili (Ana projeden miras) */
button.primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border: none;
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

/* Leaflet Dark Theme Overrides */
.leaflet-container {
    background: #0b0d17;
}

.leaflet-bar a {
    background-color: rgba(20, 20, 40, 0.8) !important;
    color: #fff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.leaflet-bar a:hover {
    background-color: var(--accent) !important;
    color: #000 !important;
}

/* Yükleme Ekranı Animasyonu */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Ayarlar Butonu (Mütevazı & Şık) */
.settings-btn {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.1), rgba(0, 210, 255, 0));
    border: 1px solid rgba(0, 210, 255, 0.3);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.settings-btn:hover {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.3), rgba(0, 210, 255, 0.1));
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 210, 255, 0.2);
}

/* Pill Group - Hap Şeklinde Seçim Butonları (Ayarlar Modalı) */
.pill-group {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 30px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pill-btn {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 26px;
    transition: all 0.3s;
    user-select: none;
}

.pill-btn:hover {
    color: #fff;
}

.pill-btn.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    font-weight: bold;
    box-shadow: 0 2px 10px rgba(0, 210, 255, 0.4);
}

/* --- MODAL CSS (index.html ile Birebir) --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideIn 0.3s ease;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 200, 255, 0.15);
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: #aaa;
    position: absolute;
    top: 5px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.close-modal:hover,
.close-modal:focus {
    color: #fff;
    text-decoration: none;
    cursor: pointer;
}

/* Modaldaki Harita ve Buton Stilleri */
#loc-modal-map {
    height: 300px;
    width: 100%;
    border-radius: 10px;
    margin-top: 15px;
    background: #1a1c2c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
}

.map-search-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent), #eebb00);
    color: #0b0d17;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
    font-family: inherit;
}

.map-search-btn:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

.map-coords {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 10px;
}