body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

#cuerpo{
    flex-grow: 1;
    overflow: auto;
    padding: 0px;
}

#map{
    height: 100%;
  }

div.leaflet-control-zoom.leaflet-bar.leaflet-control {
    margin-top: 100px;
    
}

div.leaflet-control-layers.leaflet-control{
    margin-top: 100px;
}

div.leaflet-control-layers.leaflet-control.leaflet-control-layers-expanded{
    padding-left: 20px;
}


/* #leyenda {
    z-index: 1000 !important;
    position: fixed;
    bottom: 0;
    left: 0;
    background-color: #ffffff;
    display: flex; 
    flex-direction: column;
    border-top-right-radius: 15px;
} */

#contenedor-leyenda {
    display: none;
}

.leyenda-item {
    display: flex;
    flex-direction: column;
    align-items: first baseline; 
    margin: 10px; 
    /* font-weight: bold; */
}

.leyenda-item p {
    margin-bottom: 0;
}


.btn-leyenda {
    z-index: 1000 !important;
    position: fixed;
    bottom: 110px;
    left: 10px;
    border: none;
    border-radius: var(--radius-btn);
    background-color: var(--color-primary);
}

.btn-leyenda:hover {
    background-color: var(--color-primary-hover);
}

.btn-leyenda:focus {
    background-color: var(--color-primary-hover);
}

.leyenda {
    z-index: 1000 !important;
    position: fixed;
    bottom: 150px;
    left: 10px;
}

.btn-cleanLayers {
    z-index: 1000 !important;
    position: fixed;
    bottom: 60px;
    left: 10px;
    border-radius: var(--radius-btn);
    border: none;
    background-color: var(--danger);
}

.btn-cleanLayers:hover {
    background-color: var(--danger-hover);
}

.btn-cleanLayers:focus {
    background-color: var(--danger-hover);
}

.btn-wfs {
    z-index: 980 !important;
    position: fixed;
    bottom: 160px;
    left: 10px;
    border: none;
    border-radius: var(--radius-btn);
    background-color: var(--neutral);
}

.wfsOn {
    background-color: var(--success);
}


.wfsOn:hover {
    background-color: var(--success-hover);
}

.wfsOn:focus {
    background-color: var(--success-hover);
}

.wfsOff {
    background-color: var(--neutral);
}

.wfsOff:hover {
    background-color: var(--neutral-hover);
}

.wfsOff:focus {
    background-color: var(--neutral-hover);
}

.infoWFS {
    z-index: 980 !important;
    position: fixed;
    bottom: 200px;
    left: 10px;
    width: 200px;
}

#loader {
    display: none; /* Oculto por defecto */
    position: fixed;
    left: 60px;
    top: 115px;
    transform: translate(-50%, -50%);
    border: 8px solid var(--brand-050);
    border-radius: 50%;
    border-top: 8px solid var(--brand-600);
    width: 30px;
    height: 30px;
    animation: spin 2s linear infinite;
    z-index: 1000; /* Asegúrate de que el loader esté por encima de otros elementos */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-ume {
    z-index: 960 !important;
    position: fixed;
    bottom: 210px;
    left: 10px;
    border: none;
    border-radius: var(--radius-btn);
    background-color: var(--color-primary);
}

.btn-ume:hover {
    background-color: var(--color-primary-hover);
}

.btn-ume:focus {
    background-color: var(--color-primary-hover);
}
.infoFeatures {
    z-index: 960 !important;
    position: fixed;
    bottom: 250px;
    left: 10px;
}

#ume-list  {
    max-height: 200px;
    overflow-y: auto;
    display: block;
}

#ume-list > thead {
    text-align: center;
}

#ume-list > tbody > tr:hover {
    background-color: var(--row-hover);
    cursor: pointer;
}

/* ==========================================================================
   Marca aplicada a los elementos nativos de Leaflet (popups, controles)
   para que el mapa se sienta parte del mismo sistema visual.
   ========================================================================== */
.leaflet-container{
    font-family: var(--font-base);
}

/* Popups con tipografía, color y radio de marca. */
.leaflet-popup-content-wrapper{
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.leaflet-popup-content{
    font-family: var(--font-base);
    font-size: var(--fs-body);
    color: var(--color-text);
    line-height: var(--lh-body);
}

.leaflet-popup-content b{
    color: var(--brand-600);
}

/* Tarjetas flotantes de leyenda / info (Bootstrap .card). */
.leyenda .card,
.infoWFS .card,
.infoFeatures .card{
    border: 1px solid var(--surface-card-border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.leyenda-item p{
    font-weight: var(--fw-emphasis);
    color: var(--brand-600);
}
