/* Obecné zaujímavosti – v1.66
   Mapa: vlastný SVG overlay v Leaflet overlayPane.
   Detail kraja: dropdown multiselect okresov s checkboxmi. */
html.oz-redesign-v166 body[data-oz-page="map"] #public-map {
  position: relative;
  overflow: hidden !important;
}

/* Vypnutie starých pokusných boundary vrstiev, ktoré sa bili s mapou. */
html.oz-redesign-v166 body[data-oz-page="map"] .oz-v162-manual-boundaries,
html.oz-redesign-v166 body[data-oz-page="map"] .oz-v164-boundaries-svg,
html.oz-redesign-v166 body[data-oz-page="map"] .oz-v165-boundaries-svg,
html.oz-redesign-v166 body[data-oz-page="map"] .oz-v160-boundary-layer,
html.oz-redesign-v166 body[data-oz-page="map"] .oz-v159-boundary-layer,
html.oz-redesign-v166 body[data-oz-page="map"] .oz-v158-boundary-layer,
html.oz-redesign-v166 body[data-oz-page="map"] .oz-v157-boundary-layer,
html.oz-redesign-v166 body[data-oz-page="map"] .oz-v156-boundary-layer,
html.oz-redesign-v166 body[data-oz-page="map"] .oz-v155-boundary-layer,
html.oz-redesign-v166 body[data-oz-page="map"] .public-boundary-layer {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

html.oz-redesign-v166 body[data-oz-page="map"] .leaflet-tile-pane { z-index: 200 !important; }
html.oz-redesign-v166 body[data-oz-page="map"] .leaflet-overlay-pane { z-index: 410 !important; }
html.oz-redesign-v166 body[data-oz-page="map"] .leaflet-shadow-pane { z-index: 500 !important; }
html.oz-redesign-v166 body[data-oz-page="map"] .leaflet-marker-pane { z-index: 600 !important; }
html.oz-redesign-v166 body[data-oz-page="map"] .leaflet-tooltip-pane { z-index: 650 !important; }
html.oz-redesign-v166 body[data-oz-page="map"] .leaflet-popup-pane { z-index: 700 !important; }

html.oz-redesign-v166 body[data-oz-page="map"] .oz-v166-territory-svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: visible !important;
  pointer-events: none !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 1;
}

html.oz-redesign-v166 body[data-oz-page="map"] .oz-v166-territory-path {
  pointer-events: none !important;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  stroke-linecap: round;
  fill-rule: evenodd;
  paint-order: stroke fill;
  filter: drop-shadow(0 0 1.2px rgba(255,255,255,.98));
}

html.oz-redesign-v166 body[data-oz-page="map"] .oz-v166-territory-cadastral {
  fill: rgba(18, 93, 168, .016);
  stroke: #125da8;
  stroke-width: 1.8px;
  stroke-opacity: .95;
  stroke-dasharray: none;
}

html.oz-redesign-v166 body[data-oz-page="map"] .oz-v166-territory-district {
  fill: rgba(122, 63, 166, .025);
  stroke: #7a3fa6;
  stroke-width: 3px;
  stroke-opacity: .98;
  stroke-dasharray: none; /* okres plnou čiarou */
}

html.oz-redesign-v166 body[data-oz-page="map"] .oz-v166-territory-region {
  fill: rgba(7, 95, 159, .03);
  stroke: #075f9f;
  stroke-width: 3.6px;
  stroke-opacity: .98;
  stroke-dasharray: none;
}

/* Detail kraja – dropdown multiselect okresov */
.oz-v166-region-district-form {
  margin: 0;
}

.oz-v166-region-district-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px;
}

.oz-v166-district-filter {
  position: relative;
  min-width: min(360px, 100%);
  flex: 0 1 380px;
}

.oz-v166-district-button {
  width: 100%;
  min-height: 52px;
  border-radius: 18px;
  border: 1px solid rgba(41, 76, 57, .22);
  background: #fff;
  color: #12203a;
  padding: 0 48px 0 20px;
  font-weight: 800;
  font-size: 1rem;
  text-align: left;
  box-shadow: 0 10px 24px rgba(23, 44, 73, .08);
  cursor: pointer;
  position: relative;
}

.oz-v166-district-button::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid #47744a;
  border-bottom: 2px solid #47744a;
  transform: translateY(-65%) rotate(45deg);
  transition: transform .15s ease;
}

.oz-v166-district-filter.is-open .oz-v166-district-button::after {
  transform: translateY(-25%) rotate(225deg);
}

.oz-v166-district-menu {
  display: none;
  position: absolute;
  z-index: 60;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  max-height: 360px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(41, 76, 57, .18);
  border-radius: 18px;
  box-shadow: 0 22px 50px rgba(15, 30, 48, .18);
  padding: 10px;
}

.oz-v166-district-filter.is-open .oz-v166-district-menu {
  display: block;
}

.oz-v166-district-option {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 12px;
  color: #5f687a;
  font-weight: 800;
  cursor: pointer;
}

.oz-v166-district-option:hover {
  background: rgba(71, 116, 74, .08);
  color: #294c39;
}

.oz-v166-district-option input {
  width: 18px;
  height: 18px;
  accent-color: #3f64c8;
  flex: 0 0 auto;
}

.oz-v166-district-apply.button,
.oz-v166-district-apply {
  min-height: 52px;
  border-radius: 18px;
  padding-left: 24px;
  padding-right: 24px;
  font-weight: 800;
}

.oz-v166-district-clear {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
}

.oz-v166-region-district-help {
  width: 100%;
  margin: 8px 0 0;
  color: #657085;
  font-size: .95rem;
}

@media (max-width: 720px) {
  .oz-v166-region-district-row {
    flex-direction: column;
    align-items: stretch;
  }
  .oz-v166-district-filter {
    width: 100%;
    flex-basis: auto;
  }
  .oz-v166-district-apply.button,
  .oz-v166-district-apply,
  .oz-v166-district-clear {
    width: 100%;
    justify-content: center;
  }
}
