/* ===========================================================
   Bravo Murillo — renta y bloque ganador (MapLibre), estilo elDiario.es.
   Autocontenido: no depende de charts_atlas_renta.css.
   =========================================================== */

:root {
  --ed-fuente: 'Encode Sans', 'Helvetica Neue', Arial, sans-serif;
  --ed-negro: #1a1a1a;
  --ed-texto-suave: #4a4a4a;
  --ed-gris-500: #939393;
}

#mapa-bravo-murillo { max-width: 980px; margin: 0 auto; text-align: left; font-family: var(--ed-fuente); }
#mapa-bravo-murillo, #mapa-bravo-murillo *,
.mapbox-popup-contenedor, .mapbox-popup-contenedor * { box-sizing: border-box; }

/* Cabecera de la casa. */
.bm-mapa .ed-titulo {
  font-family: var(--ed-fuente); font-weight: 700; color: var(--ed-negro);
  font-size: 22px; line-height: 1.2; margin: 0 0 4px; text-align: left;
}
.bm-mapa .ed-subtitulo {
  font-family: var(--ed-fuente); color: var(--ed-texto-suave); font-size: 14px;
  margin: 0 0 18px; text-align: left; max-width: 820px; line-height: 1.4;
}
.bm-mapa .ed-fuente {
  font-family: var(--ed-fuente); color: var(--ed-gris-500); font-size: 12px;
  margin: 12px 2px 0; line-height: 1.4; text-align: left;
}

/* Dos mapas en paralelo; apilados en móvil. */
.bm-mapa .bm-paneles { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .bm-mapa .bm-paneles { grid-template-columns: 1fr; } }

.bm-mapa .bm-subt {
  font-family: var(--ed-fuente); font-size: 15px; font-weight: 700; color: var(--ed-negro);
  margin: 0 0 8px; text-align: left;
}

/* Leyenda ESTÁTICA encima del mapa (fuera). */
.bm-mapa .bm-leyenda {
  font-family: var(--ed-fuente); font-size: 13px; color: var(--ed-negro); margin: 0 0 8px; min-height: 34px;
}
.bm-mapa .bm-leyenda-cat { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.bm-mapa .bm-leyenda-item { display: inline-flex; align-items: center; white-space: nowrap; }
.bm-mapa .bm-leyenda-muestra { width: 14px; height: 14px; border-radius: 2px; display: inline-block; margin-right: 7px; flex: none; }
.bm-mapa .bm-leyenda-escala .ed-leyenda-escala { display: flex; width: 100%; max-width: 300px; }
.bm-mapa .bm-leyenda-escala .ed-leyenda-bloque { flex: 1 1 auto; height: 11px; }
.bm-mapa .bm-leyenda-escala .ed-leyenda-labels { display: flex; justify-content: space-between; max-width: 300px; margin-top: 4px; }
.bm-mapa .bm-leyenda-escala .ed-leyenda-label { font-size: 12px; color: var(--ed-gris-500); font-variant-numeric: tabular-nums; }

/* Caja del mapa (bloqueado). */
.bm-mapa .bm-mapwrap { position: relative; }
.bm-mapa .bm-mapbox { width: 100%; height: 500px; background: #e9e9e7; }
@media (max-width: 760px) { .bm-mapa .bm-mapbox { height: 430px; } }

/* ===== Tooltip (copiado del atlas de la renta) ===== */
.mapbox-popup-contenedor { opacity: 1; font-family: var(--ed-fuente); z-index: 100; }
.mapbox-popup-contenedor .maplibregl-popup-content { width: 240px; max-width: 240px; padding: 12px 12px 10px; }
.mapbox-tooltip-contenedor h3 { margin: 5px 0; font-size: 14px; }
.mapbox-tooltip-contenedor p { font-size: 12px; margin: 0; }
.mapbox-tooltip-contenedor .tt-cabecera {
  text-align: left; margin: 0 0 10px; font-weight: 700; border-bottom: 0.5px solid #c5c5c5; padding-bottom: 5px;
}
.mapbox-tooltip-contenedor .tt-codigo { font-size: 12px; font-weight: 400; color: #4c4c4c; }
.mapbox-tooltip-contenedor .tt-cajas { display: flex; gap: 8px; margin-top: 8px; }
.mapbox-tooltip-contenedor .tt-caja {
  flex: 1 1 0; display: flex; flex-direction: column; justify-content: center; padding: 8px;
  border: 1px dashed #c5c5c5; text-align: center;
}
.mapbox-tooltip-contenedor .tt-caja-pie { font-size: 11px; font-weight: 400; line-height: 1.25; }
.mapbox-tooltip-contenedor .tt-caja-valor { font-size: 18px; font-weight: 700; margin: 2px 0; }
.mapbox-tooltip-contenedor .tt-etiqueta {
  margin: 12px 0 4px; text-transform: uppercase; font-weight: 400; color: #686868; font-size: 11px;
}
.mapbox-tooltip-contenedor .tt-barra { background-color: #c5c5c5; height: 12px; width: 100%; display: block; position: relative; }
.mapbox-tooltip-contenedor .tt-marca { width: 3px; height: 12px; display: block; background-color: #000; position: absolute; top: 0; }
.mapbox-tooltip-contenedor .tt-barra-texto { line-height: 1.2; margin: 6px 0 0; text-align: center; font-size: 12px; }
.mapbox-tooltip-contenedor .tt-sindatos { margin-top: 10px; border: 1px dashed #c5c5c5; padding: 15px; text-align: center; }
.mapbox-tooltip-contenedor .tt-sindatos-titulo { text-transform: uppercase; font-weight: 600; color: #686868; font-size: 11px; }
.mapbox-tooltip-contenedor .tt-sindatos-texto { font-weight: 400; color: #999; font-size: 11px; margin-top: 4px; }
