/* ---------- Filters panel that opens and closes ---------- */

/* Side-panel "Filters" button (desktop/tablet) */
.dmp-map-filter-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    border-radius: 30px;
    border: 2px solid #0A2540;
    background: #ffffff;
    color: #0A2540;
    font-family: var(--font-heading, Syncopate), sans-serif;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: left;
    white-space: normal;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.dmp-map-filter-toggle svg,
.dmp-map-filter-fab svg,
.dmp-map-filter-x svg {
    display: block;
    flex-shrink: 0;
}
.dmp-map-filter-toggle-text {
    flex: 0 0 auto;
}
.dmp-map-filter-summary {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    font-family: Inter, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: #00B8A5;
}
.dmp-map-filter-summary[hidden] {
    display: none !important;
}
.dmp-map-filter-toggle:focus {
    background: #ffffff !important;
    border-color: #0A2540 !important;
    color: #0A2540 !important;
}
.dmp-map-filter-toggle:focus-visible {
    outline: 2px solid #00DDC7;
    outline-offset: 2px;
}
.dmp-map-filter-toggle:hover,
.dmp-map-filter-toggle[aria-expanded="true"] {
    background: #0A2540 !important;
    border-color: #0A2540 !important;
    color: #ffffff !important;
}
.dmp-map-filter-toggle:hover .dmp-map-filter-summary,
.dmp-map-filter-toggle[aria-expanded="true"] .dmp-map-filter-summary {
    color: #00DDC7;
}
.dmp-map-filter-drawer {
    margin-top: 16px;
}
.dmp-map-filter-drawer[hidden] {
    display: none !important;
}
/* Clear + Apply row at the bottom of the filters */
.dmp-map-filter-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}
.dmp-map-filter-clear {
    flex: 0 0 auto;
    padding: 12px 16px;
    border-radius: 30px;
    border: 2px solid #0A2540;
    background: #ffffff;
    color: #0A2540;
    font-family: var(--font-heading, Syncopate), sans-serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.dmp-map-filter-clear:hover:not(:disabled),
.dmp-map-filter-clear:focus-visible:not(:disabled) {
    background: #0A2540 !important;
    border-color: #0A2540 !important;
    color: #ffffff !important;
}
.dmp-map-filter-clear:focus {
    background: #ffffff;
    color: #0A2540;
}
.dmp-map-filter-clear:disabled {
    opacity: 0.35;
    cursor: default;
    background: #ffffff !important;
    color: #0A2540 !important;
}
.dmp-map-filter-apply {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    margin: 0;
    padding: 12px 16px;
    border-radius: 30px;
    border: 2px solid #00DDC7;
    background: #00DDC7;
    color: #0A2540;
    font-family: var(--font-heading, Syncopate), sans-serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: normal;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.dmp-map-filter-apply:hover,
.dmp-map-filter-apply:focus {
    background: #0A2540 !important;
    border-color: #0A2540 !important;
    color: #ffffff !important;
}
.dmp-map-widget.has-filter-drawer .dmp-map-filter-drawer .dmp-map-sub-chips {
    max-height: none;
}

/* Pop-up title, X and floating pill only exist on phones */
.dmp-map-filter-sheet-head,
.dmp-map-filter-fab {
    display: none;
}

/* ---------- Desktop / tablet ---------- */
@media (min-width: 768px) {
    /* While the filters are open they take the side panel */
    .dmp-map-widget.has-filter-toggle.is-filters-open .dmp-map-panel-head {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        border-bottom: none;
    }
    .dmp-map-widget.has-filter-toggle.is-filters-open .dmp-map-list,
    .dmp-map-widget.has-filter-toggle.is-filters-open .dmp-map-detail {
        display: none !important;
    }
}
@media (min-width: 768px) and (max-width: 900px) {
    .dmp-map-widget.has-filter-toggle.is-filters-open .dmp-map-panel-head {
        max-height: 420px;
    }
}

/* ---------- Phones: floating "Filters" pill + pop-up sheet ---------- */
@media (max-width: 767px) {
    html.dmp-map-filters-lock,
    html.dmp-map-filters-lock body {
        overflow: hidden !important;
    }
    .dmp-map-widget.has-filter-drawer .dmp-map-filter-toggle {
        display: none !important;
    }
    .dmp-map-widget.has-filter-drawer .dmp-map-filter-fab {
        position: absolute;
        left: 50%;
        bottom: 16px;
        z-index: 4;
        transform: translateX(-50%);
        display: inline-flex;
        align-items: center;
        gap: 8px;
        max-width: calc(100% - 32px);
        padding: 12px 22px;
        border: 0;
        border-radius: 40px;
        background: #0A2540;
        color: #ffffff;
        font-family: var(--font-heading, Syncopate), sans-serif;
        font-weight: 600;
        font-size: 11px;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        white-space: nowrap;
        box-shadow: 0 6px 18px rgba(10, 37, 64, 0.3);
        cursor: pointer;
    }
    .dmp-map-widget.has-filter-drawer .dmp-map-filter-fab:hover,
    .dmp-map-widget.has-filter-drawer .dmp-map-filter-fab:focus {
        background: #0A2540 !important;
        color: #ffffff !important;
    }
    .dmp-map-widget.has-filter-drawer .dmp-map-filter-fab:focus-visible {
        outline: 2px solid #00DDC7;
        outline-offset: 2px;
    }
    .dmp-map-widget.has-filter-drawer .dmp-map-filter-fab .dmp-map-filter-summary {
        flex: 0 1 auto;
        text-align: left;
        color: #00DDC7;
    }
    /* Compact venue maps keep their own buttons until opened full screen */
    .dmp-map-widget.is-compact:not(.is-fullscreen) .dmp-map-filter-fab {
        display: none !important;
    }

    /* The pop-up sheet */
    .dmp-map-widget.has-filter-drawer .dmp-map-filter-drawer:not([hidden]) {
        position: fixed;
        left: 12px;
        right: 12px;
        top: 12px;
        bottom: 12px;
        z-index: 100002;
        display: flex;
        flex-direction: column;
        margin: 0;
        padding: 0 20px 20px;
        background: #ffffff;
        border-radius: 24px;
        overflow-y: auto;
        overscroll-behavior: contain;
        box-shadow: 0 0 0 100vmax rgba(10, 37, 64, 0.45), 0 12px 40px rgba(10, 37, 64, 0.3);
    }
    .dmp-map-widget.has-filter-drawer .dmp-map-filter-sheet-head {
        position: sticky;
        top: 0;
        z-index: 1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin: 0 -20px 8px;
        padding: 18px 20px 12px;
        background: #ffffff;
    }
    .dmp-map-filter-sheet-title {
        margin: 0;
        font-family: var(--font-heading, Syncopate), sans-serif;
        font-weight: 700;
        font-size: 16px;
        text-transform: uppercase;
        color: #0A2540;
    }
    .dmp-map-filter-x {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: #0A2540;
        color: #ffffff;
        cursor: pointer;
    }
    .dmp-map-filter-x:hover,
    .dmp-map-filter-x:focus {
        background: #0A2540 !important;
        color: #ffffff !important;
    }
    .dmp-map-filter-x:focus-visible {
        outline: 2px solid #00DDC7;
        outline-offset: 2px;
    }
    .dmp-map-widget.has-filter-drawer .dmp-map-filter-drawer .dmp-map-filters {
        gap: 8px;
    }
    .dmp-map-widget.has-filter-drawer .dmp-map-filter-drawer .dmp-map-sub-chips {
        flex-wrap: wrap;
        overflow: visible;
    }
    .dmp-map-widget.has-filter-drawer .dmp-map-filter-actions {
        position: sticky;
        bottom: 0;
        margin-top: auto;
        padding-top: 12px;
        background: #ffffff;
        box-shadow: 0 -12px 16px #ffffff;
    }
}
