html, body { 
  height:100%; 
  margin:0; 
}

#map { 
  height:100%; 
  width:100%; 
  position:absolute; 
  top:0; 
  bottom:0; 
  left:0; 
  right:0; 
}

/* -------- FADE-IN/OUT FÖR INFO-RUTAN -------- */
#info {
  position: absolute;
  top: 1em;
  left: 1em;
  background: rgba(255,255,255,0.95);
  padding: 1em;
  border-radius: 6px;
  max-width: 220px;
  z-index: 1000;
  font-family: sans-serif;

  /* Fade + Zoom */
  opacity: 1;
  transform: scale(1);
  transition:
      opacity .35s ease,
      transform .35s ease;
}

#info.hidden {
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
}

/* --------------------------------------------- */

#controls {
  background: rgba(255,255,255,0.95);
  padding: 0.5em 0;
  border-radius: 6px;
  font-family: sans-serif;
}

#controls label { 
  display:block; 
  margin-bottom:0.3em; 
}

#info h2 { 
  margin:0 0 .5em 0; 
  font-size:1.1em;
}

/* Bold-markering för valt färgläge */
.highlight-bold {
  font-weight: bold;
}

/* -------- RESPONSIV DESIGN FÖR MOBIL OCH SURFPLATTA -------- */
/* För surfplattor (max-width: 768px) */
@media screen and (max-width: 768px) {
  #info {
    max-width: 180px;
    padding: 0.7em;
    top: 0.5em;
    left: 0.5em;
    font-size: 0.9em;
  }

  #info h2 {
    font-size: 1em;
  }

  #controls {
    padding: 0.4em 0;
  }

  #controls label {
    font-size: 0.9em;
    margin-bottom: 0.2em;
  }

  #kommunVal {
    font-size: 0.9em;
  }

  #kommunVal select {
    font-size: 0.9em;
    width: 100%;
  }

  #infoContent {
    font-size: 0.85em;
  }

  #infoIntro {
    font-size: 0.85em;
  }

  .button-container {
    display: flex;
    gap: 0.5em;
  }

  .button-container button {
    flex: 1;
  }
}

/* För mobiltelefoner (max-width: 480px) */
@media screen and (max-width: 480px) {
  #info {
    max-width: 35%;
    width: auto;
    padding: 0.6em;
    top: 0.5em;
    left: 0.5em;
    transform: scale(1);
    font-size: 0.85em;
  }

  #info.hidden {
    transform: scale(0.85);
  }

  #info h2 {
    font-size: 0.95em;
    margin: 0 0 0.3em 0;
  }

  #controls {
    padding: 0.3em 0;
  }

  #controls label {
    font-size: 0.85em;
    margin-bottom: 0.15em;
  }

  #kommunVal {
    font-size: 0.85em;
  }

  #kommunVal select {
    font-size: 0.85em;
    width: 100%;
  }

  #infoContent {
    font-size: 0.8em;
  }

  #infoIntro {
    font-size: 0.8em;
    line-height: 1.3;
  }

  #infoContent button {
    font-size: 0.85em;
    padding: 0.4em 0.8em;
  }

  .button-container {
    display: flex;
    gap: 0.3em;
  }

  .button-container button {
    flex: 1;
    font-size: 0.8em;
    padding: 0.3em 0.6em;
  }

  #info hr {
    margin: 0.5em 0;
  }
}