/* PANEL */
.layer-panel {
    position: absolute;        /* fundamental para que se superponga al mapa */
    top: 68px;                 /* distancia desde la parte superior del mapa */
    right: 0px;               /* distancia desde la derecha del mapa */
    width: 300px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    overflow: hidden;
    z-index: 1000;             /* aseguramos que esté por encima del mapa */
    box-shadow: 0 2px 6px rgba(0,0,0,0.3); /* sombra opcional para destacarlo */
}

/* TÍTULO PRINCIPAL */
.layer-title {
    background: #0066cc;
    color: white;
    font-size: 16px;
    font-weight: bold;
    padding: 10px;
    text-align: center;
}

/* LISTA DE GRUPOS */
.layer-list {
    list-style: none;
    margin: 0;
    padding: 0;
	
	/* 🔥 Aquí lo importante */
    max-height: calc(100vh - 175px);
	
	/*max-height: 350px;*/   /* ajusta según necesites */
    overflow-y: auto;
	
}

/* CABECERA DE GRUPO */
.group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: pointer;
    background: #f2f2f2;
    border-bottom: 1px solid #ddd;
    user-select: none;
}

.group-header:hover {
    background: #e6e6e6;
}

/* ICONO */
.group-icon {
    margin-right: 6px;
    font-size: 16px;
}

/* ICONO DE PLEGAR */
.group-toggle-icon {
    font-size: 18px;
    font-weight: bold;
}

/* SUBGRUPOS */
.subgroup {
    list-style: none;
    padding-left: 20px;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-in-out;
}

/* MOSTRAR SUBGRUPO */
.subgroup.open {
    max-height: 500px;
}

/* ELEMENTOS DE CAPA */
.subgroup li {
    margin: 4px 0;
}

.form-check-input {
    cursor: pointer;
}

.form-check-label {
    cursor: pointer;
    margin-left: 4px;
}

/* COLORES POR GRUPO */
.group-Ortofoto { border-left: 4px solid #0a84ff; }
.group-Cubierta  { border-left: 4px solid #2ecc71; }
.group-Edificios { border-left: 4px solid #e67e22; }
.group-Hidrografía { border-left: 4px solid #3498db; }
.group-Relieve { border-left: 4px solid #9b59b6; }

/* ICONOS (puedes cambiarlos por FontAwesome si quieres) */
.icon-Ortofoto { color: #0a84ff; }
.icon-Cubierta  { color: #2ecc71; }
.icon-Edificios { color: #e67e22; }
.icon-Hidrografía { color: #3498db; }
.icon-Relieve { color: #9b59b6; }
