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


/* Vyskakovací okno */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content {
  background: #ffffff;
  padding: 28px 32px;
  border-radius: 14px;
  max-width: 520px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

.modal-content h2 {
  margin-top: 0;
  font-size: 20px;
}

.modal-content p {
  font-size: 14px;
  color: #374151;
}

#close-modal {
  margin-top: 16px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: #2563eb;
  color: white;
  font-size: 13px;
  cursor: pointer;
}

#close-modal:hover {
  background: #1d4ed8;
}


body {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

#map {
  background: #fff;
}

/* Titulek */
#title {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1000;
  padding: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111827;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  text-shadow:
    0 1px 2px rgba(255,255,255,0.85),
    0 0 10px rgba(255,255,255,0.55);
}

/* Podtitulek */
#subtitle {
  position: absolute;
  top: 50px;
  left: 14px;
  z-index: 1000;
  padding: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4b5563;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  text-shadow:
    0 1px 2px rgba(255,255,255,0.85),
    0 0 8px rgba(255,255,255,0.5);
}

/* Popisky */
.kraj-label {
  background: transparent;
  border: none;
  box-shadow: none;
  color: #111827;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    0 1px 2px rgba(255,255,255,0.96),
    0 0 6px rgba(255,255,255,0.96);
}

/* Legenda */
.legend {
  position: static;
  min-width: 140px;
  width: max-content;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
  border-radius: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  line-height: 18px;
  color: #1f2937;
  text-align: left;
  white-space: nowrap;
  text-shadow:
    0 1px 2px rgba(255,255,255,0.92),
    0 0 6px rgba(255,255,255,0.8);
}

.legend i {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  margin-bottom: 2px;
  vertical-align: middle;
  float: none;
  opacity: 0.95;
  border-radius: 3px;
}

.leaflet-top.leaflet-right .legend {
  margin-top: 14px;
  margin-right: 14px;
}

/* Vlastní ovládací panel */
.leaflet-top.leaflet-left .leaflet-control-layers.leaflet-bar {
  margin-top: 86px;
  margin-left: 14px;
}

.leaflet-control-layers.leaflet-bar {
  border: none !important;
  border-radius: 10px !important;
  overflow: hidden;
  background: rgba(255,255,255,0.82) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12) !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.leaflet-control-layers.leaflet-bar > div {
  padding: 10px !important;
  min-width: 182px;
  box-sizing: border-box;
}

.leaflet-control-layers.leaflet-bar label {
  display: block;
  margin: 0 0 4px 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.leaflet-control-layers.leaflet-bar select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 12px;
  color: #1f2937;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 8px;
  padding: 7px 28px 7px 10px;
  line-height: 1.2;
  outline: none;
  box-sizing: border-box;
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.leaflet-control-layers.leaflet-bar select:hover {
  border-color: rgba(15,23,42,0.20);
  background: #fff;
}

.leaflet-control-layers.leaflet-bar select:focus {
  border-color: rgba(37,99,235,0.45);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.10);
  background: #fff;
}

.leaflet-control-layers.leaflet-bar .control-group {
  margin-bottom: 8px;
}

.leaflet-control-layers.leaflet-bar .control-group:last-child {
  margin-bottom: 0;
}

/* Zoom */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12) !important;
  border-radius: 10px !important;
  overflow: hidden;
}

.leaflet-control-zoom a {
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 18px !important;
  font-weight: 500;
  color: #1f2937 !important;
  background: rgba(255,255,255,0.82) !important;
  border: none !important;
  transition: background 0.15s ease, color 0.15s ease;
}

.leaflet-control-zoom a:hover {
  background: rgba(255,255,255,0.96) !important;
  color: #000 !important;
}

.leaflet-control-zoom a:first-child {
  border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}

/* Měřítko */
.leaflet-control-scale-line {
  border: 2px solid #000 !important;
  border-top: none !important;
  background: transparent;
  color: #000;
  font-size: 11px;
  font-weight: normal;
  padding: 2px 6px 1px 6px;
  box-shadow: none;
  text-shadow: none;
}

.leaflet-bottom.leaflet-left {
  width: 100%;
  pointer-events: none;
}

.leaflet-control-scale {
  pointer-events: auto;
  margin: 0 0 12px 14px !important;
}

/* Popup */
.leaflet-popup-content-wrapper {
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.16);
}

.leaflet-popup-content {
  margin: 12px 14px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

/* Credits */
#credits {
  position: absolute;
  bottom: 20px;
  right: 14px;
  z-index: 1000;

  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  line-height: 1.4;
  text-align: right;

  color: #374151;

  /* jemná čitelnost přes mapu */
  text-shadow:
    0 1px 2px rgba(255,255,255,1),
    0 0 6px rgba(255,255,255,1);
}

/* Doladění pro menší obrazovky */
@media (max-width: 900px) {
  #title {
    font-size: 24px;
  }

  #subtitle {
    top: 44px;
    font-size: 10px;
  }

  .leaflet-top.leaflet-left .leaflet-control-layers.leaflet-bar {
    margin-top: 84px;
  }

  .leaflet-control-layers.leaflet-bar > div {
    min-width: 170px;
  }

  .legend {
    font-size: 11px;
    line-height: 17px;
  }
}
