#map {
  position: absolute;
  top: 50px; /* Altezza della topbar */
  bottom: 0;
  left: 0;
  right: 0;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden; /* se vuoi togliere scrollbar, altrimenti togli */
}



/* ==========================================================================
   STILE PER IL CONTROL LAYER
   ========================================================================== */

.layer-control-container {
  position: relative;
  display: flex;
  flex-direction: column;
}

.layer-toggle-btn {
  background: white;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  width: 34px;
  height: 34px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.layer-control-panel {
  position: absolute;  /* oppure fixed se vuoi che non si muova scrollando */
  bottom: 20px;        /* margine dal basso */
  right: 40px;         /* margine da destra */
  z-index: 10;
  background: white;
  font-family: sans-serif;
  font-size: 13px;
  padding: 8px;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  max-height: 180px;
  overflow-y: auto;
  min-width: 180px;
  display: none;       /* di default nascosto */
}

.layer-checkbox {
  display: block;
  margin-bottom: 6px;
  white-space: nowrap;
}





/* ==========================================================================
   STILE PER LA LEGENDA
   ========================================================================== */


.control-icon {
  font-size: 20px;
  cursor: pointer;
}

.map-legend-box {
  position: absolute;
  bottom: 10px;      /* qui la mettiamo in basso */
  left: 10px;        /* e a sinistra */
  z-index: 10;
  background: white;
  padding: 10px;
  border: 1px solid #ccc;
  font-size: 14px;
  width: 180px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  border-radius: 4px;
}

.map-legend-box.hidden {
  display: none;
}

.legend-color,
.legend-line,
.legend-point {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  vertical-align: middle;
}

.legend-line {
  border-bottom: 2px solid;
  height: 0;
  width: 16px;
}

.legend-point {
  border-radius: 50%;
}


