.dmp-map-widget {
    display: flex;
    width: 100%;
    height: var(--dmp-map-height, 700px);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid #e5e9ec;
}
@media (max-width: 900px) {
    .dmp-map-widget {
        flex-direction: column;
        height: auto;
    }
}

.dmp-map-panel {
    width: 380px;
    flex: 0 0 380px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-right: 1px solid #e5e9ec;
}
@media (max-width: 900px) {
    .dmp-map-panel {
        width: 100%;
        flex: none;
        border-right: none;
        border-bottom: 1px solid #e5e9ec;
    }
}

.dmp-map-panel-head {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e9ec;
}

.dmp-map-eyebrow {
    margin: 0 0 6px;
    font-family: var(--font-heading, Syncopate), sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent, #00ddc7);
}

.dmp-map-heading {
    margin: 0 0 16px;
    font-family: var(--font-heading, Syncopate), sans-serif;
    font-weight: 700;
    font-size: 26px;
    line-height: 1.15;
    text-transform: uppercase;
    color: var(--dark, #0A2540);
}

.dmp-map-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dmp-map-chip {
    font-family: var(--font-heading, Syncopate), sans-serif;
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 8px 14px;
    border-radius: 30px;
    border: 2px solid #0A2540;
    background: #ffffff;
    color: #0A2540;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.dmp-map-chip.is-active,
.dmp-map-chip:hover,
.dmp-map-chip:focus-visible {
    background: #0A2540;
    color: #ffffff;
}

.dmp-map-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
@media (max-width: 900px) {
    .dmp-map-list {
        max-height: 320px;
    }
}

.dmp-map-empty {
    padding: 20px 12px;
    font-family: Inter, sans-serif;
    font-size: 14px;
    color: #6b7785;
    text-align: center;
}

.dmp-map-card {
    display: block;
    width: 100%;
    white-space: normal;
    text-align: left;
    border: 1px solid #e5e9ec;
    border-radius: 14px;
    padding: 14px 16px;
    background: #fff;
    color: #0A2540;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: Inter, sans-serif;
}
/* Theme colours on hover/focus (the WordPress theme otherwise turns buttons pink-red) */
.dmp-map-card:hover,
.dmp-map-card:focus,
.dmp-map-card:focus-visible {
    background: #fff;
    color: #0A2540;
    border-color: #0A2540;
}
.dmp-map-card-cat {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--marker-color, #0A2540);
    margin-bottom: 6px;
}
.dmp-map-card h4 {
    overflow-wrap: anywhere;
    margin: 0 0 4px;
    font-family: var(--font-heading, Syncopate), sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    color: #0A2540;
}
.dmp-map-card p {
    margin: 0;
    font-size: 13px;
    color: #6b7785;
}

.dmp-map-detail {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.dmp-map-detail-inner {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.dmp-map-detail-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #eef1f3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Inter, sans-serif;
    font-size: 13px;
    color: #8a97a6;
    flex-shrink: 0;
}
.dmp-map-detail-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(10, 37, 64, 0.85);
    color: #ffffff;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dmp-map-detail-close:hover,
.dmp-map-detail-close:focus,
.dmp-map-detail-close:focus-visible {
    background: #00DDC7;
    color: #0A2540;
}
.dmp-map-detail-body {
    padding: 20px;
}
.dmp-map-detail-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--marker-color, #0A2540);
    margin-bottom: 8px;
}
.dmp-map-detail-body h3 {
    overflow-wrap: anywhere;
    margin: 0 0 8px;
    font-family: var(--font-heading, Syncopate), sans-serif;
    font-weight: 700;
    font-size: 20px;
    text-transform: uppercase;
    color: #0A2540;
}
.dmp-map-detail-address {
    margin: 0 0 12px;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #6b7785;
}
.dmp-map-detail-desc {
    margin: 0;
    font-family: Inter, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #3d4f63;
}
.dmp-map-detail-link {
    margin-top: 0;
    padding: 14px 20px;
    border-top: 1px solid #e5e9ec;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading, Syncopate), sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    color: #0A2540;
    text-decoration: none;
}
.dmp-map-detail-nolink {
    margin: 0 20px 20px;
    font-family: Inter, sans-serif;
    font-size: 12px;
    color: #8a97a6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dmp-map-canvas {
    flex: 1;
    position: relative;
    min-height: 320px;
}
.dmp-map-canvas .maplibregl-canvas {
    outline: none;
}

.dmp-map-pin {
    cursor: pointer;
}
.dmp-map-pin.is-focus {
    cursor: default;
}
.dmp-map-marker {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--marker-color, #0A2540);
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dmp-map-pin.is-active .dmp-map-marker {
    transform: scale(1.3);
    box-shadow: 0 0 0 4px rgba(0, 221, 199, 0.35);
}

/* Explicit hidden-state overrides — without these, the plain .dmp-map-list /
   .dmp-map-detail display:flex rules above win the specificity tie against
   the browser's default [hidden]{display:none}, so toggling .hidden in JS
   had no visible effect. !important guarantees hidden always wins. */
.dmp-map-list[hidden],
.dmp-map-detail[hidden] {
    display: none !important;
}

/* ---------- Map stage (canvas + overlay buttons) ---------- */
.dmp-map-stage {
    flex: 1;
    position: relative;
    min-width: 0;
    min-height: 320px;
}
.dmp-map-stage .dmp-map-canvas {
    position: absolute;
    inset: 0;
    min-height: 0;
}

/* ---------- Compact venue mode ---------- */
.dmp-map-widget.is-compact {
    height: var(--dmp-compact-h, 500px);
    flex-direction: row;
}
.dmp-map-widget.is-compact .dmp-map-panel {
    display: none;
}
.dmp-map-widget.is-compact .dmp-map-stage {
    min-height: 0;
}
@media (max-width: 900px) {
    .dmp-map-widget.is-compact {
        height: var(--dmp-compact-h, 320px);
        flex-direction: row;
    }
}

.dmp-map-actions {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}
.dmp-map-btn {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: Syncopate, sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 11px 16px 9px;
    border-radius: 30px;
    border: 2px solid #0A2540;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(10, 37, 64, 0.18);
    transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.dmp-map-btn--explore {
    background: #00DDC7;
    border-color: #00DDC7;
    color: #0A2540;
}
.dmp-map-btn--explore:hover,
.dmp-map-btn--explore:focus,
.dmp-map-btn--explore:focus-visible {
    background: #0A2540;
    border-color: #0A2540;
    color: #FFFFFF;
}
.dmp-map-btn--directions {
    margin-left: auto;
    background: #FFFFFF;
    color: #0A2540;
}
.dmp-map-btn--directions:hover,
.dmp-map-btn--directions:focus-visible {
    background: #0A2540;
    color: #FFFFFF;
}
.dmp-map-btn-icon {
    flex-shrink: 0;
    margin-top: -2px;
}
@media (max-width: 767px) {
    .dmp-map-actions { left: 12px; right: 12px; bottom: 12px; gap: 8px; flex-direction: column-reverse; align-items: flex-start; }
    .dmp-map-btn { font-size: 11px; padding: 9px 12px 7px; }
    .dmp-map-btn--directions { margin-left: 0; }
}

.dmp-map-close {
    display: none;
}
.dmp-map-sheet-toggle {
    display: none;
}
.dmp-map-editor-note {
    margin: 0;
    padding: 24px;
    font-family: Inter, sans-serif;
    font-size: 13px;
    color: #6b7785;
}

/* ---------- Full-screen explore (opened from compact mode) ---------- */
html.dmp-map-lock,
html.dmp-map-lock body {
    overflow: hidden !important;
}
.dmp-map-widget.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 100000;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    margin: 0;
    flex-direction: row;
    border: 0;
    border-radius: 0;
    background: #FFFFFF;
}
.dmp-map-widget.is-fullscreen .dmp-map-panel {
    display: flex;
    min-height: 0;
    overflow: hidden;
}
.dmp-map-widget.is-fullscreen .dmp-map-btn--explore {
    display: none;
}
.dmp-map-widget.is-fullscreen .dmp-map-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 4;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #0A2540;
    color: #FFFFFF;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(10, 37, 64, 0.25);
}
.dmp-map-widget.is-fullscreen .dmp-map-close:hover,
.dmp-map-widget.is-fullscreen .dmp-map-close:focus,
.dmp-map-widget.is-fullscreen .dmp-map-close:focus-visible {
    background: #00DDC7;
    color: #0A2540;
}
.dmp-map-widget.is-fullscreen .maplibregl-ctrl-top-right {
    top: 64px;
}

/* Full screen on tablet / mobile: map on top, list panel underneath */
@media (max-width: 900px) {
    .dmp-map-widget.is-fullscreen {
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
    }
    .dmp-map-widget.is-fullscreen .dmp-map-stage {
        order: 1;
        flex: 1 1 auto;
        min-height: 0;
    }
    .dmp-map-widget.is-fullscreen .dmp-map-panel {
        order: 2;
        flex: 0 0 auto;
        width: 100%;
        max-height: 42%;
        border-right: none;
        border-bottom: none;
        border-top: 1px solid #e5e9ec;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -8px 24px rgba(10, 37, 64, 0.12);
        transition: max-height 0.3s ease;
    }
    .dmp-map-widget.is-fullscreen.is-sheet-open .dmp-map-panel {
        height: 82%;
        max-height: 82%;
    }
    .dmp-map-widget.is-fullscreen .dmp-map-panel-head {
        padding: 6px 16px 12px;
    }
    .dmp-map-widget.is-fullscreen .dmp-map-eyebrow {
        display: none;
    }
    .dmp-map-widget.is-fullscreen .dmp-map-heading {
        font-size: 18px;
        margin-bottom: 10px;
    }
    .dmp-map-widget.is-fullscreen .dmp-map-list {
        max-height: none;
        flex: 1 1 auto;
        min-height: 0;
    }
    .dmp-map-widget.is-fullscreen .dmp-map-sheet-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        width: 100%;
        margin: 0 0 6px;
        padding: 6px 0 2px;
        border: 0;
        background: transparent;
        font-family: Inter, sans-serif;
        font-size: 11px;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #6b7785;
        cursor: pointer;
    }
    .dmp-map-sheet-grip {
        display: block;
        width: 40px;
        height: 4px;
        border-radius: 4px;
        background: #cfd6dc;
    }
    .dmp-map-widget.is-fullscreen .dmp-map-close {
        top: 12px;
        right: 12px;
    }
    .dmp-map-widget.is-fullscreen .maplibregl-ctrl-top-right {
        top: 60px;
    }
}

/* Keep the list toggle and chips in theme colours when tapped (theme default is pink-red) */
.dmp-map-sheet-toggle:hover,
.dmp-map-sheet-toggle:focus {
    background: transparent !important;
    color: #0A2540 !important;
}
.dmp-map-chip:focus:not(.is-active):not(:hover) {
    background: #ffffff;
    color: #0A2540;
}

/* Close buttons: drawn icon so the X sits dead centre */
.dmp-map-detail-close,
.dmp-map-close {
    padding: 0;
}
.dmp-map-detail-close svg,
.dmp-map-close svg {
    display: block;
    flex-shrink: 0;
}

/* ---------- Sub-category filters (appear under the main buttons) ---------- */
.dmp-map-subfilters {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e5e9ec;
}
.dmp-map-subfilters[hidden] {
    display: none !important;
}
.dmp-map-sub-label {
    margin: 0 0 8px;
    font-family: Inter, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7785;
}
.dmp-map-sub-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 168px;
    overflow-y: auto;
}
.dmp-map-subchip {
    font-family: Inter, sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    padding: 7px 12px;
    border-radius: 30px;
    border: 1.5px solid #cfd6dc;
    background: #ffffff;
    color: #0A2540;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.dmp-map-subchip:hover,
.dmp-map-subchip:focus,
.dmp-map-subchip:focus-visible {
    background: #ffffff;
    color: #0A2540;
    border-color: #0A2540;
}
.dmp-map-subchip.is-active,
.dmp-map-subchip.is-active:hover,
.dmp-map-subchip.is-active:focus {
    background: #00DDC7;
    border-color: #00DDC7;
    color: #0A2540;
}
@media (max-width: 900px) {
    .dmp-map-widget.is-fullscreen .dmp-map-subfilters {
        margin-top: 10px;
        padding-top: 10px;
    }
    .dmp-map-widget.is-fullscreen .dmp-map-sub-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        max-height: none;
        padding-bottom: 2px;
    }
}
