/* Load AFTER map-clusters.css and any custom map/card styles. */
.bau-project-map .bau-map-popup-host {
    width: min(290px, calc(100vw - 90px));
}
.bau-project-map .bau-map-popup {
    --bau-map-card-height: 350px;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: var(--bau-map-card-height) !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}
.bau-map-popup .bau-map-popup-scroll {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    touch-action: pan-y;
    padding-right: 6px;
    scrollbar-width: thin;
    box-sizing: border-box !important;
}
.bau-map-popup .bau-map-popup-footer {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
    margin: 0 !important;
    padding: 10px 0 0 !important;
    box-sizing: border-box !important;
    background: #fff;
}
.bau-map-popup .bau-map-popup-image {
    max-width: 100%;
    box-sizing: border-box;
}
.bau-map-popup .bau-map-popup-controls {
    flex: 0 0 auto;
    margin-left: auto;
}

/* Mobile modal is appended to body, outside the map's event/transform layers. */
.bau-map-mobile-dialog {
    width: min(350px, calc(100vw - 32px));
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 0 0 62px;
    border: 0;
    background: transparent;
    color: #292929;
    overflow: visible;
    font-family: inherit;
    box-sizing: border-box;
}
.bau-map-mobile-dialog:not([open]) {
    display: none;
}
.bau-map-mobile-dialog::backdrop {
    background: rgb(0 0 0 / 65%);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}
.bau-map-mobile-surface {
    position: relative;
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    box-sizing: border-box;
}
.bau-map-mobile-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: #fff;
    color: #ff4e00;
    font: 30px/1 Arial, sans-serif;
    cursor: pointer;
}
.bau-map-mobile-dialog .bau-map-popup {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: min(520px, calc(100vh - 144px)) !important;
    height: min(520px, calc(100dvh - 144px)) !important;
    min-height: 160px !important;
    max-height: none !important;
    overflow: visible !important;
    color: #292929;
    box-sizing: border-box;
}
.bau-map-mobile-dialog .bau-map-popup-title {
    padding-right: 20px;
    font-size: 20px;
    line-height: 1.25;
}
.bau-map-mobile-dialog .bau-map-popup-address,
.bau-map-mobile-dialog .bau-map-popup-facts {
    font-size: 14px;
    line-height: 1.4;
}
.bau-map-mobile-dialog .bau-map-popup-image {
    height: clamp(170px, 32vh, 280px);
    height: clamp(170px, 32dvh, 280px);
}
.bau-map-mobile-dialog .bau-map-popup-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 12px;
    border-radius: 10px;
    background: #ff4e00;
    color: #fff;
    font-size: 18px;
    line-height: 1.2;
    text-decoration: none;
    box-sizing: border-box;
}
.bau-map-mobile-dialog .bau-map-popup-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -56px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin: 0;
}
.bau-map-mobile-dialog .bau-map-popup-counter {
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
}
.bau-map-mobile-dialog .bau-map-popup-arrow {
    width: 100%;
    height: 42px;
    border-radius: 9px;
    font-size: 27px;
}
.bau-map-mobile-close:focus-visible,
.bau-map-mobile-dialog .bau-map-popup-more:focus-visible {
    outline: 2px solid #111;
    outline-offset: 2px;
}
