/* mapa */
    body{
        overflow:hidden;
        margin: 0;
        padding: 0;
    }
    #map-container{
        pointer-events: none;
        width:100%;
        z-index:1;   
    }
    #map {
        width: 100%;
        height: 100vh;
        float: left;
    }

/* opciones del mapa */
    #map-options {
        width: 15%;
        height: 100vh;
        float: left;
        background-color: #f2f2f2;
        padding: 10px;
        box-sizing: border-box;
    }
    #map-options h2 {
        margin-top: 0;
    }
    #map-options label {
        display: block;
        margin-bottom: 5px;
    }
    #map-options select {
        width: 100%;
        padding: 3px;
        font-size: 14px;
    }
    .leaflet-draw-section, .leaflet-draw-toolbar, .leaflet-popup-content-wrapper, .leaflet-popup-close-button, .leaflet-popup-tip-container{
        display:none;
    }

    .text_info:hover::after {
        top: -60px;
        left: -186px;
    }


/* animación de carga */
    #icono_carga{
        margin-top:20%;
        margin-left:46%;
        border: 5px solid var(--gris_fora);
        border-radius: 50%;
        border-top: 5px solid rgb(212, 212, 212);
        width:70px;
        height:70px;
        scale: 100%;
        animation: spin 1s linear infinite;
        display:block;
        z-index:401;
        position: relative;
    }
    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }

/* botones de control del mapa */
    .opciones_de_mapas>select{
        background-color: white;
        border-radius: 6px;
        height: 35px;
        font-size: 16px;
        margin-top:10px;
        margin-bottom: 30px;
        margin-left:20px;
        /* display: none; */
    }
    #map-select{
        margin-left:60px;
    }
    .form-select-mapas{
        width: 70%;
        border: 1px solid;
        border-radius: 8px;
        height: 30px;
        font-size: 16px;
    }
    #boton_cerrar, #boton_centrar ,#boton_abrir, #boton_recargar{
        height:30px;
        width: 30px;
        overflow: hidden;
        line-height: 30px;
        margin:6px 12px 3px 12px;
        border-radius: 4px;
        outline:solid rgba(0, 0, 0, 0.3) 2px;
        background-color: white;
        border: none;
    }
    #boton_cerrar:hover, #boton_centrar:hover,#boton_abrir:hover, #boton_recargar{
        background-color: #f4f4f4;
        outline:solid rgba(0, 0, 0, 0.3) 2px;
    }

/* ventana de informacion lateral */
    #moreInfo{
        line-height: 2;
        padding: 0px 10px 10px 10px;
        position: absolute;
        display: none;
        border: #1F364F 2px solid;
        right: 0px;
        top: 0px;
        width: 425px;
        height: calc(100vh - 60px);
        background-color: white;
        background-attachment: fixed;
        z-index: 410;
        overflow-y: scroll;
        overflow-x:hidden;
        font-size: 14px;
    }
    #moreInfo h6{
        padding-top: 10px;
        margin-bottom: -10px;
    }
    #boton_cerrar_div, #boton_desplegar_todo, #boton_descarga{
        float:right;
        display:block;
        background: none;
        border:none;
        padding:0px;
        margin:0px 10px 0px 10px;
    }
    ::-webkit-scrollbar{
        border-radius: 0px 10px 10px 0px;
    }

