
/* Kartenfotos */
.maps-photo-marker { background: transparent; border: 0; }
.maps-photo-marker-inner { width: 34px; height: 34px; border: 3px solid #fff; border-radius: 50%; overflow: hidden; box-shadow: 0 1px 5px rgba(0,0,0,.55); background: #fff; }
.maps-photo-marker-inner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.maps-photo-popup { min-width: 220px; max-width: 320px; }
.maps-photo-popup img { display: block; width: 100%; height: auto; margin: 0 0 8px; border-radius: 3px; }
.maps-photo-popup strong { display: block; margin-bottom: 4px; }
.maps-photo-popup p { margin: 4px 0 0; }

/* Foto-Lightbox */
.maps-photo-popup-image { display: block; cursor: zoom-in; }
.maps-photo-lightbox { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 32px; box-sizing: border-box; background: rgba(0,0,0,.86); }
.maps-photo-lightbox[hidden] { display: none; }
.maps-photo-lightbox-image { display: block; max-width: min(1280px, 94vw); max-height: 90vh; width: auto; height: auto; box-shadow: 0 4px 30px rgba(0,0,0,.45); }
.maps-photo-lightbox-close { position: absolute; top: 14px; right: 18px; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: #fff; font: 38px/44px Arial, sans-serif; cursor: pointer; }
.maps-photo-lightbox-caption { position: absolute; left: 24px; right: 70px; bottom: 12px; color: #fff; text-align: center; font-size: 14px; }
body.maps-photo-lightbox-open { overflow: hidden; }
@media (max-width: 600px) { .maps-photo-lightbox { padding: 16px; } .maps-photo-lightbox-image { max-width: 96vw; max-height: 86vh; } }

/* Zustimmung zu externen Kartendiensten */
.maps-map-awaiting-consent {
    position: relative;
    overflow: hidden;
    background: #f3f3f3;
    border: 1px solid #e1e1e1;
    box-sizing: border-box;
}
.maps-map-awaiting-consent::before {
    content: "";
    position: absolute;
    inset: -24px;
    background: url("../images/map-placeholder.webp") center center / cover no-repeat;
    filter: blur(10px);
    transform: scale(1.04);
    opacity: 0.82;
}
.maps-external-notice {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 24px;
    background: rgba(247,247,247,0.22);
    color: #333;
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
}
.maps-external-notice[hidden],
.maps-external-consent-reset[hidden] { display: none; }
.maps-external-notice-inner {
    width: min(620px, 100%);
    padding: 22px;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 7px;
    background: rgba(255,255,255,.90);
    box-shadow: 0 3px 18px rgba(0,0,0,.16);
    box-sizing: border-box;
}
.maps-external-notice strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}
.maps-external-notice p { margin: 0 0 8px; }
.maps-external-notice p:last-child { margin-bottom: 0; }
.maps-external-consent-button,
.maps-external-consent-reset button {
    margin-top: 12px;
    padding: 7px 11px;
    border: 1px solid #aaa;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font: inherit;
    cursor: pointer;
}
.maps-external-consent-button:hover,
.maps-external-consent-button:focus,
.maps-external-consent-reset button:hover,
.maps-external-consent-reset button:focus { background: #eee; }
.maps-external-consent-reset {
    margin-top: 6px;
    text-align: right;
    font-size: 12px;
}
.maps-external-consent-reset button {
    margin-top: 0;
    padding: 3px 6px;
    border-color: transparent;
    background: transparent;
    color: #666;
    text-decoration: underline;
}
@media (max-width: 600px) {
    .maps-external-notice {
        align-items: flex-start;
        overflow-y: auto;
        padding: 18px 14px;
    }
}


/* Leaflet-Layerauswahl kompakt: Radio-Button direkt vor der Beschriftung */
.leaflet-control-layers-list label {
    display: block;
    width: auto;
    white-space: nowrap;
}

.leaflet-control-layers-list label > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
}

.leaflet-control-layers-list input[type="radio"],
.leaflet-control-layers-list input[type="checkbox"] {
    width: auto;
    min-width: 0;
    margin: 0;
    flex: 0 0 auto;
}

.leaflet-control-layers-expanded {
    width: auto;
    min-width: 0;
}


/* Responsive Kartenhoehe: eine im Backend eingestellte Hoehe wird auf
   den verfuegbaren Viewport begrenzt. Kleinere Sollhoehen bleiben unveraendert. */
[id^="leaflet_map_"] {
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
}
