/* ===== СБРОС И БАЗОВЫЕ СТИЛИ ===== */
/* ===== КАРТА НА ВЕСЬ ЭКРАН ===== */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden; /* блокируем скролл страницы */
}

/* ===== КАРТА НА ВЕСЬ ЭКРАН ===== */
#map {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;          /* fallback для старых браузеров */
    height: 100dvh;         /* динамическая высота — работает на мобильных */
    height: 100svh;         /* small viewport — ещё один fallback */
    z-index: 1;
/*    background: #1a1a1a; */
}

/* ===== ПЛАВАЮЩАЯ ПАНЕЛЬ ПОИСКА ===== */
.search-overlay {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 1000;
    pointer-events: none; /* чтобы клики проходили сквозь пустые области */
}

.search-bar {
    display: flex;
    gap: 8px;
    /*
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    */
    background: #FFC107;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
    pointer-events: auto; /* возвращаем клики для содержимого */
}

.search-bar input {
    flex: 1;
    border-radius: 8px;
}

.search-bar button {
    border-radius: 8px;
}


@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== СПИННЕР ЗАГРУЗКИ ===== */
.map-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
/*    background: rgba(255, 255, 255, 0.7); */
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.map-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.map-loader-content {
    text-align: center;
    color: #FFC107;
}

.map-loader-text {
    font-weight: 700;
    font-size: 15px;
    color: #000;
    margin-top: 12px;
    /* text-shadow: 0 1px 3px rgba(0,0,0,.8);*/
}

/* ===== КАПЛЯ-МАРКЕР ===== */
.pin-marker {
    width: 36px;
    height: 46px;
    position: relative;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.6));
    transition: transform .15s ease;
}

.pin-marker:hover {
    transform: scale(1.2);
    z-index: 1000 !important;
}

.pin-marker svg {
    width: 100%;
    height: 100%;
    display: block;
}

.pin-logo-bg { fill: #ffffff; }
.pin-logo { pointer-events: none; }

/* ===== МАРКЕР РЕЗУЛЬТАТА ПОИСКА ===== */
.search-result-icon {
    width: 32px;
    height: 32px;
    background: #FFC107;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    box-shadow: 0 2px 6px rgba(0,0,0,.5);
}

.search-result-icon::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 10px; height: 10px;
    background: #000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* ===== OFFCANVAS ===== */
@media (min-width: 992px) {
    #filterOffcanvas { width: 340px !important; }
}

/* убираем копирайт */
.leaflet-control-attribution {
    display: none !important;
}

/* ===== КРАСИВЫЕ КНОПКИ ФИЛЬТРОВ ===== */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    margin: 0px 5px 5px 0px;
    background: #fff;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.filter-label {
    flex: 1;
    font-size: 14px;
}

.filter-btn:hover {
    border-color: #FFC107;
    background: #FFFDE7;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 215, 0, 0.3);
}

.filter-btn:active {
    transform: translateY(0);
}

/* Активное состояние (когда выбрано) */
.btn-check:checked + .filter-btn {
    background: linear-gradient(135deg, #FFC107 0%, #FFC107 100%);
    color: #000;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.5);
}

.btn-check:checked + .filter-btn .filter-check {
    opacity: 1;
    transform: scale(1);
}


/* Галочка (скрыта по умолчанию) */
.filter-check {
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
    color: #000;
    font-size: 20px;
}

/* Анимация появления галочки */
@keyframes checkPop {
    0% { transform: scale(0) rotate(-45deg); }
    50% { transform: scale(1.2) rotate(0); }
    100% { transform: scale(1) rotate(0); }
}

.btn-check:checked + .filter-btn .filter-check {
    animation: checkPop 0.3s ease;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 575.98px) {
    .filter-grid {
        grid-template-columns: 1fr; /* на мобильных в одну колонку */
    }
}

/* ===== КНОПКИ ДЕЙСТВИЙ ===== */
.fuel-prices dl {
    display: grid;
    grid-template-columns: max-content max-content; /* 2 колонки: по ширине текста */
    gap: 8px 24px; /* 8px между строками, 24px между названием и ценой */
    align-items: baseline; /* Выравнивание текста по базовой линии */
}

.fuel-prices dt {
    font-weight: bold;
}

.fuel-prices dd {
    margin: 0; /* Убираем стандартный отступ браузера */
}

.fuel-prices small {
    color: #888;
}

#filterOffcanvas {
  margin: 80px 10px 10px 10px;
  max-width: calc(100vw - 20px); /* 100% ширины экрана минус левый и правый маргины (10px + 10px) */
  max-height: calc(100dvh - 90px); /* Чтобы нижний отступ 10px тоже не обрезался на мобильных */
}
