@import url('./foundation/base.css');
@import url('./components/sidebar.css');
@import url('./components/map-controls.css');
@import url('./components/popups.css');
@import url('./features/dashboards.css');
@import url('./components/right-sidebar.css');

/* Estilos para la Nueva Leyenda Hibrida (WMS / Vector) */
#leyenda-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.legend-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.legend-group-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.legend-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
    min-height: 22px;
    padding: 3px 4px;
    gap: 6px;
    border-radius: 4px;
    background: rgba(237, 243, 247, 0.62);
    animation: legend-fade-in 180ms ease both;
}

.legend-item-title {
    display: block;
    font-size: 9px;
    font-weight: bold;
    margin-bottom: 0;
    color: #263746;
}

.legend-items-grid {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
}

.legend-vector-item {
    display: flex;
    align-items: center;
    font-size: 8px;
    color: #526b80;
    white-space: nowrap;
}

.legend-vector-color {
    display: inline-block;
    width: 11px;
    height: 11px;
    margin-right: 5px;
    border-radius: 2px;
    flex-shrink: 0;
}

.legend-vector-color--line {
    height: 3px;
    border-radius: 1px;
}

.legend-wms-img {
    max-width: 100%;
    height: auto;
}

.legend-empty-text {
    font-size: 12px;
    color: #777;
    font-style: italic;
    margin: 0;
}

/* Títulos de Categoría en la Leyenda */
.legend-group-title {
    font-weight: bold;
    font-size: 9px;
    color: #111;
    border-bottom: 1px solid #d8e0e7;
    padding: 2px 1px 3px;
    border-radius: 0;
    margin-top: 2px;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes legend-fade-in {
    from { opacity: 0; transform: translateY(2px); }
    to { opacity: 1; transform: translateY(0); }
}

.zoom-layer-btn {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin-left: 0.35rem;
    padding: 0;
    color: #38506c;
    background: #eef3f7;
    border: 1px solid #d5e0e9;
    border-radius: 50%;
    font-size: 11px;
    line-height: 1;
    transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.zoom-layer-btn:hover,
.zoom-layer-btn:focus-visible {
    color: #fff;
    background: #315b7d;
    border-color: #315b7d;
    transform: scale(1.08);
}

.obra-interactiva {
    cursor: pointer;
}
