.map-wrapper {
    width: 100%;
    position: relative;
    float: left;
    margin-top: 30px;
}
.map-wrapper.fullscreen {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    /* float: left; */
    margin-top: 0px;
    z-index: 99999;
}

.map {
    position: relative;
    width: 100%;
    height: 750px;
    z-index: 1;
}

.map-wrapper.fullscreen div.map {
    height: 100vh;
}

.map-controls {
    padding: 12px;
    height: 30px;
    width: 30px;
    position: absolute;
    right: 10px;
    top: 10px;
    z-index: 2;
    background-color: rgba(255, 255, 255, 0.85);
    pointer-events: auto;
    border-radius: 6px;
    backdrop-filter: blur(2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
/* posuvník */
.map-controls::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
.map-controls::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: background 0.3s;
}
.map-controls::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}.map-controls::-webkit-scrollbar-track {
    background: transparent;
}
.map-controls::-webkit-scrollbar-corner {
    background: transparent;
    backdrop-filter: blur(2px);
}

.map-hint-help summary {
    cursor: pointer;
    font-size: 13px;
    color: #ea521f;
}

.map-controls-hint {
    color: #777;
    font-size: 12px;
    font-style: italic;
}

.map-wrapper.fullscreen .map-controls {
    height: 100%;
}

.map-controls.expanded {
    width: 275px;
    height: 865px;
    overflow-y: scroll;
}

.map-controls-open {
    width: 26px;
    cursor: pointer;
    position: absolute;
    top: 0px;
    right: 1px;
    font-weight: bold;
    font-size: 45px;
    height: 26px;
    line-height: 20px;
}

.map-controls.expanded div.map-controls-open {
    display: none;
}

.map-controls-close {
    width: 26px;
    cursor: pointer;
    position: absolute;
    top: 5px;
    right: 5px;
    font-weight: bold;
    font-size: 45px;
    height: 26px;
    line-height: 26px;
}
.map-controls .map-controls-content {
    line-height: 22px;
    column-count: 2;
}

.map-controls div.map-controls-content,
.map-controls div.map-legend {
    display: none;
}

.map-controls.expanded div.map-controls-content,
.map-controls.expanded div.map-legend {
    display: contents;
}

.map-controls div.checkbox.group-header label {
    font-weight: 500;
}
.map-controls div.checkbox.group-header label:hover {
    color: #000;
}

.map-controls div.group-box {
    margin-left: 17px;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    break-inside: avoid-column;
    display: table;
}

.map-controls div.group-wrapper {
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    break-inside: avoid-column;
    display: table;
    position: relative;
}

.map-controls div.group-wrapper.collapsed .group-box {
    display: none;
}

.map-controls div.group-header {
    position: relative;
}

.map-controls div.group-header label {
    cursor: pointer;
}

.map-controls div.group-header .collapse-icon {
    position: relative;
    left: 0;
    margin-right: 5px;
    font-size: 12px;
    color: #606060;
    transition: transform 0.15s ease;
    cursor: pointer;
    user-select: none;
    display: inline-block;
    vertical-align: middle;
}

.map-controls div.group-header .collapse-icon:hover {
    color: #000;
}

.map-controls div.group-wrapper.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.map-controls div.group-box {
    transition: max-height 0.2s ease;
}

.map-controls .checkbox,
.map-controls .radio {
    margin: 0px;
}

.map-controls .checkbox input,
.map-controls .radio input {
    margin-top: 7px;
}

.map-controls-content div.group-box div.checkbox label
{
    font-size: 12px;
}

.map.leaflet-container {
    cursor: default;
}

.map .map-tooltip-content h1 {
    font-size: 18px;
}

.map .map-tooltip-content tr {
    line-height: 24px;
}

.map .map-tooltip-content td {
    padding-left: 5px;
}

.no-bg-tooltip {
    box-shadow: none;
    background: none;
    border: none;
    text-shadow: -1px -1px 0 #fff, 1px -1px 0 rgb(255, 255, 255), -1px 1px 0 #fff, 1px 1px 0 #fff;
}