/* tabla información lateral */
    .tabla_recinto_cuerpo, .tabla_recinto_cabecera{
        width:95%;
        border-collapse: collapse;
        background-color: whitesmoke;
        margin: 0px 10px 0px 10px;
    } 
    td, th{
        border: 2px solid #1F364F;
        padding: 5px;
    }
    .flecha_desplegable{
        float: right;
        display: inline;
        margin-right:10px;
    }
    /*Cabecera nuevo panel info*/
    .cabeceraInfo{
        position: sticky;
        top:0px;
        background-color: white;
        padding-top:10px;
    }
    .cabeceraInfo>h6{
        margin-left: 10px;
        padding-bottom:10px;
    }
    .opcionesInfo{
        justify-content: space-around;
        display: flex;
    }

    .opcionesInfo button{
        background-color: white;
        border: none;
        border-bottom: 2px solid transparent;
    }

    .opcionesInfo button:hover{
        border-bottom: 2px solid orange;
    }

    .opcionesInfo button:disabled{
        opacity: 1;
        color:black;
        border-bottom: 2px solid orange;
    }

    .apartadoMapas{
        display: flex;
        flex-wrap: wrap;
    }

    .apartados{
        margin-top: 15px;
    }

    .apartadoMapas button{
        flex-basis: calc(50% - 10px);
        margin: 5px;
        border:none;
        border: 1px solid transparent;
        background-color: white;
        padding-top: 15px;
        transition: 0.3s all;
    }

    .apartadoMapas button:hover{
        border:1px solid black;
    }

    .apartadoMapas button img{
        width: 130px;
    }

    #conjuntoSelectSentinel2{
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        align-items: center;
        width: 45%;
    }

    #conjuntoSelectSentinel2 select{
        width: 100%;
    }

    .divPorCapa{
        display: flex;
        justify-content: space-between;
    }

    .toggleLeyenda{
        background-color: #1C3246;
        color: #dddddd;
        font-weight: 100;
    }
    .tablaLeyendas{
        width: 100%;
    }

    /* cabecera */
        .cabecera_informe{
            position: sticky;
            top:0px;
            background-color: white;
            padding-top:10px;
        }
        .cabecera_informe>h6{
            margin-left: 10px;
            padding-bottom:10px;
        }
        #select_parcela{
            border:none;
            border-bottom: solid var(--gris_fora) 1px;
            width:45%;
            padding:4px;
        }
        #indice_referencias{
            display: inline;
            text-align: right;
            float:right;
            margin-right: 10px;
        }

        .colores_MDP{
            color:#dddddd;
        }

        .color_0_15{
            background-color: rgba(173, 216, 230, 255) !important;
        }
        .color_15_25{
            background-color:rgba(135, 173, 216, 255) !important;
        }
        .color_25_35{
            background-color: rgba(70, 130, 180, 255) !important;
        }
        .color_35_55{
            background-color: rgba(255, 201, 131, 255) !important;
        }
        .color_55_75{
            background-color: rgba(255, 140, 0, 255) !important;
        }
        .color_75_100{
            background-color: rgba(255, 69, 0, 255) !important;
        }

    /* cuerpo */
        .clic_para_expandir>th{
            background-color: #1C3246;
            color:#dddddd;
            font-weight: 100;
        }
        .tabla_escondida{
            transform: scale(1,0);
            height: 0px;
            overflow:hidden;
            border:none;
            background-color: none;
        }
        /* tabla con los nombres a la izquierda y los campos a la derecha */
            .tipo_tabla_1>tbody>tr>td:first-child{
                background-color: #3A6389;
                color:#dddddd;
                width: 35%;
            }
        

        /* tabla con un nombre a la izquierda que engloba otros 3 nombres con los campos a la derecha  */
        .tipo_tabla_3 tr>td:first-child{
            background-color: #3A6389;
            color: white;
            width: 30%;
        }
        .tipo_tabla_3 tr>td[rowspan]{
            width:20%;
        }
        .estilosUso{
            width: 60% !important;
        }
        .estilosCompSuelo{
            display: none;
        }
        
