/* Market 0.6.6 — ripristino struttura Leaflet/MapLibre in caso di CSS CDN assenti.
   Layout della mappa isolato: NON modifica logica GPS, login o posizione dei mostri. */
body.editor-theme .workspace,
body.editor-theme .center-column,
body.editor-theme .map-panel,
body.editor-theme .map-wrap { min-width:0; max-width:100%; }
body.editor-theme .map-panel { overflow:hidden; }
body.editor-theme .map-wrap {
  position:relative; width:100%; overflow:hidden;
  border-radius:14px; isolation:isolate;
}
body.editor-theme #map {
  display:block; position:relative; width:100%; max-width:100%;
  height:565px; overflow:hidden !important; border-radius:14px;
  isolation:isolate; contain:layout paint;
  background:#e9efe8;
}
@media (max-width:860px){body.editor-theme #map{height:480px}}
@media (max-width:590px){body.editor-theme #map{height:57vh;min-height:390px}}
/* Struttura essenziale Leaflet, incorporata nel progetto.
   Serve anche quando un filtro di rete blocca unpkg.com/leaflet.css */
#map.leaflet-container{overflow:hidden!important;position:relative;touch-action:none;outline-offset:1px;font:12px/1.5 Helvetica Neue,Arial,Helvetica,sans-serif}
#map .leaflet-pane,
#map .leaflet-tile,
#map .leaflet-marker-icon,
#map .leaflet-marker-shadow,
#map .leaflet-tile-container,
#map .leaflet-pane>svg,
#map .leaflet-pane>canvas,
#map .leaflet-zoom-box,
#map .leaflet-image-layer,
#map .leaflet-layer {position:absolute;left:0;top:0}
#map .leaflet-map-pane{position:absolute;left:0;top:0;}
#map .leaflet-pane{z-index:400}
#map .leaflet-tile-pane{z-index:200}
#map .leaflet-overlay-pane{z-index:400}
#map .leaflet-shadow-pane{z-index:500}
#map .leaflet-marker-pane{z-index:600}
#map .leaflet-tooltip-pane{z-index:650}
#map .leaflet-popup-pane{z-index:700}
#map .leaflet-zoom-animated{transform-origin:0 0}
#map .leaflet-zoom-hide{visibility:hidden}
#map .leaflet-map-pane canvas{z-index:100}
#map .leaflet-tile{filter:inherit;visibility:hidden;user-select:none;-webkit-user-drag:none}
#map .leaflet-tile-loaded{visibility:inherit}
#map .leaflet-marker-icon,#map .leaflet-marker-shadow{user-select:none;-webkit-user-drag:none}
#map .leaflet-container .leaflet-overlay-pane svg,
#map .leaflet-overlay-pane svg,
#map .leaflet-marker-pane img,
#map .leaflet-shadow-pane img,
#map .leaflet-tile-pane img,
#map img.leaflet-image-layer {max-width:none!important;max-height:none!important}
#map .leaflet-control-container .leaflet-top,
#map .leaflet-control-container .leaflet-bottom {position:absolute;z-index:1000;pointer-events:none}
#map .leaflet-top{top:0}#map .leaflet-bottom{bottom:0}
#map .leaflet-left{left:0}#map .leaflet-right{right:0}
#map .leaflet-control{position:relative;z-index:800;pointer-events:auto}
#map .leaflet-top .leaflet-control{margin-top:10px}
#map .leaflet-bottom .leaflet-control{margin-bottom:10px}
#map .leaflet-left .leaflet-control{margin-left:10px}
#map .leaflet-right .leaflet-control{margin-right:10px}
#map .leaflet-control-zoom{border:2px solid rgba(0,0,0,.2);border-radius:5px;background-clip:padding-box;overflow:hidden}
#map .leaflet-control-zoom a{display:block;background:#fff;color:#27384b;width:30px;height:30px;line-height:30px;text-align:center;text-decoration:none;font:bold 22px/30px Arial,sans-serif;border-bottom:1px solid #ccc}
#map .leaflet-control-zoom a:last-child{border-bottom:0}
#map .leaflet-control-zoom a:hover{background:#f5f5f5}
#map .leaflet-control-attribution{padding:2px 6px;background:rgba(255,255,255,.84);color:#333;font:10px/1.4 Arial,sans-serif;max-width:100%;box-sizing:border-box}
#map .leaflet-control-attribution a{color:#006ba6;text-decoration:none}
#map .leaflet-control-attribution a:hover{text-decoration:underline}
#map .leaflet-popup{position:absolute;text-align:center;margin-bottom:20px}
#map .leaflet-popup-content-wrapper{background:#fff;border-radius:12px;box-shadow:0 4px 12px #0004;padding:1px}
#map .leaflet-popup-content{margin:13px 16px;line-height:1.4;min-width:100px}
#map .leaflet-popup-tip-container{width:40px;height:20px;position:absolute;left:50%;bottom:-20px;margin-left:-20px;overflow:hidden;pointer-events:none}
#map .leaflet-popup-tip{width:17px;height:17px;padding:1px;margin:-10px auto 0;background:white;transform:rotate(45deg);box-shadow:0 3px 12px #0003}
#map .leaflet-popup-close-button{position:absolute;top:0;right:0;border:0;background:transparent;font:20px Arial;color:#555;text-decoration:none;padding:4px 8px}
/* Fallback MapLibre GL: il canvas deve occupare SOLO la superficie Leaflet. */
#map .maplibregl-map{position:relative;overflow:hidden;width:100%;height:100%;font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;-webkit-tap-highlight-color:transparent}
#map .maplibregl-canvas-container{position:absolute;left:0;top:0;width:100%;height:100%}
#map canvas.maplibregl-canvas{display:block;position:absolute;left:0;top:0;max-width:none!important;max-height:none!important}
#map .maplibregl-control-container{position:absolute;inset:0;pointer-events:none}
#map .maplibregl-control-container>*{pointer-events:auto}
body.editor-theme .map-foot{position:relative;z-index:1;overflow-wrap:anywhere}