.no-bg-tooltip::before {
    display: none;
}

div.map_search {
    z-index: 2;
    top: 10px;
    position: absolute;
    left: 52px;
}

button.map-fullscreen-button {
    background-repeat: no-repeat;
    z-index: 90 !important;
    top: 78px;
    position: absolute;
    left: 10px;
    background-color: #ffffff;
    background-image: url(assets/fullscreen.png);
    width: 34px;
    height: 34px;
    border-radius: 4px;
    border: 2px solid rgba(0,0,0,0.2);
    background-position: center;
}

button.map-fullscreen-button:focus {outline:0;}
button.map-fullscreen-button:hover {
    background-color: #f4f4f4;
}

.fullscreen button.map-fullscreen-button {
    background-image: url(assets/full-exit-white.png);
    background-size: 22px;
    background-position: center;
    background-color: #4285f4;
}

button.map-streetview-button {
    z-index: 90 !important;
    top: 120px;
    position: absolute;
    left: 10px;
    background-color: #ffffff;
    background-image: url('/static/images/google-street-view-basic.png');
    background-size: 20px 20px;
    background-position: center;
    background-repeat: no-repeat;
    width: 34px;
    height: 34px;
    border-radius: 4px;
    border: 2px solid rgba(0,0,0,0.2);
    cursor: pointer;
}

button.map-streetview-button:focus {outline:0;}
button.map-streetview-button:hover {
    background-color: #f4f4f4;
}

button.map-streetview-button.active {
    background-color: #4285f4;
    background-image: url('/static/images/google-street-view-basic-white.png');
}

button.map-print-button {
    z-index: 99 !important;
    top: 162px;
    position: absolute;
    left: 10px;
    background-color: #ffffff;
    background-image: url('/static/images/print-icon.png');
    background-size: 20px 20px;
    background-position: center;
    background-repeat: no-repeat;
    width: 34px;
    height: 34px;
    border-radius: 4px;
    border: 2px solid rgba(0,0,0,0.2);
    cursor: pointer;
}

button.map-print-button:focus {outline:0;}
button.map-print-button:hover {
    background-color: #f4f4f4;
}

button.map-coord-button {
    z-index: 99 !important;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #ffffff;
    background-size: 20px 20px;
    background-position: center;
    background-repeat: no-repeat;
    width: 34px;
    height: 34px;
    border-radius: 4px;
    border: 2px solid rgba(0,0,0,0.2);
    background-image: url('/static/images/search-icon.png');
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

button.map-coord-button:focus {
    outline: 0;
}
button.map-coord-button:hover {
    background-color: #f4f4f4;
}
button.map-coord-button.active {
    background-color: #4285f4;
    background-image: url('/static/images/search-icon-white.png');
}

.map-coord-row {
    display: flex;
    align-items: center;
    gap: 5px;
}
#map-coord-input {
    width: 200px;
    resize: both;
    min-height: 30px;
    padding-right: 22px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 12px;
    background: rgba(255,255,255,0.85);
}

#map-coord-panel {
    display: none;
    margin-left: 6px;
    padding: 4px;
    white-space: nowrap;
    background-color: rgba(255,255,255,0.85);
    backdrop-filter: blur(2px);
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 6px;
    padding: 8px;
}

#map-coord-wrapper {
    display: inline-flex;
    align-items: flex-start;
}

#map-coord-ok {
    margin-left: 4px;
    padding: 2px 6px;
    background-color: #4285f4;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    height: 30px;
    font-size: 12px;
}
#map-coord-ok:hover {
    background-color: #3367d6;
}

.map-coord-input-wrapper {
    position: relative;
    height: 30px;
}

#map-coord-clear {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 14px;
    color: #999;
    cursor: pointer;
}

#map-coord-clear:hover {
    color: #c00;
}

