/* Стили для кнопки вызова карты */
    .btn-open-map {
        background-color: #2c3e50;
        color: white;
        padding: 15px 25px;
        font-family: 'Press Start 2P', cursive;
        font-size: 14px;
        border: 2px solid #000;
        cursor: pointer;
        border-radius: 8px;
        margin:20px;
    }
    .btn-open-map:hover { background-color: #34495e; }

    /* Стили модального окна */
 /* Контейнер для карты на странице */
 .map-container {
    position: relative;
    width: 100%;
    /* Высота 100% от родительского блока, минус высота заголовка окна */
    height: calc(100% - 60px); 
    background: #e5e3df; /* Цвет фона пока грузятся тайлы */
    overflow: hidden;
}

#map {
    width: 100%;
    height: 100%;
}

/* Стили для кнопки "В путь" поверх карты */
.btn-start-route {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background-color: #e74c3c;
    color: white;
    padding: 15px 30px;
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    border: 2px solid #000;
    cursor: pointer;
    border-radius: 8px;
    display: block; /* УБРАЛИ display: none, теперь кнопка видна всегда */
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.btn-start-route:hover { background-color: #c0392b; }
/* Основной контейнер окна маршрута */
.leaflet-routing-container {
    position: absolute !important;
    bottom: 15px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 1000 !important; /* Поверх тайлов карты */
    
    background-color: #fff !important;
    border: 2px solid #000 !important;
    box-shadow: 6px 6px 0px rgba(34, 60, 80, 0.25) !important;
    padding: 10px !important;
    
    /* Размеры */
    width: 90% !important;
    max-width: 400px !important;
    max-height: 35vh !important; /* Занимает не больше трети высоты */
    overflow-y: auto !important;
    
    font-family: 'Neucha', cursive !important;
    color: #252525 !important;
}

/* Скрываем альтернативные маршруты и лишние заголовки */
.leaflet-routing-alternatives-container { display: none !important; }
.leaflet-routing-alt h2 { display: none !important; }

/* Дизайн времени и расстояния */
.leaflet-routing-alt h3 {
    font-family: 'Press Start 2P', cursive !important;
    font-size: 10px !important;
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 10px !important;
}

/* Таблица шагов */
.leaflet-routing-alt table { width: 100% !important; border-collapse: collapse !important; }
.leaflet-routing-alt tr { border-bottom: 1px dashed #ccc !important; }
.leaflet-routing-alt td { padding: 8px 5px !important; font-size: 16px !important; }

/* Скроллбар */
.leaflet-routing-container::-webkit-scrollbar { width: 6px; }
.leaflet-routing-container::-webkit-scrollbar-thumb { background: #000; }