html, body {
  height: 100%;
  margin: 0;
}

/* Kartta */
#map {
  height: 90vh;
  width: 100%;
}

/* Yläpalkin kontrollit */
#controls {
  padding: 10px;
  background: #f0f0f0;
}

button {
  margin-right: 10px;
}

/* Kamerapainike */
#kameraBtn {
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
}

#kameraBtn:hover {
  background-color: #f0f0f0;
}

/* Kaikki palstat -painike */
#kaikkiKuvatBtn {
  padding: 6px 12px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

#kaikkiKuvatBtn i {font-size: 16px;
}

/* Kiinteistötunnus-labelit */
.ktunnus-label .ktunnus-box {
  display: inline-block;
  font-size: 14px;
  font-weight: bold;
  background: white;
  border: 2px solid #333;
  border-radius: 6px;
  padding: 6px 10px;
  min-width: 160px;     /* 🔹 noin 2× nykyinen */
  text-align: Left;  /* 🔹 näyttää arvokkaammalta */

  color: black;
  white-space: nowrap;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.25);
}


/* Area labelit */
.area-tooltip {
  background: white;
  border: 1px solid black;
  color: black;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
}

.area-label {
  background: white;
  border: 2px solid #000;
  border-radius: 6px;
  padding: 6px 10px;
  min-width: 70px;
  text-align: center;
  font-family: sans-serif;
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.3);
}

/* ===== Moderni liukupalkki ===== */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 120px;
  height: 6px;
  background: linear-gradient(
    to right,
    #1976d2 0%,
    #1976d2 50%,
    #ddd 50%,
    #ddd 100%
  );
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}

/* Chrome / Edge */
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border: 2px solid #1976d2;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

/* Firefox */
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #ffffff;
  border: 2px solid #1976d2;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
/* --- Yleinen ulkoasu yläpalkille --- */
#controls{
  padding: 10px 12px;
  background: #f6f7f9;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* --- Painikkeet --- */
#controls button{
  appearance: none;
  border: 1px solid rgba(0,0,0,0.12);
  background: #ffffff;
  color: #111;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
  transition: transform .08s ease, box-shadow .12s ease, background .12s ease;
}

#controls button:hover{
  background: #fbfbfc;
  box-shadow: 0 4px 14px rgba(0,0,0,0.10);
  transform: translateY(-1px);
}

#controls button:active{
  transform: translateY(0px);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* --- “Päätoiminto” (Hae kiinteistöt) --- */
#controls button.primary{
  background: #0f5bd6;
  border-color: rgba(0,0,0,0.0);
  color: #fff;
}

#controls button.primary:hover{
  background: #0d52c3;
}

/* --- “Vaara / poisto” (Poista mittaukset) --- */
#controls button.danger{
  background: #fff;
  border-color: rgba(220,38,38,0.35);
  color: #b91c1c;
}

#controls button.danger:hover{
  background: rgba(220,38,38,0.06);
}

/* --- Input-kenttä siistiksi --- */
#controls input[type="text"]{
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.14);
  background: #fff;
  font-size: 14px;
  outline: none;
}

#controls input[type="text"]:focus{
  border-color: rgba(15,91,214,0.55);
  box-shadow: 0 0 0 3px rgba(15,91,214,0.15);
}
#kameraBtn{
  background:#fff;
  border:1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 7px 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
#kameraBtn:hover{
  box-shadow: 0 4px 14px rgba(0,0,0,0.10);
  transform: translateY(-1px);
}
#controls .break{
  flex-basis: 100%;
  height: 0;
}
#branding {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);

  z-index: 1000;
  background: rgba(255,255,255,0.9);
  padding: 6px 16px;
  border-radius: 12px;

  font-family: "Segoe UI", Roboto, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.4px;

  color: #555;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.25);
  pointer-events: none;
}

#branding span {
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #222;
}
