.zl-map-cluster.maplibregl-marker {
    display: grid;
    place-items: center;
    min-width: 31px;
    height: 31px;
    padding: 0 7px;
    border: 1px solid #82601b;
    border-radius: 22px;
    background: #ffd456;
    color: #302008;
    box-shadow: 0 0 0 2px #ffffffd9, 0 2px 8px #35290745;
    font: 700 12px/1 system-ui, sans-serif;
    white-space: nowrap;
    cursor: pointer;
}

.zl-map-cluster.maplibregl-marker:hover {
    background: #ffe794;
    z-index: 1;
}


.zl-home .zl-explorer__map-wrap {
    display: flex;
    flex-direction: column;
}

.zl-home .zl-explorer__map-surface {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
}

.zl-home .zl-explorer__map-top {
    position: relative;
    inset: auto;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    gap: 8px;
    min-height: 58px;
    padding: 7px 13px;
    border-bottom: 1px solid #d7e3ea;
    background: #fff;
    pointer-events: auto;
}

.zl-home .zl-explorer__map-wrap:is(:fullscreen, .maplibregl-pseudo-fullscreen) .zl-explorer__map-top {
    inset: auto;
    padding-top: max(7px, env(safe-area-inset-top));
    padding-inline: max(13px, env(safe-area-inset-left)) max(13px, env(safe-area-inset-right));
}

.zl-home .zl-explorer__map-top [data-zl-district-map-slot] {
    flex: 1 1 240px;
    min-width: 0;
    max-width: 290px;
}

.zl-home .zl-explorer__district-picker {
    display: block;
    position: relative;
    margin: 0;
    min-width: 0;
}

.zl-home .zl-explorer__district-picker::after {
    content: '';
    position: absolute;
    top: calc(50% - 5px);
    right: 13px;
    width: 7px;
    height: 7px;
    transform: rotate(45deg);
    border-right: 1.5px solid #176a9c;
    border-bottom: 1.5px solid #176a9c;
    pointer-events: none;
}

.zl-home #zl-district {
    width: 100%;
    height: 42px;
    min-width: 0;
    margin: 0;
    padding: 0 29px 0 12px;
    appearance: none;
    border: 1px solid #bacfdc;
    border-radius: 7px;
    background: #f5f9fc;
    color: #184c6b;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
}

.zl-home .zl-explorer__map-top .zl-explorer__basemap {
    flex: 0 0 auto;
    border: 1px solid #d7e3ea;
    border-radius: 8px;
    background: #f3f7fa;
    box-shadow: none;
}

.zl-home .zl-explorer__map-top .zl-explorer__basemap button {
    padding: 5px 10px;
    min-height: 34px;
    white-space: nowrap;
    font-weight: 600;
}

.zl-home .zl-explorer__map-top .zl-explorer__basemap button[aria-pressed="true"] {
    background: white;
    color: #176a9c;
    box-shadow: 0 1px 3px #122d3e21;
}

.zl-home .zl-map-frame .maplibregl-ctrl-top-right {
    display: flex;
    gap: 6px;
}

.zl-home .zl-map-frame .maplibregl-ctrl-top-right .maplibregl-ctrl-group {
    display: flex;
    margin: 0;
}

.zl-home .zl-map-frame .maplibregl-ctrl-top-right .maplibregl-ctrl-group button + button {
    border-top: 0;
    border-left: 1px solid #dbe5e7;
}

.zl-home .zl-explorer__overview {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    min-height: 44px;
    padding: 5px 11px;
    border: 1px solid #c2d0d4;
    border-radius: 8px;
    color: #223c49;
    box-shadow: 0 2px 7px #102b4329;
    font-weight: 650;
}

.zl-home .zl-explorer__overview span {
    margin-right: 2px;
    font-size: 16px;
    vertical-align: -1px;
}

.zl-home .zl-explorer__map-wrap:is(:fullscreen, .maplibregl-pseudo-fullscreen) .zl-explorer__overview {
    left: max(12px, env(safe-area-inset-left));
}

.zl-home .zl-explorer__area-search { top: 66px; }
.zl-home .zl-explorer__area-clear { top: 108px; }

.zl-home .zl-explorer__boundary-key,
.zl-home .zl-explorer__cluster-key {
    display: flex;
    align-items: center;
    gap: 5px;
}

.zl-home .zl-explorer__cluster-key { display: none; }

.zl-home .zl-explorer__cluster-key::before {
    content: '';
    width: 8px;
    height: 8px;
    border: 1px solid #82601b;
    border-radius: 50%;
    background: #ffd456;
}

.zl-home .zl-explorer.has-clusters .zl-explorer__cluster-key { display: flex; }

.zl-home .zl-explorer__map-wrap :is(select, button):focus-visible {
    outline: 2px solid #176a9c !important;
    outline-offset: -3px;
}

@media (min-width: 991px) {
    .zl-home .zl-explorer__filter-row {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, .8fr) auto;
    }
}

@media (max-width: 767px) {
    .zl-home .zl-explorer__map-top {
        min-height: 54px;
        padding: 6px 9px;
    }

    .zl-home #zl-district { padding-left: 8px; font-size: 12px; }
    .zl-home .zl-explorer__map-top .zl-explorer__basemap button { padding-inline: 7px; }

    .zl-home .zl-explorer__mobile-switch {
        position: static;
        transform: none;
        width: max-content;
        margin: 0 0 8px;
        box-shadow: none;
    }

    .zl-home .zl-explorer__workspace {
        height: clamp(380px, 73svh, 510px);
        min-height: 0;
        max-height: none;
    }

    .zl-home .zl-explorer__workspace[data-mobile-view=list] .zl-explorer__results {
        padding-top: 0;
        padding-bottom: 0;
    }

    .zl-home .zl-explorer__legend { bottom: 27px; }
    .zl-home .zl-explorer__selection { bottom: 56px; }
    .zl-home .zl-explorer.has-clusters .zl-explorer__boundary-key { display: none; }
}

.zl-home .zl-explorer__districts {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
}

.zl-home .zl-explorer__districts[hidden],
.zl-home .zl-explorer__districts [hidden],
.zl-home .zl-browsing-districts .zl-explorer__cluster,
.zl-home .zl-browsing-districts .zl-explorer__legend,
.zl-home .zl-browsing-districts .zl-explorer__quick-note {
    display: none;
}

.zl-home .zl-explorer__districts .zl-explorer__district-badge {
    position: absolute;
    z-index: 1;
    transform: translate(-50%,-50%);
    width: max-content;
    min-height: 42px;
    max-width: 157px;
    padding: 6px 12px;
    border: 1px solid #82601b;
    border-radius: 999px;
    background: #ffd456;
    color: #302008;
    box-shadow: 0 0 0 2px #ffffffde, 0 2px 8px #35290740;
    font-family: inherit;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    pointer-events: auto;
}

.zl-home .zl-explorer__districts .zl-explorer__district-badge:hover {
    background: #ffe794;
    z-index: 2;
}

.zl-home .zl-explorer__district-line {
    position: absolute;
    height: 1px;
    transform-origin: left center;
    background: #82601b;
}

.zl-home .zl-explorer__district-pin {
    position: absolute;
    width: 7px;
    height: 7px;
    transform: translate(-50%,-50%);
    border: 1px solid #82601b;
    border-radius: 50%;
    background: #ffd456;
}

@media (max-width: 767px) {
    .zl-home .zl-explorer__districts .zl-explorer__district-badge {
        max-width: 114px;
        min-height: 40px;
        padding-inline: 9px;
        font-size: 11px;
    }
}
