/* СТИЛИ КАРТЫ И БОКОВЫХ ПАНЕЛЕЙ */

.app-container {
    display: flex;
    height: calc(100vh - 76px); /* Высота экрана минус шапка */
    margin-top: 76px; 
    width: 100vw;
    position: relative;
    z-index: 5;
    padding: 15px; /* ДОБАВИЛИ ОТСТУПЫ СО ВСЕХ СТОРОН */
    box-sizing: border-box;
    gap: 15px; /* ДОБАВИЛИ РАССТОЯНИЕ МЕЖДУ ПАНЕЛЯМИ И КАРТОЙ */
}

.sidebar-left, .sidebar-right {
    background-color: rgba(13, 11, 10, 0.75); 
    backdrop-filter: blur(10px); 
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: 0.3s;
    border-radius: 8px; /* СКРУГЛИЛИ УГЛЫ */
    border: 1px solid var(--border-col); /* РАМКА ВОКРУГ ВСЕЙ ПАНЕЛИ */
    overflow: hidden; /* Чтобы шапка панели не вылезала за скругления */
}

.sidebar-left { 
    width: 300px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); 
}

.sidebar-right { 
    width: 250px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.5); 
}

#map { 
    flex-grow: 1; 
    background-color: transparent; 
    z-index: 1; 
    cursor: grab; 
    border-radius: 8px; /* СКРУГЛИЛИ УГЛЫ КАРТЕ */
    border: 1px solid var(--border-col); /* РАМКА КАРТЕ */
}

/* Оформление панелей */
.panel-header {
    padding: 15px 20px;
    background-color: rgba(10, 9, 8, 0.8);
    border-bottom: 1px solid var(--border-col);
    font-weight: 600;
    color: var(--gold);
    font-family: 'Cinzel', serif;
}

.panel-content { 
    padding: 15px; 
    overflow-y: auto; 
    flex-grow: 1; 
}

.filter-group { 
    margin-bottom: 20px; 
}

/* Аккордеоны (сворачиваемые списки) */
.filter-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: 0.2s;
}

.filter-title:hover { 
    color: var(--gold); 
}

.plus-icon { 
    font-size: 1.2rem; 
    font-weight: bold; 
    transition: 0.3s; 
}

/* --- АККОРДЕОНЫ И СПИСКИ --- */
.accordion-content { 
    display: block; 
} 

.accordion-content.hidden { 
    display: none; 
}

/* Класс для списков, которые нужно крутить */
.scrollable-list {
    max-height: 350px; 
    overflow-y: auto;  
    padding-right: 8px; 
}

/* Видимый скроллбар */
.scrollable-list::-webkit-scrollbar { 
    width: 6px; 
}

.scrollable-list::-webkit-scrollbar-track { 
    background: rgba(255, 255, 255, 0.05); 
    border-radius: 4px; 
}

/* Явный HEX-цвет ползунка (чтобы браузер его 100% отобразил) */
.scrollable-list::-webkit-scrollbar-thumb { 
    background: #d4a719; 
    border-radius: 4px; 
}

.scrollable-list::-webkit-scrollbar-thumb:hover { 
    background: #b58c10; 
}

/* Поле поиска и селекты */
.search-box {
    width: 100%; 
    padding: 8px 12px; 
    margin-bottom: 15px;
    background: rgba(0,0,0,0.4); 
    border: 1px solid var(--border-col);
    color: white; 
    border-radius: 4px; 
    box-sizing: border-box; 
    font-family: 'Montserrat', sans-serif;
}

.search-box:focus {
    border-color: var(--gold);
    outline: none;
}

/* Списки с галочками */
.list-item {
    padding: 8px 10px; 
    margin-bottom: 4px;
    background: rgba(255,255,255,0.03);
    border-radius: 4px; 
    display: flex; 
    align-items: center; 
    gap: 10px;
    cursor: pointer; 
    transition: 0.2s; 
    font-size: 0.9rem;
}

.list-item input[type="checkbox"] { 
    cursor: pointer; 
    accent-color: var(--gold); 
    width: 16px;
    height: 16px;
}

.list-item:hover { 
    background: rgba(255,255,255,0.08); 
}

/* Цвета тиров */
.t0 { color: #ffffff; }
.t1 { color: #4eff4c; }
.t2 { color: #4c97ff; }
.t3 { color: #bf4cff; }
.t4 { color: #e6b91c; }

/* Буквы и цифры сетки координат */
.grid-label-icon {
    background: transparent;
    border: none;
    box-shadow: none;
}

.grid-label-text {
    font-family: 'Cinzel', serif;
    font-size: 24px;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 2px 2px 3px #000, -2px -2px 3px #000, 2px -2px 3px #000, -2px 2px 3px #000;
    text-align: center;
    line-height: 24px;
}

/* Кастомный скроллбар для панелей */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-col); border-radius: 10px; }

/* =========================================
   СТИЛИ АККУРАТНОЙ НЕЗАБЛЮРЕННОЙ МОДАЛКИ
   ========================================= */

.modal-overlay-transparent {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0); /* Полностью прозрачный фон, КАРТУ ВИДНО! */
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto; /* Фон ловит клик для закрытия */
}

/* Маленькое аккуратное окошко по центру */
.modal-content-small {
    background: #222;
    padding: 20px;
    border-radius: 8px;
    width: 320px; /* Фиксированная небольшая ширина */
    color: #ddd;
    border: 1px solid #444;
    box-shadow: 0 10px 40px rgba(0,0,0,0.9);
    font-family: 'Segoe UI', Tahoma, sans-serif;
    pointer-events: auto; /* Внутри окошка клики работают */
}

/* --- СТИЛИ КАСТОМНОГО ВЫПАДАЮЩЕГО СПИСКА С КАРТИНКАМИ --- */
.custom-select { position: relative; }

/* Закрытый select */
.select-selected {
    background: #111;
    border: 1px solid #444;
    padding: 10px;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    min-height: 44px;
    box-sizing: border-box;
}
.select-selected img { width: 24px; height: 24px; object-fit: contain; }

/* Выпадающий список (Items) */
.select-items {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #111;
    border: 1px solid #444;
    border-top: none;
    max-height: 250px; 
    overflow-y: auto; 
    z-index: 10001;
    border-radius: 0 0 3px 3px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

/* Пункт списка (Один объект) */
.select-item {
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-bottom: 1px solid #222;
    font-size: 13px;
}
.select-item:hover { background: #333; }
.select-item img { width: 24px; height: 24px; object-fit: contain; }