/* Leyenda */
    #leyenda {
        min-width: 180px;
        z-index: 410;
        position: absolute;
        background-color: white;
        border-radius: 5px;
        bottom: 80px;
        left: 20px;
        padding: 10px;
        font-size: 12px;
        line-height: 25px;
        display: none;
        overflow: hidden;
        transition-duration: 0.3s;
        padding-bottom: 5px;
        padding-top: 5px;
        border: 1px solid black;
    }
    .color_leyenda{
        display: inline-block;
        height: 20px;
        width: 20px;
        margin-right: 5px;
        border: solid black 1px;
    }

    #seleccionarReferencia {
        position: absolute;
        top: 11px;
        left: 245px;
        z-index: 410;
        display: flex;
        flex-direction: column;
        background: rgb(255, 255, 255);
        padding: 10px;
        width: 200px;
        text-align: center;
        border: 1px solid;
        border-radius: 14px;
    }

    #seleccionarReferencia button{
        background: black;
        color: white;
        font-size: 14px;
        font-weight: bold;
        border: none;
        border-radius: 4px;
        margin-top: 5px;
        height: 30px;
    }

    #seleccionarReferencia span{
        font-size: 14px;
        margin-top: -5px;
        font-weight: bold;
    }

    #boton_treecount{
        width: 35px;
        height: 35px;
        border-radius: 5px;
        position: absolute;
        background: white;
        top: 10px;
        right: -50px;
    }
    #boton_treecount img{
        width: 100%;
        height: 100%;
    }

    #uniTask{
        scale: 2;
        margin-left: 10px;
    }

    .imagenesInfoVisor{
        width: 25px;
        margin-right: 10px;
        margin-left: 5px;
    }

    .alertaInfoVisor{
        width: 20px;
        margin-top: 4px;
        float: right;
    }

    #tituloShape, #tituloRaster, #tituloLeyendas{
        margin-top: 30px;
        margin-bottom: 24px;
    }

    .cargadorOpciones{
        position: relative;
        border: 5px solid var(--gris_fora);
        border-radius: 50%;
        border-top: 5px solid rgb(212, 212, 212);
        width: 70px;
        height: 70px;
        transform: scale(1);
        animation: spin 1s linear infinite;
        z-index: 10000;
        top: 50%;
        left: 45%;
    }

    .estilosInputsCapas{
        accent-color: rgb(28, 50, 70);
    }

    .graficos_info{
        height:310px;
        width: 100%;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.5s;
    }

    .graficos_info:hover{
        box-shadow: 0px 0px 10px 5px black;
        scale: 1.01;
    }

    .popup_fondo{
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        justify-content: center;
        align-items: center;
        z-index: 10000;
        opacity: 0;
        transform: scale(0.8);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .color_cabecera_azul{
        background-color: #3A6389;
        color: #dddddd;
    }

    .popup_fondo.mostrar {
        display: flex;
        opacity: 1;
        transform: scale(1);
    }

    .popup_imagen {
        max-width: 90%;
        max-height: 90%;
        border-radius: 10px;
    }

    .plegarDesplegarCapas{
        float: left;
        margin-right: 10px;
        border: none;
        background: none;
    }

    #cambioEntreIndices, #botonMostrarEstadisticas, #eliminarMarcadores{
        background: none;
        border-radius: 30px;
        width: 34px;
        margin:10px
    }

    #indicesGI .custom-select{
        width: 28%;
        margin-right: 5px;
    }

    #divGICompleto{
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 10px;
        flex-direction: column;
    }

    #divGICompleto #rangeInterior{
        margin-right: 15px;
    } 

    .divHtasIndices{
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        margin-top: 15px;
    }

    #resultadoEstadisticas{
        display: flex;
        justify-content: center;
        align-items: center;
    }

    #divCargaMapasBase div, #divCargaMapasBase div div{
        margin-left: 15px;
    }


    #divCargaMapasBase div button{
        padding-top: 2px;
        margin-top: 25px;
        border-radius: 10px;
    }

    #cargador{
        animation: girar 2s infinite linear;
      }
      
      @keyframes girar {
        0% {
          transform: rotate(0deg);
        }
        100% {
          transform: rotate(360deg);
        }
      }

    #cargadorTreeCount{
        color:#dddddd;
    }

    #spanText{
        cursor: pointer;
    }

    #resultadoEstadisticas {
        display: none;
        position: fixed;
        top: 20px;
        left: 20px;
        border: 2px solid black;
        background: white;
        padding: 10px;
        z-index: 1000;
        resize: both;
        overflow: hidden; /* Evita el desbordamiento */
        max-width: 90vw;
        max-height: 90vh;
        min-width: 200px; /* Ajusta el tamaño mínimo según sea necesario */
        min-height: 200px; /* Ajusta el tamaño mínimo según sea necesario */
    }

    #resultadoEstadisticas img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }

    #cerrarImagen {
        position: absolute;
        top: 10px;
        right: 10px;
        cursor: pointer;
        color: black;
        font-size: 20px;
        background: white;
        border-radius: 50%;
        padding: 5px;
        transition: background 0.3s, color 0.3s;
    }

    #cerrarImagen:hover {
        background: black;
        color: white;
    }

    /* Hacer que el div se pueda redimensionar solo en diagonal */
    #resultadoEstadisticas {
        resize: both;
        overflow: hidden;
    }
    #resultadoEstadisticas::after {
        content: '';
        position: absolute;
        right: 0;
        bottom: 0;
        width: 20px;
        height: 20px;
        cursor: se-resize;
        background: rgba(0, 0, 0, 0.2);
    }

    #botonesSubirBajarCapas{
        display: inline-flex;
    }

    #botonesSubirBajarCapas div button{
        display: flex;
        justify-content: center;  
        align-items: center;      
        width: 20px;
        height: 20px;
        margin: 3px;
        padding: 0;         
        border: 1px solid rgb(179, 178, 178);  
        border-radius: 5px; 
        font-weight: bold;
        font-size: 20px;
        background:none;
    }

    #botonesSubirBajarCapas div button:active{
        background-color: #1C3246;
        color: whitesmoke;
    }

    #botonesSubirBajarCapas div{
        position: absolute;
        top: 84px;
    }

    
    .editarFactores{
        background: none;
        border: none;
    padding: 0;
    margin-right: 10px;
}


