/* style.css */

/* Contexto:
   - canvas/fondo blanco
   - todo lo demás negro (polígonos, texto, UI)
   Consecuencias:
   - canvas/fondo negro
   - todo lo demás blanco
*/
body.mode-contexto { --bg:#ffffff; --fg:#000000; }
body.mode-consecuencias { --bg:#000000; --fg:#ffffff; }

html, body { height: 100%; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

#app{ height: 100%; position: relative; }
#map{
  height: 100%;
  width: 100%;
  background: var(--bg);
}

/* Botón inferior */
.switch{
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: inline-flex;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--fg);
  background: var(--bg);
  z-index: 1000;
}

.switch-btn{
  padding: 10px 14px;
  font: inherit;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--fg);
  letter-spacing: 0.2px;
}

.switch-btn.is-active{
  background: var(--fg);
  color: var(--bg);
}

/* Mensajes (si falta el geojson) */
.status{
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 1000;
  font-size: 12px;
  line-height: 1.2;
  padding: 8px 10px;
  border: 1px solid var(--fg);
  background: var(--bg);
  color: var(--fg);
  border-radius: 10px;
  max-width: min(520px, calc(100% - 36px));
  display: none;
}
.status.is-visible{ display: block; }

/* Leaflet: que todo herede el régimen */
.leaflet-container{ background: var(--bg) !important; }

.leaflet-control-zoom a{
  background: var(--bg) !important;
  color: var(--fg) !important;
  border-color: var(--fg) !important;
}

.leaflet-control-attribution{
  background: var(--bg) !important;
  color: var(--fg) !important;
  border-color: var(--fg) !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip{
  background: var(--bg) !important;
  color: var(--fg) !important;
  border: 1px solid var(--fg) !important;
  box-shadow: none !important;
}
.leaflet-popup-close-button{ color: var(--fg) !important; }
