/**
 * @file
 * Mappe Custom - Global styles shared by all Leaflet maps.
 */

/* =============================================
   MAP CONTAINER
   ============================================= */

.mappe-custom-map {
  width: 100%;
  height: 550px;
  z-index: 400;
  position: relative;
}

/* Force circleMarkers to be visible and interactive */
.leaflet-interactive {
  pointer-events: auto;
}

/* =============================================
   LEGEND HELPERS (for layer control)
   ============================================= */

.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  background-color: #db8c48;
  border: 1px solid #000;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.legend-border {
  display: inline-block;
  width: 18px;
  height: 14px;
  border: 2px solid rgba(35, 35, 35, 1);
  margin-right: 6px;
  vertical-align: middle;
  background-color: transparent;
}

/* =============================================
   FULLSCREEN BUTTON - Unicode icon override
   ============================================= */

.leaflet-control-zoom-fullscreen {
  background-image: none !important;
  position: relative;
}

.leaflet-control-zoom-fullscreen::before {
  content: "⛶";
  font-size: 18px;
  font-weight: bold;
  color: #333;
  display: block;
  text-align: center;
  line-height: 26px;
}

/* =============================================
   POPUP TABLE STYLES
   ============================================= */

.leaflet-popup-content table {
  border-collapse: collapse;
  font-size: 13px;
}

.leaflet-popup-content table th,
.leaflet-popup-content table td {
  padding: 2px 6px;
  vertical-align: top;
}

.leaflet-popup-content table th {
  text-align: right;
  white-space: nowrap;
}

.leaflet-popup-content .centro {
  text-align: center;
}

.leaflet-popup-content .maiuscolo {
  text-transform: uppercase;
}

/* =============================================
   LAYER CONTROL - images in labels
   ============================================= */

.leaflet-control-layers label img.middle {
  vertical-align: middle;
  margin-right: 4px;
}

.leaflet-control-layers label img.no_block {
  display: inline;
}

/* =============================================
   LEAFLET LAYERS ICON - fix for CSS aggregation
   breaking relative image paths.
   ============================================= */

.leaflet-control-layers-toggle {
  background-image: url(/modules/contrib/leaflet/js/leaflet/dist/images/layers.png) !important;
}
.leaflet-retina .leaflet-control-layers-toggle {
  background-image: url(/modules/contrib/leaflet/js/leaflet/dist/images/layers-2x.png) !important;
}

/* =============================================
   PM10 LEGEND COLOURS
   ============================================= */

.legenda_iqa {
  font-size: 14px;
  margin-bottom: 10px;
}
.legenda_iqa span {
  display: inline-block;
  padding: 2px 8px;
  margin-right: 2px;
  border-radius: 3px;
  color: #fff;
  font-weight: bold;
}
.legenda_iqa .verde   { background-color: #00b050; }
.legenda_iqa .verdino { background-color: #92d050; color: #333; }
.legenda_iqa .giallo  { background-color: #ffff00; color: #333; }
.legenda_iqa .rosso   { background-color: #ff0000; }
.legenda_iqa .viola   { background-color: #7030a0; }
