/* MBC Atlante: stile popup luoghi, isolato dalle altre finestre del sito */
.mbca-map .leaflet-popup-content-wrapper{border-radius:12px;overflow:hidden;}
.mbca-map .leaflet-popup-content{width: min(300px, calc(100vw - 85px)) !important;max-width:300px;margin:0;}
:is(.mbca-map,.mbca-text-popup) .mbca-place-popup{padding:13px;box-sizing:border-box;font-family:inherit;color:#252525;}
:is(.mbca-map,.mbca-text-popup) .mbca-place-popup-image{display:block;width:100%;height:auto;aspect-ratio:3/2;object-fit:cover;border-radius:8px;margin:0 0 12px;}
:is(.mbca-map,.mbca-text-popup) .mbca-place-popup-title{font-weight:800;font-size:19px;line-height:1.25;margin:0 0 3px;}
:is(.mbca-map,.mbca-text-popup) .mbca-place-popup-type{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.035em;color:#d22125;line-height:1.35;margin:0 0 6px;}
:is(.mbca-map,.mbca-text-popup) .mbca-place-popup-description{font-size:13px;line-height:1.5;margin:12px 0;color:#333;}
:is(.mbca-map,.mbca-text-popup) .mbca-place-popup-link{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:#ce2427;color:#fff!important;text-decoration:none!important;font-weight:750;font-size:13px;line-height:1.2;padding:11px 16px;border-radius:999px;margin-top:11px;transition:background-color .15s ease;}
:is(.mbca-map,.mbca-text-popup) .mbca-place-popup-link:hover,:is(.mbca-map,.mbca-text-popup) .mbca-place-popup-link:focus-visible{background:#a91e22;color:#fff!important;outline-offset:2px;}
@media(max-width:480px){:is(.mbca-map,.mbca-text-popup) .mbca-place-popup{padding:11px}:is(.mbca-map,.mbca-text-popup) .mbca-place-popup-title{font-size:17px}}

/* Pulsante di chiusura dei popup Luoghi: target 34px, contrasto e focus accessibili. */
.mbca-map .leaflet-popup-close-button {
  position:absolute;
  top:7px;
  right:7px;
  z-index:1000;
  display:flex !important;
  align-items:center;
  justify-content:center;
  width:34px !important;
  height:34px !important;
  padding:0 !important;
  border:1px solid #d3d8de !important;
  border-radius:50% !important;
  background:#fff !important;
  color:#262b30 !important;
  box-shadow:0 2px 8px rgba(0,0,0,.20);
  font-family:Arial,Helvetica,sans-serif !important;
  font-size:26px !important;
  font-weight:500 !important;
  line-height:1 !important;
  text-decoration:none !important;
  opacity:1 !important;
  box-sizing:border-box;
}
.mbca-map .leaflet-popup-close-button:hover,
.mbca-map .leaflet-popup-close-button:focus-visible {
  color:#fff !important;
  background:#b82226 !important;
  border-color:#b82226 !important;
  box-shadow:0 2px 10px rgba(0,0,0,.26);
}
.mbca-map .leaflet-popup-close-button:focus-visible {
  outline:3px solid #1f65b4;
  outline-offset:2px;
}


/* Controlli mappa: sfondi e strati tematici distinti, entrambi in alto a destra. */
.mbca-map .leaflet-top.leaflet-right .leaflet-control{margin-top:12px;margin-right:12px;}
.mbca-map .leaflet-control-layers{border:1px solid rgba(0,0,0,.10);border-radius:10px;box-shadow:0 2px 10px rgba(0,0,0,.15);overflow:hidden;background:#fff;}
.mbca-map .leaflet-control-layers-toggle{display:block;width:40px;height:40px;background-color:#fff;background-size:22px 22px;background-position:center;background-repeat:no-repeat;}
.mbca-map .leaflet-control-layers-expanded{padding:10px 12px 10px 12px;border-radius:10px;min-width:220px;}
.mbca-map .leaflet-control-layers-selector{margin-right:6px;}
.mbca-map .leaflet-control-layers-list label{font-size:13px;line-height:1.35;}
.mbca-map .mbca-basemap-control .leaflet-control-layers-toggle{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23222' d='M3.5 6.4c0-.37.2-.71.53-.88l4.4-2.22a1 1 0 0 1 .89 0L14 5.62l4.17-2.3a1 1 0 0 1 .98.01l2.34 1.28c.32.18.52.51.52.88v12.1c0 .37-.2.71-.53.88l-2.82 1.43a1 1 0 0 1-.93-.01L14 18.02l-4.15 1.95a1 1 0 0 1-.86-.01L3.98 17.4a1 1 0 0 1-.48-.86V6.4Zm6.02-1.12v12.5l3.48-1.63V5.67L9.52 4.28Zm-4 1.74v8.93l2 1.1V6.02l-2 1Zm14.5.06-5 2.76v8.19l4 1.95 1-.5V7.08Z'/%3E%3C/svg%3E") !important;}
.mbca-map .mbca-overlay-control .leaflet-control-layers-toggle{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23222' d='M12 3 2.6 7.7a1 1 0 0 0 0 1.79L12 14.2l9.4-4.71a1 1 0 0 0 0-1.79L12 3Zm0 7.96L5.28 7.6 12 4.24l6.72 3.36L12 10.96Zm-8.46 1.8a1 1 0 0 0-.94 1.76l8.94 4.78a1 1 0 0 0 .92 0l8.94-4.78a1 1 0 1 0-.94-1.76L12 17.36l-8.46-4.6Zm0 4.44a1 1 0 0 0-.94 1.76l8.94 4.78a1 1 0 0 0 .92 0l8.94-4.78a1 1 0 1 0-.94-1.76L12 21.8l-8.46-4.6Z'/%3E%3C/svg%3E") !important;}
.mbca-map .leaflet-control-layers-toggle:hover,.mbca-map .leaflet-control-layers-toggle:focus-visible{background-color:#f7f7f7;outline:none;}

/* Legenda classificazione Uso del suolo (presente solo con strato attivo). */
.mbca-map .mbca-landuse-legend{background:#fff;color:#242424;border:1px solid #d7d7d7;border-radius:8px;box-shadow:0 2px 8px #0002;font:13px/1.4 Arial,Helvetica,sans-serif;max-width:min(285px,calc(100vw - 65px));}
.mbca-map .mbca-landuse-legend summary{cursor:pointer;padding:9px 12px;font-weight:700;user-select:none;}
.mbca-map .mbca-landuse-legend summary:focus-visible{outline:2px solid #1f65b4;outline-offset:-2px;}
.mbca-map .mbca-landuse-legend ul{padding:0 12px 10px;margin:0;list-style:none;}
.mbca-map .mbca-landuse-legend li{display:flex;align-items:center;gap:8px;margin:5px 0;}
.mbca-map .mbca-landuse-swatch{display:inline-block;flex:0 0 15px;width:15px;height:15px;border:1px solid #0002;border-radius:2px;}

/* v0.4.10 - I due pulsanti rimangono visibili anche quando i pannelli sono aperti. */
.mbca-map .mbca-basemap-control.leaflet-control-layers-expanded .leaflet-control-layers-toggle,
.mbca-map .mbca-overlay-control.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
  display:block !important;
  position:relative;
  cursor:pointer;
}
.mbca-map .mbca-basemap-control.leaflet-control-layers-expanded,
.mbca-map .mbca-overlay-control.leaflet-control-layers-expanded {
  padding:0 0 8px 0;
}
.mbca-map .mbca-basemap-control.leaflet-control-layers-expanded .leaflet-control-layers-list,
.mbca-map .mbca-overlay-control.leaflet-control-layers-expanded .leaflet-control-layers-list {
  display:block;
  padding:0 12px 4px;
}

.mbca-map .mbca-thematic-legend ul{max-height:220px;overflow-y:auto;}
