.overlay {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    cursor: pointer;
    z-index: 999999;
}

.popup {
    position: absolute;
    top: 50%;
    left: 50%;
    color: black;
    transform: translate(-50%,-50%);
    -ms-transform: translate(-50%,-50%);
    background-color: white;
    padding: 25px;
    width: calc(100% - 40px);
    max-width: 1000px;
    height: auto;
    aspect-ratio: 3 / 2;
    border-radius: 20px;
}

    .popup iframe {
        width: 100%;
        height: 100%;
    }

#maps-popup:not(.multi-location-popup) {
    padding: 0;
    overflow: hidden;
}

#maps-popup:not(.multi-location-popup) > iframe {
    display: block;
    border-radius: inherit;
}

.popup.multi-location-popup {
    box-sizing: border-box;
    width: calc(100% - 40px);
    max-width: 720px;
    height: auto;
    max-height: calc(100dvh - 48px);
    aspect-ratio: auto;
    overflow-y: auto;
    padding: 24px;
    cursor: default;
}

.multi-location-viewer {
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-family: Montserrat, Arial, sans-serif;
    line-height: 1.45;
}

.multi-location-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.multi-location-viewer-heading {
    margin: 0;
    color: #303030;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.venue-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f3f4f5;
    color: #5f5f5f;
    font: 26px/1 Arial, sans-serif;
    cursor: pointer;
}

.venue-tabs {
    --venue-tab-gap: 4px;
    --venue-tab-min-width: 146px;
    position: relative;
    isolation: isolate;
    display: flex;
    gap: var(--venue-tab-gap);
    overflow-x: auto;
    padding: 4px;
    border-radius: 12px;
    background: #f3f4f5;
}

.venue-tabs::before {
    content: '';
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    box-sizing: border-box;
    /* Match the equal-width tabs, including their minimum width when scrolling. */
    width: max(var(--venue-tab-min-width), calc((100% - 8px - (var(--venue-tab-count, 1) - 1) * var(--venue-tab-gap)) / var(--venue-tab-count, 1)));
    border: 1px solid #e1e5e8;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    pointer-events: none;
    transform: translateX(calc(var(--venue-active-tab, 0) * (100% + var(--venue-tab-gap))));
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.venue-tab {
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex: 1 0 var(--venue-tab-min-width);
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #5f5f5f;
    font-family: inherit;
    text-align: left;
    line-height: 1.4;
    cursor: pointer;
}

.venue-tab[aria-selected="true"] {
    color: #0b2838;
}

@media (prefers-reduced-motion: reduce) {
    .venue-tabs::before {
        transition: none;
    }
}

.venue-tab-type,
.venue-tab-facility {
    display: block;
}

.venue-tab-type {
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 400;
}

.venue-tab-name {
    font-size: 14px;
    font-weight: 600;
}

.venue-tab-facility {
    font-size: 12px;
    overflow-wrap: anywhere;
}

.venue-tab-address {
    color: #5f5f5f;
    font-size: 12px;
    font-weight: 400;
}

.venue-tab:focus-visible,
.venue-close-btn:focus-visible {
    outline: 2px solid #0b2838;
    outline-offset: 2px;
}

.venue-card {
    padding: 0;
    border: 0;
    background: #fff;
}

.venue-card[hidden] {
    display: none;
}

.venue-map-frame {
    position: relative;
    width: 100%;
    height: clamp(180px, 43vh, 320px);
    overflow: hidden;
    border-radius: 10px;
    background: #eef3f5;
}

.popup .venue-map-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: inherit;
}

.venue-map-status {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #eef3f5;
    color: #33454f;
    text-align: center;
}

.venue-map-status.venue-map-error {
    flex-direction: column;
    gap: 8px;
}

.venue-map-retry {
    padding: 8px 14px;
    border: 1px solid #0b2838;
    border-radius: 8px;
    background: #fff;
    color: #0b2838;
    cursor: pointer;
    font-weight: 600;
}

.venue-map-unavailable {
    padding: 16px;
    border-radius: 10px;
    background: #fff4e5;
    color: #6a4514;
}

    .popup.popup-filter {
        /*top: 55%;*/
    }

@media screen and (max-width: 807px) {
    /* take up full screen */
    .popup {
        width: calc(100% - 50px);
        height: calc(100% - 200px);
        max-width: 100%;
        max-height: 100%;
        padding: 10px;
    }

    .popup-filter {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        padding: 0px;
        border-radius: 0;
    }

    .popup.multi-location-popup {
        width: calc(100% - 24px);
        height: auto;
        max-height: calc(100dvh - 24px);
        padding: 18px;
    }

    .multi-location-viewer {
        gap: 16px;
    }

    .venue-map-frame {
        height: clamp(160px, 38vh, 280px);
    }
}