#modalIBP {
    position: fixed;
    top: 60px;
    right: 0; /* Cambiado de 'left: 0' a 'right: 0' para que aparezca en la derecha */
    height: calc(100% - 60px);    
    display: flex;
    justify-content: flex-end; /* Coloca el contenido hacia la derecha */
    align-items: stretch; /* Alinea el contenido para llenar todo el contenedor */
    z-index: 1000;
    transition: opacity 0.4s ease;
}

#modalIBPContenido {
    position: relative;
    background-color: #f9f9f9;
    padding: 20px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3); /* Sombra hacia la izquierda */
    width: 480px; /* Ocupa el 100% del ancho del modal, que es el 20% de la pantalla */
    overflow-y: auto; /* Agrega scroll vertical si el contenido excede la altura */
    transition: transform 0.3s ease-in-out;
}

#modalIBPContenido h4 {
    color: #2c3e50;
    font-size: 1.5em;
    text-align: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

#modalIBPContenido div {
    margin-bottom: 15px;
}

.editarFactores i {
    color: #3A6389;
    font-size: 1em;
    cursor: pointer;
    transition: color 0.3s ease;
}

.editarFactores:hover i {
    color: #2c3e50;
}

#guardarModal {
    width: 45%;
    padding: 10px;
    border-radius: 5px;
    font-size: 1em;
}

#guardarModal {
    background-color: #3A6389;
    color: white;
    border: none;
    cursor: pointer;
}

#guardarModal:hover {
    background-color: #334f69;
}

#cerrarModal {
    background-color: #a3a7aa;
    color: white;
    border: none;
    cursor: pointer;
    position: absolute;
    right: 25px;
    top: 12px;
}

#cerrarModal:hover {
    background-color: #7d8c92;
}

#botonDetallesIBP {
    cursor: pointer;
}

#panelLateral {
    position: fixed;
    top: 60px;
    right: -300px;
    width: 600px;
    height: 90%;
    background-color: #f9f9f9;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    padding: 20px;
    transition: right 0.4s ease-in-out;
    z-index: -1;
}

#panelLateral.active {
    right: 480px; /* Al activar la clase, el panel se desplaza hacia la vista */
    overflow: auto;
}

#panelLateral h4 {
    color: #2c3e50;
    font-size: 1.2em;
    margin-bottom: 20px;
}

.circle, .infoDetallada, .infoDetalladaOculta{
    font-size: 12px;
    width: 20px;              /* Ancho fijo para mantener proporciones */
    height: 20px;             /* Alto igual al ancho */
    margin-left: 4px;
    margin-right: 4px;
    border: 2px solid black;
    display: inline-flex;      /* Para centrar contenido dentro del círculo */
    justify-content: center;   /* Centrar contenido horizontalmente */
    align-items: center;       /* Centrar contenido verticalmente */
    border-radius: 50%;        /* Convertir en un círculo */
    cursor: pointer;
    transition: 0.3s all;
}

.activo {
    color: whitesmoke !important;
    background-color: #1F364F !important;
}

.circle:hover, .infoDetallada:hover {
    color:whitesmoke;
    background-color: #1F364F;
}

