.lms-map-wrapper{max-width:100%}
.lms-map{position:relative;width:100%;min-height:220px;border-radius:18px;overflow:hidden;box-shadow:none !important;background:#fff}
.lms-map canvas{border-radius:18px}
.lms-marker{width:24px;height:24px;position:relative}
.lms-marker-inner{width:22px;height:22px;background:var(--lms-marker,#b77512);border-radius:999px;border:2px solid rgba(255,255,255,.95);box-shadow:0 3px 6px rgba(0,0,0,.25);position:relative}
.lms-marker-inner:after{content:"";position:absolute;left:50%;top:90%;width:0;height:0;margin-left:-4px;border-width:6px 4px 0 4px;border-style:solid;border-color:var(--lms-marker,#b77512) transparent transparent transparent}
.lms-marker-img{display:block;max-width:36px;max-height:36px}
.lms-map .maplibregl-ctrl-attrib{background:transparent!important;border:none!important;box-shadow:none!important;font-size:10px;color:rgba(94,86,74,.45);padding:2px 6px;display:none}
.lms-map .maplibregl-ctrl-group>button{background:rgba(255,255,255,.92);border-radius:10px!important;border:none}
.lms-map .maplibregl-ctrl-group>button+button{margin-top:2px}
.lms-map .maplibregl-ctrl-group>button:hover{background:#fff}
.lms-map .maplibregl-ctrl-attrib.lms-attrib-collapsed .maplibregl-ctrl-attrib-inner{display:none}
.lms-map-loading{position:absolute;inset:0;background:#ffffff;z-index:20;opacity:1;pointer-events:auto;transition:opacity .4s ease}
.lms-map-loading.lms-loaded{opacity:0;pointer-events:none}
#lms-preview-map{position:relative}
#lms-preview-map .lms-fade-overlay{position:absolute;inset:0;background:#fff;opacity:0;pointer-events:none;transition:opacity 1s ease;z-index:15}

/* Popup: X in alto a destra, ben visibile e non sopra il testo */
.lms-map .maplibregl-popup-content{
  padding-right:22px;
  letter-spacing: 0.2px;
}
.lms-map .maplibregl-popup-close-button{
  top:6px;
  right:8px;
  left:auto;
  color:#000 !important;
  font-size:14px !important;
  font-weight:bold !important;
  opacity:0.75 !important;
  background:none !important;
  border:none !important;
  line-height:1 !important;
  padding:0 !important;
}
.lms-map .maplibregl-popup-close-button:hover{
  opacity:1 !important;
  cursor:pointer;
}
.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button {
    display: none !important;
}

/* --- Fix Elementor solo desktop: la mappa deve stare sopra a .elementor-container z:20 --- */
@media (min-width: 1025px){
  .lms-map-wrapper{
    position: relative;
    isolation: isolate;   /* nuovo stacking context indipendente */
    z-index: 30;          /* più alto del 20 del container Elementor */
  }
  .lms-map{ position: relative; z-index: 1; }
  .lms-map .maplibregl-ctrl-top-right,
  .lms-map .maplibregl-ctrl-top-left,
  .lms-map .maplibregl-ctrl-bottom-right,
  .lms-map .maplibregl-ctrl-bottom-left{ z-index: 5; }
  .lms-map .maplibregl-ctrl-group,
  .lms-map .maplibregl-ctrl-group > button{ position: relative; z-index: 10; }
}