/* Pinacoteca360 — Leaflet 1.9.4: estilos esenciales de respaldo.
   Cargados desde el propio dominio. Funcionan incluso si la CSS de la CDN
   no se descarga. Se mantiene la CSS oficial si estuviera disponible. */

/* Posicionamiento: indispensable para evitar teselas dispersas o desplazadas */
.leaflet-container { position:relative; overflow:hidden; background:#dce7e6; outline:0; }
.leaflet-container .leaflet-pane,
.leaflet-container .leaflet-tile,
.leaflet-container .leaflet-marker-icon,
.leaflet-container .leaflet-marker-shadow,
.leaflet-container .leaflet-tile-container,
.leaflet-container .leaflet-pane > svg,
.leaflet-container .leaflet-pane > canvas,
.leaflet-container .leaflet-zoom-box,
.leaflet-container .leaflet-image-layer,
.leaflet-container .leaflet-layer { position:absolute; left:0; top:0; }
.leaflet-container .leaflet-tile,
.leaflet-container img.leaflet-image-layer { max-width:none!important; max-height:none!important; }
.leaflet-container .leaflet-tile { padding:0!important; margin:0!important; border:0!important; }
.leaflet-container .leaflet-tile { visibility:hidden; user-select:none; -webkit-user-select:none; }
.leaflet-container .leaflet-tile-loaded { visibility:inherit; }
.leaflet-container img.leaflet-tile { image-rendering:auto; }
.leaflet-pane { z-index:400; }
.leaflet-tile-pane { z-index:200; }
.leaflet-overlay-pane { z-index:400; }
.leaflet-shadow-pane { z-index:500; }
.leaflet-marker-pane { z-index:600; }
.leaflet-tooltip-pane { z-index:650; }
.leaflet-popup-pane { z-index:700; }
.leaflet-map-pane canvas { z-index:100; }
.leaflet-map-pane svg { z-index:200; }
.leaflet-container .leaflet-marker-icon,
.leaflet-container .leaflet-marker-shadow { display:block; }
.leaflet-container .leaflet-overlay-pane svg { -moz-user-select:none; }
.leaflet-container a { -webkit-tap-highlight-color:transparent; }
.leaflet-container a.leaflet-active { outline:2px solid orange; }
.leaflet-container .leaflet-interactive { cursor:pointer; }
.leaflet-container .leaflet-zoom-box { width:0; height:0; border:2px dotted #38f; background:rgba(255,255,255,.35); }
.leaflet-container.leaflet-touch-drag { touch-action:none; }
.leaflet-container.leaflet-touch-zoom { touch-action:pan-x pan-y; }
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom { touch-action:none; }
.leaflet-grab { cursor:grab; }
.leaflet-dragging .leaflet-grab, .leaflet-dragging .leaflet-marker-draggable { cursor:grabbing; }

/* Controles de zoom y atribución */
.leaflet-container .leaflet-control { position:relative; z-index:800; pointer-events:auto; float:left; clear:both; }
.leaflet-container .leaflet-top, .leaflet-container .leaflet-bottom { position:absolute; z-index:1000; pointer-events:none; }
.leaflet-container .leaflet-top { top:0; }
.leaflet-container .leaflet-right { right:0; }
.leaflet-container .leaflet-bottom { bottom:0; }
.leaflet-container .leaflet-left { left:0; }
.leaflet-container .leaflet-left .leaflet-control { margin-left:10px; }
.leaflet-container .leaflet-right .leaflet-control { float:right; margin-right:10px; }
.leaflet-container .leaflet-top .leaflet-control { margin-top:10px; }
.leaflet-container .leaflet-bottom .leaflet-control { margin-bottom:10px; }
.leaflet-container .leaflet-control-zoom,
.leaflet-container .leaflet-bar { border:2px solid rgba(0,0,0,.18); border-radius:5px; background:transparent; box-shadow:0 1px 6px rgba(0,0,0,.23); }
.leaflet-container .leaflet-bar a {
  display:block; width:30px; height:30px; line-height:30px; text-align:center;
  background:#fff; color:#263744; border-bottom:1px solid #ccc;
  font:700 20px/30px Arial, sans-serif; text-decoration:none; cursor:pointer;
}
.leaflet-container .leaflet-bar a:first-child { border-radius:3px 3px 0 0; }
.leaflet-container .leaflet-bar a:last-child { border-radius:0 0 3px 3px; border-bottom:0; }
.leaflet-container .leaflet-bar a:hover { background:#f2f5f5; }
.leaflet-container .leaflet-bar a.leaflet-disabled { cursor:default; color:#bbb; background:#f4f4f4; }
.leaflet-container .leaflet-control-attribution { padding:1px 6px; color:#333; background:rgba(255,255,255,.84); font:11px/1.5 Arial,sans-serif; }
.leaflet-container .leaflet-control-attribution a { color:#137ba1; text-decoration:none; }
.leaflet-container .leaflet-control-attribution a:hover { text-decoration:underline; }
.leaflet-container .leaflet-control-scale-line { padding:2px 5px 1px; border:2px solid #777; border-top:none; background:rgba(255,255,255,.7); font:11px Arial,sans-serif; }

/* Ventanas emergentes y tooltips */
.leaflet-container .leaflet-popup { position:absolute; text-align:center; margin-bottom:20px; }
.leaflet-container .leaflet-popup-content-wrapper { padding:1px; border-radius:12px; text-align:left; background:white; color:#243d45; box-shadow:0 3px 14px rgba(0,0,0,.25); }
.leaflet-container .leaflet-popup-content { margin:13px 20px; line-height:1.4; font-size:13px; min-height:1px; }
.leaflet-container .leaflet-popup-tip-container { width:40px; height:20px; position:absolute; left:50%; margin-left:-20px; overflow:hidden; pointer-events:none; }
.leaflet-container .leaflet-popup-tip { width:17px; height:17px; padding:1px; margin:-10px auto 0; transform:rotate(45deg); background:white; box-shadow:0 3px 14px rgba(0,0,0,.25); }
.leaflet-container .leaflet-popup-close-button { position:absolute; top:0; right:0; padding:4px 4px 0 0; border:none; text-align:center; width:24px; height:24px; font:bold 16px/24px Tahoma,sans-serif; color:#777; text-decoration:none; background:transparent; }
.leaflet-container .leaflet-tooltip { position:absolute; padding:6px; background:#fff; border:1px solid #fff; border-radius:3px; color:#243d45; white-space:nowrap; box-shadow:0 1px 3px rgba(0,0,0,.3); pointer-events:none; font:12px/1.4 system-ui,sans-serif; }

/* Agrupación Leaflet.markercluster: estilo autónomo de respaldo */
.leaflet-container .marker-cluster { border-radius:50%; background:rgba(50,104,111,.25); }
.leaflet-container .marker-cluster div { width:30px; height:30px; margin:5px; border-radius:50%; background:#3a6165; display:flex; justify-content:center; align-items:center; color:#fff; font:700 12px/1 Arial,sans-serif; text-align:center; }
.leaflet-container .marker-cluster span { line-height:1; }
.leaflet-container .marker-cluster-medium { background:rgba(213,177,110,.4); }
.leaflet-container .marker-cluster-medium div { background:#a87b35; }
.leaflet-container .marker-cluster-large { background:rgba(175,127,114,.4); }
.leaflet-container .marker-cluster-large div { background:#935643; }
.leaflet-container .leaflet-cluster-anim .leaflet-marker-icon, .leaflet-container .leaflet-cluster-anim .leaflet-marker-shadow { transition:transform .3s ease-out, opacity .3s ease-in; }

/* Defensa frente a estilos generales del sitio que alteren imágenes y dimensiones */
html,body { max-width:100%; overflow-x:hidden; }
#mapa .leaflet-container, #mapa.leaflet-container { width:100%; height:100%; }
#mapa .leaflet-tile-container { width:auto; height:auto; }
