/* Baier Karte / Anfahrt (Content Block baier/map) */
.bs-map {
    --map-h: min(650px, 75svh);
    position: relative;
    background: #2B2C2E;
    color: var(--baier-text, #2B2B2B);
    isolation: isolate;
}
.bs-map--medium { --map-h: 480px; }
.bs-map--small { --map-h: 360px; }

/* Steht die Karte ganz oben in der Bühne, liegt der Header darüber: Platz lassen */
.bs-col--border > .bs-map:first-child { padding-top: var(--bs-header-h, 141px); }

.bs-map__stage { position: relative; height: var(--map-h); min-height: 320px; }
.bs-map__canvas { position: absolute; inset: 0; z-index: 0; background: #E8E8E8; }
.bs-map__canvas[hidden] { display: none; }

/* Karte zurückhaltend grau, Marker und Bedienelemente in Baier-Farben */
.bs-map .leaflet-tile-pane { filter: grayscale(1) contrast(.92) brightness(1.04); }
.bs-map .leaflet-container { font: inherit; font-size: .875rem; background: #E8E8E8; }
.bs-map .leaflet-bar { border: 0; border-radius: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.bs-map .leaflet-bar a { width: 40px; height: 40px; line-height: 40px; border-radius: 0 !important; color: var(--baier-black, #141414); font-size: 20px; }
.bs-map .leaflet-bar a:hover { background: var(--baier-yellow, #FFDD00); }
.bs-map .leaflet-control-attribution { background: rgba(255, 255, 255, .85); font-size: .75rem; }
.bs-map .leaflet-control-attribution a { color: var(--baier-black, #141414); }
.bs-map .leaflet-popup-content-wrapper { border-radius: 0; background: var(--baier-black, #141414); color: #fff; box-shadow: 0 4px 16px rgba(0, 0, 0, .3); }
.bs-map .leaflet-popup-tip { background: var(--baier-black, #141414); }
.bs-map .leaflet-popup-content { margin: 12px 16px; font-size: .9375rem; font-weight: 700; line-height: 1.4; }
.bs-map .leaflet-container a.leaflet-popup-close-button { color: #fff; }
.bs-map__pin { width: 44px; height: 54px; }
.bs-map__pin svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .35)); }
.bs-map :focus-visible { outline: 3px solid var(--baier-yellow, #FFDD00); outline-offset: 2px; }

/* Platzhalter vor der Zustimmung: Kartenmuster ohne externe Daten */
.bs-map__consent {
    position: absolute; inset: 0; z-index: 1;
    display: flex; align-items: center; justify-content: center; padding: 24px;
    background:
        linear-gradient(rgba(43, 44, 46, .55), rgba(43, 44, 46, .55)),
        repeating-linear-gradient(35deg, transparent 0 46px, rgba(255, 255, 255, .06) 46px 48px),
        repeating-linear-gradient(-55deg, transparent 0 70px, rgba(255, 255, 255, .05) 70px 73px),
        radial-gradient(circle at 62% 45%, #5A5B5E 0, #3A3B3D 60%);
    color: #fff;
}
.bs-map__consent[hidden] { display: none; }
.bs-map__consent-box { max-width: 460px; text-align: center; }
.bs-map__consent-icon { width: 44px; height: 44px; margin: 0 auto 10px; display: block; color: var(--baier-yellow, #FFDD00); }
.bs-map__consent-title { margin: 0 0 8px; font-size: 1.375rem; font-weight: 300; color: #fff; }
.bs-map__consent-text { margin: 0 0 18px; font-size: .9375rem; line-height: 1.55; color: #E6E6E6; }
.bs-map__consent-text a { color: #fff; }
.bs-map__consent-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 20px; }
.bs-map__btn {
    display: inline-flex; align-items: center; min-height: 48px; padding: 12px 22px;
    border: 0; font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer;
}
.bs-map__btn--primary { background: var(--baier-yellow, #FFDD00); color: var(--baier-black, #141414); }
.bs-map__btn--primary:hover { background: #fff; }
.bs-map__remember { display: inline-flex; align-items: center; gap: 8px; font-size: .9375rem; cursor: pointer; }
.bs-map__remember input { width: 20px; height: 20px; accent-color: var(--baier-yellow, #FFDD00); }

/* Anfahrtskachel: Desktop auf der Karte, mobil darunter */
.bs-map__tilewrap { position: relative; z-index: 2; }
.bs-map__tile {
    position: relative;
    background: #fff; padding: 32px 32px 28px;
    border-top: 5px solid var(--baier-yellow, #FFDD00);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .22);
}
.bs-map__eyebrow { margin: 0 0 4px; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--baier-grey-600, #595959); }
.bs-map__title { margin: 0 0 14px; font-size: 1.375rem; line-height: 1.25; color: var(--baier-black, #141414); }
.bs-map__address { margin: 0 0 16px; font-style: normal; line-height: 1.6; }
.bs-map__contact { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 6px; }
.bs-map__contact li { display: flex; align-items: center; gap: 10px; }
.bs-map__contact .bs-icon { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--baier-black, #141414); stroke-width: 1.8; }
.bs-map__text { margin: 0 0 18px; font-size: 1rem; }
.bs-map__text > :last-child { margin-bottom: 0; }
.bs-map__route {
    display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 12px 22px;
    background: var(--baier-black, #141414); color: #fff; font-weight: 700; text-decoration: none;
}
.bs-map__route:hover { background: var(--baier-yellow, #FFDD00); color: var(--baier-black, #141414); }
.bs-map__route .bs-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.bs-map__revoke { display: block; margin-top: 14px; padding: 0; border: 0; background: none; font: inherit; font-size: .8125rem; color: var(--baier-grey-600, #595959); text-decoration: underline; cursor: pointer; }
.bs-map__revoke[hidden] { display: none; }
.bs-map__revoke--solo { position: absolute; z-index: 2; left: 12px; bottom: 8px; margin: 0; padding: 4px 8px; background: rgba(255, 255, 255, .85); }

@media (min-width: 992px) {
    .bs-map__tilewrap { position: absolute; inset: 0; pointer-events: none; display: flex; align-items: center; }
    .bs-col--border > .bs-map:first-child .bs-map__tilewrap { top: var(--bs-header-h, 141px); }
    .bs-map--tile-right .bs-map__tilewrap { justify-content: flex-end; }
    .bs-map__tile { width: 380px; pointer-events: auto; }
    .bs-map--small .bs-map__tile { padding: 22px 24px 20px; }
    .bs-map--small .bs-map__contact, .bs-map--small .bs-map__text { display: none; }
    /* Zustimmungshinweis und Bedienelemente nicht unter der Kachel */
    .bs-map--tile-left .bs-map__consent { padding-left: calc(max(0px, (100% - var(--baier-container, 1240px)) / 2) + var(--baier-gutter, 32px) + 380px + 32px); }
    .bs-map--tile-right .bs-map__consent { padding-right: calc(max(0px, (100% - var(--baier-container, 1240px)) / 2) + var(--baier-gutter, 32px) + 380px + 32px); }
    .bs-map--tile-left .leaflet-left { left: calc(max(0px, (100% - var(--baier-container, 1240px)) / 2) + 380px + 48px); }
    .bs-map--tile-right .leaflet-right { right: calc(max(0px, (100% - var(--baier-container, 1240px)) / 2) + 380px + 48px); }
}
@media (max-width: 991.98px) {
    .bs-map { background: #fff; }
    .bs-map__stage { height: min(var(--map-h), 60svh); }
    .bs-map__tilewrap { padding-block: 0 24px; }
    .bs-map__tile { margin-top: -32px; padding: 24px 20px 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .bs-map .leaflet-fade-anim .leaflet-tile, .bs-map .leaflet-zoom-anim .leaflet-zoom-animated { transition: none !important; }
}