div.map-legend {
    width: 100%;
    display: none;
    column-count: 5;
    padding: 8px;
    color: #777;
    background-color: #ffffff;
    border-bottom: solid 1px rgba(237, 128, 75, 0.25);
    border-left: solid 1px rgba(237, 128, 75, 0.25);
    border-right: solid 1px rgba(237, 128, 75, 0.25);
    border-bottom-right-radius: 5px;
}
div.map-legend-layer {
    display: none;
}
div.map-legend-icon {
    float: left;
    margin-right: 5px;
    width: 24px;
    text-align: center;
    position: relative;
    top: 2px;
}
span.map-legend-text {
    font-size: 12px;
}

div.map-tooltip-bold-black {
    font-weight: bold;
    font-size: 16px;
}

.tooltip-toggle {
    font-size: 11px;
    padding-right: 3px;
}
.query-toggle {
    font-size: 11px;
    padding-right: 3px;
    color: #e8560f;
    cursor: pointer;
}
.tooltip-toggle-off {
    color: #adadad;
}

div.sign-icon {
    width: 26px;
    height: 38px;
    text-align: center;
    position: relative;
    left: -50%;
    top: -50%;
}

.leaflet-container .leaflet-marker-pane div.sign-icon img {
    max-width: 100% !important;
    max-height: 100%;
    height: auto;
    width: auto;
}

div.sign-icon::after {
    position: relative;
    content: '';
    display: block;
    width: 3px;
    height: 16px;
    background-color: #404040;
    left: 11px;
    top: -4px;
    z-index: -1;
}

div.png-icon {
    width: 26px;
    height: 38px;
    text-align: center;
    position: relative;
    left: -50%;
    top: -50%;
}

.leaflet-container .leaflet-marker-pane div.png-icon img {
    max-width: 100% !important;
    max-height: 100%;
    height: auto;
    width: auto;
}

div.map-legend-toggle {
    position: relative;
    float: left;
    color: #333333;
    background-color: #ffffff;
    border-bottom: solid 1px rgba(237, 128, 75, 0.25);
    border-left: solid 1px rgba(237, 128, 75, 0.25);
    border-right: solid 1px rgba(237, 128, 75, 0.25);
    padding: 3px 10px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    top: -1px;
    cursor: pointer;
}

.leaflet-marker-icon.bridge {
    margin-left: -8px !important;
    margin-top: -8px !important;
}

.opacity_slider {
    position: absolute;
    top: 29px;
    left: 20px;
    width: 100px;
    height: 10px;
    z-index: 9999;
    background-color: #f1f1f1;
    cursor: pointer;
    border-radius: 3px;
    box-shadow: 3px 0px 0px 7px rgba(255,255,255,0.85);
}

.map-preloader {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 8px;
  border: 1px solid #dedede;
  padding: 4px 8px;
  display: flex;
  justify-content: center;
  align-items: center;
    left: 50%;
    position: absolute;
  z-index: 9999;
    top: 36px;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 4px solid #ccc;
  border-top-color: #4583f7;
  border-radius: 50%;
  margin-right: 5px;
  animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.map-controls-title {
    margin-top: 5px;
}

/* Collapsible sections with titles */
.map-controls div.section-wrapper {
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    break-inside: avoid-column;
    margin-bottom: 5px;
    position: relative;
}

.map-controls div.section-wrapper.collapsed {
    height: 20px;
}

.map-controls div.section-wrapper.collapsed .section-content {
    display: none;
}

.map-controls div.section-header {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    padding: 5px 0 0 0;
    margin-top: 5px;
}

.map-controls div.section-header .section-collapse-icon {
    display: inline-block;
    margin-right: 5px;
    transition: transform 0.2s ease;
    font-size: 14px;
    vertical-align: middle;
}

.map-controls div.section-header:hover {
    opacity: 0.8;
}

.map-controls div.section-wrapper.collapsed .section-collapse-icon {
    transform: rotate(-90deg);
}

.map-controls div.section-content {
    margin-left: 18px;
}

.map-controls-layers {
    margin-left: 10px !important;
}

#menu-toggle {
  display: none;
}

