/* ============================================================================
 *  _seccion_map.css — Componente Leaflet reutilizable (Fénix dark)
 *  Consumido por: resumen.php, seccional.php, cara_a_cara.php
 * ========================================================================== */

/* Contenedor base */
.seccion-map-canvas {
    width: 100%;
    height: 100%;
    min-height: 320px;
    background: #0a0f1e;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}
.seccion-map-canvas.is-loading::before {
    content: 'Cargando cartografía…';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 10;
}
.seccion-map-canvas { position: relative; }

/* ── Overrides Leaflet para tema oscuro Fénix ───────────────────────────── */
.leaflet-container {
    background: #0a0f1e !important;
    font-family: 'Montserrat', sans-serif;
}
.leaflet-control-attribution {
    background: rgba(0,0,0,0.6) !important;
    color: rgba(255,255,255,0.5) !important;
    font-size: 0.55rem !important;
}
.leaflet-control-attribution a {
    color: rgba(255,255,255,0.7) !important;
}
.leaflet-control-zoom a {
    background: rgba(20,30,50,0.9) !important;
    color: #fff !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
}
.leaflet-control-zoom a:hover {
    background: rgba(0,87,184,0.8) !important;
    color: #fff !important;
}
.leaflet-popup-content-wrapper {
    background: rgba(15,23,42,0.96) !important;
    color: #fff !important;
    border-radius: 10px !important;
    border: 1px solid rgba(0,212,255,0.4) !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6) !important;
}
.leaflet-popup-tip {
    background: rgba(15,23,42,0.96) !important;
    border: 1px solid rgba(0,212,255,0.4) !important;
}
.leaflet-popup-close-button {
    color: rgba(255,255,255,0.6) !important;
}
.leaflet-popup-content {
    margin: 12px 14px !important;
    font-size: 0.78rem !important;
    line-height: 1.45 !important;
}
.leaflet-popup-content .pop-title {
    font-weight: 900;
    font-size: 0.85rem;
    color: #00d4ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    padding-bottom: 4px;
}
.leaflet-popup-content .pop-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 2px 0;
    font-size: 0.72rem;
}
.leaflet-popup-content .pop-row .lbl { color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.4px; }
.leaflet-popup-content .pop-row .val { color: #fff; font-weight: 800; }

/* ── Leyenda táctica ────────────────────────────────────────────────────── */
.seccion-map-legend {
    background: rgba(15,23,42,0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 10px 12px;
    color: #fff;
    font-size: 0.65rem;
    line-height: 1.5;
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    max-width: 220px;
}
.seccion-map-legend .leg-title {
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #00d4ff;
    font-size: 0.62rem;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 4px;
}
.seccion-map-legend .leg-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 1px 0;
}
.seccion-map-legend .leg-swatch {
    width: 14px; height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(255,255,255,0.15);
    flex-shrink: 0;
}
.seccion-map-legend .leg-label {
    color: rgba(255,255,255,0.85);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-size: 0.6rem;
}

/* ── Etiqueta numérica de sección ───────────────────────────────────────── */
.seccion-label-marker {
    background: transparent;
    border: none;
    color: #fff;
    font-weight: 900;
    font-size: 0.75rem;
    text-shadow: 0 0 4px #000, 0 0 6px #000, 0 0 8px rgba(0,212,255,0.6);
    text-align: center;
    pointer-events: none;
}

/* Filtro CSS para oscurecer tiles OSM (apariencia dark) */
.osm-dark-tile {
    filter: brightness(0.55) contrast(1.15) saturate(0.7) hue-rotate(190deg);
}
