html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.map-container {
    height: 100vh;
    width: 100%;
}

.comparator-map {
    height: 400px;
    width: 100%;
    border: 2px solid #dee2e6;
    border-radius: 4px;
}

.layer-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
}

.layer-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.layer-item:hover {
    background-color: #f8f9fa;
}

.layer-item.selected {
    background-color: #e3f2fd;
    border-left: 3px solid #2196F3;
}

.map-controls {
    z-index: 1000;
}

.ol-control button {
    background-color: rgba(255, 255, 255, 0.9) !important;
    border-radius: 4px !important;
}

.ol-control button:hover {
    background-color: white !important;
}

/* Conmutador de división para el comparador */
.ol-swipe {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #007bff;
    cursor: col-resize;
    z-index: 1000;
}

.ol-swipe:before {
    content: "⋮";
    position: absolute;
    top: 50%;
    left: -8px;
    color: #007bff;
    font-weight: bold;
    background: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Estilos generales */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#main-map {
    width: 100%;
    height: calc(100vh - 96px); /* Altura total menos header */
    background: #f8f9fa;
}

/* Sidebar */
.sidebar {
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    height: calc(100vh - 96px);
    overflow-y: auto;
}

.layer-item {
    padding: 8px 12px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background-color 0.2s;
}

.layer-item:hover {
    background-color: #e9ecef;
}

.layer-item.active {
    background-color: #007bff;
    color: white;
}

/* Controles del mapa */
.map-controls {
    z-index: 1000;
}

.btn-group-vertical .btn {
    margin-bottom: 2px;
}

/* Modal comparador */
.comparator-map {
    height: 400px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

/* Barra de escala */
.scale-line {
    background: rgba(255,255,255,0.8);
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        height: auto;
        max-height: 300px;
    }
    
    #main-map {
        height: calc(100vh - 150px);
    }
}


/* Estilos para el comparador */
.modal-fullscreen .modal-content {
    height: 100vh;
}

.comparator-map {
    min-height: 400px;
    background: #f8f9fa;
}

#layout4Maps .col-md-6 {
    height: 50% !important;
}

.card .card-body {
    flex: 1;
}

/* Asegurar que los mapas ocupen todo el espacio */
.comparator-map {
    width: 100%;
    height: 100%;
}

/* Estilos para los selectores en headers */
.card-header .form-select {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
}

.card-header .form-select option {
    color: #000;
}



/* Estilos para el espejo del mouse en el comparador */
.mouse-crosshair {
    filter: drop-shadow(0 0 2px white) drop-shadow(0 0 2px white);
}

.comparator-map {
    position: relative;
    cursor: crosshair;
}

/* Efecto hover para los mapas */
.comparator-map:hover {
    box-shadow: 0 0 0 2px #007bff;
    transition: box-shadow 0.2s ease;
}

/* Estilo para el control de espejo mouse */
.form-check.form-switch {
    margin-bottom: 0;
}

.form-check-label {
    font-size: 0.9rem;
}