.menu-icon {
  width: 30px;
  height: 25px;
  position: relative;
  cursor: pointer;
  display: inline-block;
  margin: 20px;
}
.menu-icon span {
  display: block;
  height: 3px;
  background: #333;
  margin: 6px 0;
  transition: 0.4s;
}

.layout-menu {
  display: none;
  flex-direction: column;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(2px);
  padding: 15px;
  margin-top: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  position: absolute;

  top: -15px;
  min-width: 200px;
  z-index: 100;
}

#menu-toggle:checked + .menu-icon + .menu {
  display: flex;

}

.radio {
  margin: 8px 0;
}

.radio input[type="radio"] {
  margin-right: 8px;
}


#layers-menu-container {
    position: absolute;
    top: 10px;
    right: 65px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    transition: right 0.2s ease;
}

#aerial-menu-container {
    position: absolute;
    top: 10px;
    right: 102px;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    transition: right 0.2s ease;
}

/* Když je panel vrstev rozbalený, posunout tlačítka doleva */
.map-wrapper.controls-expanded #aerial-menu-container {
    right: 327px;
}


.map-wrapper.controls-expanded #layers-menu-container {
    right: 290px;
}

.map-wrapper.fullscreen #layers-menu-container {
    z-index: 999999999;
}

.map-wrapper.fullscreen #aerial-menu-container {
    z-index: 999999999;
}

#aerial-icon {
    position: relative;
    text-align: center;
    background-color: white;
    width: 34px;
    height: 34px;
    padding-top: 3px;
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    background-position: center;
    cursor: pointer;
    margin-bottom: 10px;
}

#aerial-icon:hover {
    background-color: #f4f4f4;
}

#aerial-icon.active {
    background-color: #4285f4;
}

#aerial-controls-menu {
    position: relative;
    border: 2px solid rgba(0,0,0,0.2);
}

#menu-icon {
    position: relative;
    text-align: center;
    background-color: white;
    width: 34px;
    height: 34px;
    padding-top: 3px;
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    background-position: center;
    cursor: pointer;
    margin-bottom: 10px;
}

#menu-icon.active {
    background-color: #4285f4;
}

#map-controls-base-layers-menu {
    position: relative;
    border: 2px solid rgba(0,0,0,0.2);
}

.layout-custom-radio input[type="radio"] {
  opacity: 0;
  position: absolute;
}

.layout-custom-radio .radio-image {
  display: inline-block;
  width: 50px;
  margin-right: 5px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
    border: 1px solid gray;
    z-index: 5;
  will-change: transform;
  content-visibility: auto;
    height: fit-content;
    min-height: 36px;
    margin-bottom: 5px;
    border-radius: 6px;
}

.layout-custom-radio .zakladni-mapa-uzk {
    background-image: url('/static/images/layout-maps-icons/zakladni.jpeg');
    border-radius: 6px;
}

.layout-custom-radio .open-street-map {
  background-image: url('/static/images/layout-maps-icons/osm.jpeg');
  border-radius: 6px;
}

.layout-custom-radio .carto-voyager {
  background-image: url('/static/images/layout-maps-icons/carto.jpeg');
  border-radius: 6px;
}

.layout-custom-radio .carto-light-svtla {
    background-image: url('/static/images/layout-maps-icons/carto-light.jpeg');
    border-radius: 6px;
}

.layout-custom-radio .ortofotomapa-r-uzk {
  background-image: url('/static/images/layout-maps-icons/orto-cr.jpeg');
  border-radius: 6px;
}

.layout-custom-radio .ortofoto-r-uzk {
  background-image: url('/static/images/layout-maps-icons/orto-cr.jpeg');
  border-radius: 6px;
}

.layout-custom-radio .jihomoravsk-kraj-dtm {
  background-image: url('/static/images/layout-maps-icons/orto-jmk-dtm.png');
  border-radius: 6px;
}

.layout-custom-radio .jihomoravsk-kraj-stari {
  background-image: url('/static/images/layout-maps-icons/orto-jmk.jpeg');
  border-radius: 6px;
}

.layout-custom-radio .olomouck-kraj {
  background-image: url('/static/images/layout-maps-icons/orto-olomoucky.png');
  border-radius: 6px;
}

