
html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

/* Contenedor principal */
#main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden; /* Evitar el desbordamiento */
}

/* Mapa */
#map-container {
    flex: 1;
    position: relative;
    height: 100%;
    z-index: 1;
}

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

/* Controles personalizados */
.custom-controls {
    position: absolute;
    top: 20px;
    left: 90px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.custom-controls button {
    background-color: white;
    border: none;
    border-radius: 5px;
    padding: 10px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom-controls button i, .custom-controls button span {
    font-size: 18px;
    color: #333;
}

.custom-controls button:hover {
    background-color: #f0f0f0;
}

/* Filtros de mapa personalizados */
.layer-control {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    width: 300px;
    transition: opacity 0.3s ease-in-out;
    display: none;
}

.layer-control.open {
    display: block;
    opacity: 1;
}

.layer-control.closed {
    display: none;
    opacity: 0;
}

#layer-controls {
    display: none;
}

.toggle-button {
    background-color: white;
    border: none;
    border-radius: 30%;
    padding: 8px;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1001;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ajustes de tamaños de texto y elementos del acordeón */
.layer-control h5 {
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: #333;
}

.accordion-header button {
    font-size: 0.8rem;
    padding: 5px;
}

.accordion-body {
    font-size: 0.8rem;
    padding: 6px;
}

.layer-control .layer-group {
    margin-bottom: 8px;
}

.layer-control input[type="checkbox"] {
    transform: scale(0.85);
    margin-right: 6px;
}

.layer-control input[type="range"] {
    width: 90%;
    transform: scale(0.85);
}

/* Logo en la parte inferior izquierda del mapa */
#logo_mapa {
    position: absolute;
    bottom: 10px;
    right: 160px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    background-color: white;
    padding: 2px;
    z-index: 1000;
}

/* Cuadro de búsqueda centrado */
.leaflet-control-geosearch {
    position: absolute !important;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    max-width: 90%;
    z-index: 10000;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* Margen superior para la toolbar */
.leaflet-draw-toolbar-top,
.leaflet-draw-toolbar-bottom {
    margin-top: 10px;
}

/* Ajustes para los botones del draw control */
.leaflet-draw-toolbar a {
    margin: 10px !important;
    background-color: white !important;
    border: none !important;
    border-radius: 30% !important;
    padding: 8px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.leaflet-bar-part.leaflet-bar-part-single {
    display: none !important;
}

.leaflet-draw-toolbar,
.leaflet-bar {
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.leaflet-draw-toolbar a i, .leaflet-draw-toolbar a span {
    font-size: 18px !important;
    color: #333 !important;
}

.leaflet-draw-toolbar a:hover {
    background-color: #f0f0f0 !important;
}

/* Responsividad para pantallas medianas y pequeñas */
@media only screen and (max-width: 768px) {
    #map-container {
        height: 60vh;
    }

    .custom-controls button {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .layer-control {
        width: 220px;
        padding: 10px;
    }

    .toggle-button {
        width: 35px;
        height: 35px;
    }

    .leaflet-draw-toolbar a {
        width: 35px !important;
        height: 35px !important;
        padding: 6px !important;
        font-size: 16px !important;
    }
}

@media only screen and (max-width: 480px) {
    #map-container {
        height: 50vh;
    }

    .custom-controls button {
        width: 30px;
        height: 30px;
        padding: 4px;
        font-size: 12px;
    }

    .layer-control {
        width: 160px;
        padding: 8px;
    }

    .toggle-button {
        width: 30px;
        height: 30px;
    }

    .leaflet-draw-toolbar a {
        width: 30px !important;
        height: 30px !important;
        padding: 4px !important;
        font-size: 14px !important;
    }

    #logo_mapa {
        bottom: 50px;
        right: 10px;
        width: 40px;
        height: 40px;
    }

    /* Ocultar controles de zoom en móviles */
    .leaflet-control-zoom {
        display: none !important;
    }

    /* Ocultar footer en móviles */
    footer {
        display: none !important;
    }
} 
