/**
 * Map Styles for Meteo Analysis BVS Plugin
 * 
 * @package Meteo_Analysis_BVS
 */

/* Контейнер карты */
.map-container {
    width: 100%;
    height: 700px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

/* Панель управления картой */
.map-controls {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.control-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.control-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.control-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Стили для объектов на карте */
.ol-control {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.ol-zoom {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
}

.ol-zoom-in,
.ol-zoom-out {
    background-color: #0088cc;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    font-size: 18px;
    border-radius: 4px;
    margin: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ol-zoom-in:hover,
.ol-zoom-out:hover {
    background-color: #0077b5;
    transform: scale(1.1);
}

/* Стили для рисования */
.ol-dragbox {
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(0, 0, 0, 0.5);
}

/* Слои карты */
.map-layers-panel {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    max-width: 300px;
}

.map-layers-panel .panel-header {
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eaeaea;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.layer-item {
    display: flex;
    align-items: center;
    padding: 5px 0;
    cursor: pointer;
}

.layer-item input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.layer-item span {
    font-size: 14px;
    color: #495057;
}

/* Стили для объектов на карте */
.kml-item {
    background: white;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    border-left: 3px solid #0088cc;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.kml-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

.kml-item.active {
    background: #e3f2fd;
    border-left-color: #3498db;
}

.kml-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kml-item-name {
    font-weight: 500;
    color: #212529;
}

.kml-item-actions {
    display: flex;
    gap: 5px;
    margin-top: 8px;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}

/* Стили для инструментов рисования */
.drawing-btn {
    display: block;
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawing-btn i {
    font-size: 18px;
    min-width: 20px;
    text-align: center;
}

.drawing-btn.polygon {
    background: #3498db;
    color: white;
}

.drawing-btn.polygon:hover {
    background: #2980b9;
}

.drawing-btn.route {
    background: #2ecc71;
    color: white;
}

.drawing-btn.route:hover {
    background: #27ae60;
}

.drawing-btn.clear {
    background: #e74c3c;
    color: white;
}

.drawing-btn.clear:hover {
    background: #c0392b;
}

.drawing-btn.export {
    background: #9b59b6;
    color: white;
}

.drawing-btn.export:hover {
    background: #8e44ad;
}

.drawing-status {
    margin-top: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
    color: #495057;
    border-left: 3px solid #0088cc;
}

/* Адаптивность карты */
@media (max-width: 768px) {
    .map-container {
        height: 500px;
    }
    
    .map-controls {
        margin-top: 15px;
    }
    
    .map-layers-panel {
        max-width: 250px;
        font-size: 13px;
    }
    
    .layer-item span {
        font-size: 13px;
    }
}