.layout-custom-radio .pardubick-kraj {
  background-image: url('/static/images/layout-maps-icons/orto-pardubicky.png');
  border-radius: 6px;
}

.layout-custom-radio .moravskoslezsk-kraj {
  background-image: url('/static/images/layout-maps-icons/orto-moravskoslezsky.png');
  border-radius: 6px;
}

.layout-custom-radio .zlinsk-kraj {
  background-image: url('/static/images/layout-maps-icons/orto-zlinsky.png');
  border-radius: 6px;
}

.layout-custom-radio .kralovehradeck-kraj {
  background-image: url('/static/images/layout-maps-icons/orto-kralovehradecky.png');
  border-radius: 6px;
}

.layout-custom-radio .kraj-vysoina {
  background-image: url('/static/images/layout-maps-icons/orto-vysocina.png');
  border-radius: 6px;
}


.layout-custom-radio input[type="radio"]:checked + .radio-image {
  border: 2px solid #4285f4;
  box-shadow: 0 0 3px rgba(66, 133, 244, 0.6);
  border-radius: 6px;
}

.menu-close {
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 28px;
    line-height: 20px;
    background: none;
    border: none;
    padding: 0;
    float: right;
}

/* Street View Modal */
.streetview-modal {
    position: fixed;
    z-index: 99999 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.streetview-modal[style*="display: none"] {
    display: none !important;
}

.streetview-modal:not([style*="display: none"]) {
    display: flex !important;
}

/* Skrýt při exportu/tisku */
@media print {
    /* Skrýt ovládací prvky */
    .streetview-modal,
    button.map-streetview-button,
    button.map-print-button,
    button.map-fullscreen-button,
    button.map-coord-button,
    #map-coord-wrapper,
    .map-controls,
    .map-controls *,
    .map-controls-open,
    .map-controls-close,
    .map-controls-content,
    .map-legend-toggle,
    .glyphicon.glyphicon-chevron-left,
    .glyphicon.glyphicon-chevron-down,
    .map-panel-heading,
    #menu-icon,
    #aerial-icon,
    #aerial-menu-container,
    .map-controls-base-layers-menu,
    div.map_search,
    #coords,
    .leaflet-control-zoom,
    .leaflet-control-measure,
    .leaflet-control-scale,
    .leaflet-control-attribution,
    .footer,
    #clearSelectionBtn,
    button.map-draw-button,
    #map-draw-panel,
    .map-draw-hint,
    button.map-geolocation-button,
    button.map-bookmark-button,
    .map-bookmark-panel,
    .menu {
        display: none !important;
    }

    /* Zachovat pozadí pro mapové dlaždice a kontejner */
    .map-wrapper,
    .map,
    .leaflet-container {
        background: white !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    .leaflet-tile-pane,
    .leaflet-tile-pane img,
    .leaflet-overlay-pane,
    .leaflet-overlay-pane img,
    .leaflet-tile {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    .map-toggle-controller .panel-collapse {
        display: block !important;
        height: auto !important;
        visibility: visible !important;
    }

    .map-toggle-controller .panel-body {
        display: block !important;
    }

    .glyphicon {
        display: none !important;
    }

    .glyphicon::before {
        content: none !important;
    }

    /* Roztáhnout mapu na celou stránku */
    body {
        margin: 0;
        padding: 0;
    }

    .map-wrapper {
        position: fixed !important;
        top: 60px !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: calc(100vh - 60px) !important;
        margin: 0 !important;
        float: none !important;
    }

    .map {
        width: 100% !important;
        height: 100% !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }

    /* Skrýt legendu při tisku */
    .map-legend {
        display: none !important;
    }

    /* Zajistit, aby byly všechny Leaflet panely viditelné během tisku */
    .leaflet-tile-pane,
    .leaflet-overlay-pane,
    .leaflet-shadow-pane,
    .leaflet-marker-pane,
    .leaflet-tooltip-pane,
    .leaflet-popup-pane {
        opacity: 1 !important;
        display: block !important;
    }

    /* Zajistit lepší kvalitu tisku - zvýšit rozlišení tahu */
    path,
    circle,
    ellipse,
    line,
    polyline,
    polygon,
    rect {
        stroke-width: 1px !important;
    }

    /* Header s logem a kontakty */
    .map-print-header {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 60px !important;
        background: white !important;
        z-index: 1000 !important;
        padding: 10px 20px !important;
        border-bottom: 2px solid #e7550e !important;
    }

    .map-print-header .logo {
        float: left !important;
        height: 40px !important;
    }

    .map-print-header .contact-info {
        float: right !important;
        text-align: right !important;
        color: #e7550e !important;
        font-size: 12px !important;
        margin-top: 5px !important;
        line-height: 1.4 !important;
    }
}

.streetview-modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 1200px;
    height: 80%;
    max-height: 800px;
}

.streetview-modal-close {
    position: absolute;
    right: 60px;
    top: 10px;
    font-size: 32px;
    font-weight: bold;
    color: #666;
    background: #fff;
    border: none;
    cursor: pointer;
    z-index: 10001;
    width: 40px;
    height: 40px;
    line-height: 32px;
    text-align: center;
    transition: color 0.2s;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.streetview-modal-close:hover {
    color: #000;
    background-color: #f0f0f0;
}

.streetview-container {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.map-print-header {
    display: none;
}

/* ===== Tlačítko zrušení výběru v mapě ===== */
#clearSelectionBtn {
    display: none;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 6px 12px;
    background: rgba(255,129,88,0.9);
    backdrop-filter: blur(2px);
    color: #641a01;
    font-weight: 600;
    box-shadow: 0 0 10px 2px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0,0,0,0);
    border-radius:10px;
    cursor:pointer;
}
#clearSelectionBtn:hover {
    border: 1px solid #641a01;
}

/* ===== Rychlá nápověda ===== */
.map-hint-help summary {
    font-weight: 500;
}
.map-hint-help summary:hover {
    color: #f76b3b;
}
.arrow-icon {
    transition: transform 0.2s ease;
    margin-right: 5px;
}
.map-hint-help[open] .arrow-icon {
    transform: rotate(90deg);
}

/* ===== Modal pro rychlou nápovědu ===== */
.q-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.q-modal-wrapper {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(2px);
    padding: 20px;
    border-radius: 8px;
    width: 550px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    font-family: sans-serif;
}
.q-modal-wrapper h4 {
    margin: 0 0 10px 0;
    color: #ea521f;
    border-bottom: 2px solid #bebebe;
    padding-bottom: 5px;
}
.q-modal-content {
    font-size: 13px;
}
.q-modal-content ul {
    color:#555
}


/* ===== Kreslicí toolbar (MapDraw) ===== */

button.map-draw-button {
    z-index: 95;
    top: 248px;
    position: absolute;
    left: 10px;
    background-color: #ffffff;
    background-image: url('../images/draw.png');
    background-size: 20px 20px;
    background-position: center;
    background-repeat: no-repeat;
    width: 34px;
    height: 34px;
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    cursor: pointer;
    padding: 0;
}

button.map-draw-button:focus { outline: 0; }
button.map-draw-button:hover { background-color: #f4f4f4; }
button.map-draw-button.active { background-color: #4285f4; color: #fff; background-image: url('/static/images/draw-white.png'); }

#map-draw-panel {
    display: none;
    position: absolute;
    left: 50px;
    top: 248px;
    z-index: 95;
    background-color: rgba(255,255,255,0.85);
    backdrop-filter: blur(2px);
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 4px;
    white-space: nowrap;
}

#map-draw-panel.open {
    display: flex;
    flex-direction: row;
    gap: 2px;
}

.map-draw-tool-btn {
    width: 30px;
    height: 30px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 5px;
    background-color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 14px;
    color: #555;
    transition: background-color 0.15s;
}

.map-draw-tool-btn:hover { background-color: #f4f4f4; }
.map-draw-tool-btn.active {
    background-color: #4285f4;
    color: #ffffff;
    border-color: #3367d6;
}

.map-draw-separator {
    width: 1px;
    background-color: #ccc;
    margin: 2px 3px;
    align-self: stretch;
}

.map-draw-crosshair {
    cursor: crosshair !important;
}
.map-draw-crosshair .leaflet-interactive {
    cursor: crosshair !important;
}

.map-draw-hint {
    position: absolute;
    left: 55px;
    top: 295px;
    z-index: 96;
    font-size: 11px;
    color: #444;
    font-style: italic;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
    padding: 2px 6px;
    border-radius: 6px;
    display: none;
}

.map-draw-hint.visible { display: block; }

.map-draw-vertex {
    cursor: move !important;
}

/* ===== Geolocation ===== */

button.map-geolocation-button {
    z-index: 94;
    top: 290px;
    position: absolute;
    left: 10px;
    background-color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    background-image: url('/static/images/geolocate-icon.png');
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 16px;
    color: #333;
}

button.map-geolocation-button:focus { outline: 0; }
button.map-geolocation-button:hover { background-color: #f4f4f4; }
button.map-geolocation-button.active { background-color: #4285f4; color: #fff; background-image: url('/static/images/geolocate-icon-white.png'); }

/* ===== Bookmarks ===== */

button.map-bookmark-button {
    z-index: 93;
    top: 332px;
    position: absolute;
    left: 10px;
    background-color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    background-image: url('/static/images/bookmark.png');
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 16px;
    color: #333;
}

button.map-bookmark-button:focus { outline: 0; }
button.map-bookmark-button:hover { background-color: #f4f4f4; }
button.map-bookmark-button.active { background-color: #4285f4; color: #fff; background-image: url('/static/images/bookmark-white.png'); }

.map-bookmark-panel {
    position: absolute;
    left: 50px;
    top: 332px;
    z-index: 93;
    background-color: rgba(255,255,255,0.85);
    backdrop-filter: blur(2px);
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 10px;
    min-width: 220px;
}

.map-bookmark-add {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.map-bookmark-input {
    flex: 1;
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 12px;
    background: rgba(255,255,255,0.85);
}

.map-bookmark-save-btn {
    padding: 4px 8px;
    background-color: #4285f4;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.map-bookmark-save-btn:hover { background-color: #3367d6; }

.map-bookmark-list {
    max-height: 200px;
    overflow-y: auto;
}

.map-bookmark-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #eee;
    font-size: 12px;
}

.map-bookmark-item:last-child { border-bottom: none; }

.map-bookmark-name {
    cursor: pointer;
    color: #333;
    flex: 1;
}

.map-bookmark-name:hover { color: #4285f4; }

.map-bookmark-delete {
    cursor: pointer;
    color: #999;
    font-size: 16px;
    margin-left: 8px;
    line-height: 1;
}

.map-bookmark-delete:hover { color: #c00; }

/* plynulá změna měřítka */
.leaflet-control-scale-line {
    transition: width 0.3s ease-in-out, margin 0.3s ease-in-out;
    white-space: nowrap;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid #333;
    border-top: none;
    color: #000;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* souřadncie podle kurzoru myši */
#coords {
    border-radius: 4px;
    border-top: 3px solid rgb(237, 128, 75);
    margin-top: 1px;
    padding-left: 12px;
}

/* ===== Color picker v draw panelu ===== */

.map-draw-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: inline-block;
    margin: 5px 1px;
}

.map-draw-color:hover { border-color: rgba(0, 0, 0, 0.5); }
.map-draw-color.active { border-color: #333; border-width: 3px; }

/* ===== Popisky nakreslených tvarů ===== */

.map-draw-tooltip {
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    padding: 2px 6px;
    font-size: 11px;
    color: #333;
    white-space: nowrap;
}

/* ===== vzhled hasQuery popup ===== */
.custom-altitude-popup .leaflet-popup-content-wrapper {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
    border-radius: 14px;
}

.custom-altitude-popup .leaflet-popup-tip {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(4px);
}
