@media (max-width: 1024px) {
    #rz-explore.mayan-explore-ready {
        --mayan-map-top: var(--wp-admin--admin-bar--height, 0px);
        --mayan-heading-height: 60px;
        --mayan-bottom-nav: 64px;
        display: block;
    }
    #rz-explore.mayan-explore-ready .brk-explore-sidebar {
        width: 100%;
        max-width: none;
        margin-top: 0;
        border-radius: 0;
    }
    #rz-explore.mayan-explore-ready .brk-explore-content {
        position: fixed;
        inset: calc(var(--mayan-map-top) + var(--mayan-heading-height)) 0 calc(var(--mayan-bottom-nav) + 108px);
        height: auto;
        margin: 0;
        visibility: hidden;
        pointer-events: none;
    }
    #rz-explore.mayan-explore-ready .brk-explore-content .brk--map {
        position: absolute;
        inset: 0;
        height: auto;
        padding: 0;
        margin: 0;
    }
    #rz-explore.mayan-explore-ready .brk-explore-content .rz-explore-map { margin: 0; }
    #rz-explore.mayan-explore-ready .rz-search-filter--inline {
        position: relative;
        inset: auto;
        width: auto;
        margin: 12px 16px 0;
    }
    .mayan-explore-ready .mayan-results-controls {
        margin: 0 16px;
        padding: 6px 0;
        border-bottom: 1px solid var(--border, #ddd);
        background: white;
    }
    .mayan-explore-ready .mayan-results-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        column-gap: 6px;
        min-height: 44px;
        font-size: 13px;
        line-height: 1.3;
    }
    .mayan-results-row .mayan-result-order { grid-column: 3; justify-self: end; color: #49575f; }
    .mayan-explore-ready :is(.mayan-results-controls, .mayan-map-heading) button {
        border: 0;
        padding: 0;
        font: inherit;
        color: #005781;
        background: transparent;
        cursor: pointer;
    }
    .mayan-explore-ready .mayan-results-row .mayan-map-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 44px;
        position: relative;
        isolation: isolate;
        padding-inline: 12px;
        font-weight: 600;
        color: white;
    }
    .mayan-map-toggle::before {
        content: "";
        position: absolute;
        inset: 6px 0;
        z-index: -1;
        border-radius: 100px;
        background: linear-gradient(95deg, #003568, #006694);
    }
    .mayan-explore-ready :is(.mayan-map-short, .mayan-sheet-list, .mayan-sheet-handle, .brk-listing-summary) { display: none; }
    .mayan-explore-ready [hidden] { display: none; }
    .mayan-explore-ready.mayan-map-open .mayan-map-heading {
        position: fixed;
        inset: var(--mayan-map-top) 0 auto;
        display: flex;
        align-items: center;
        gap: 6px;
        min-height: 56px;
        padding: 4px 12px;
        z-index: 4;
        border-bottom: 1px solid var(--border, #ddd);
        background: white;
    }
    .mayan-map-heading > div { flex: 1; min-width: 0; }
    .mayan-map-heading strong { display: block; font-size: 16px; line-height: 1.25; }
    .mayan-map-heading .mayan-map-criteria { display: block; font-size: 12px; line-height: 1.4; color: #445965; }
    .mayan-map-heading button { min-height: 44px; min-width: 40px; }
    .mayan-map-open .mayan-map-edit {
        position: absolute;
        z-index: 1;
        inset: 8px auto auto 50%;
        transform: translateX(-50%);
        display: inline-flex;
        align-items: center;
        gap: 7px;
        min-height: 44px;
        padding: 0 15px;
        background: white;
        border: 0;
        border-radius: 28px;
        box-shadow: 0 3px 14px #19384c2b;
        font: inherit;
        font-size: 13px;
        font-weight: 600;
        color: #004c72;
        white-space: nowrap;
        cursor: pointer;
    }
    #rz-explore.mayan-map-open .brk-explore-content { visibility: visible; pointer-events: auto; }
    #rz-explore.mayan-map-open .brk-explore-sidebar {
        margin-top: max(calc(var(--mayan-map-top) + var(--mayan-heading-height)), calc(100dvh - var(--mayan-bottom-nav) - 110px));
        min-height: calc(100dvh - var(--mayan-map-top) - var(--mayan-heading-height));
        background: white;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -4px 16px #163e4b18;
    }
    .mayan-map-open .rz-dynamic-filter { display: none; }
    /* Keep native gallery overlays beneath the sticky map controls as cards scroll. */
    .mayan-map-open .rz-explore-listings { isolation: isolate; }
    .mayan-map-open .mayan-results-controls {
        position: sticky;
        top: calc(var(--mayan-map-top) + var(--mayan-heading-height));
        z-index: 2;
        margin: 0;
        padding: 0 16px;
        border-radius: 18px 18px 0 0;
    }
    .mayan-map-open.mayan-sheet-docked :is(.mayan-results-controls, .brk-explore-sidebar) { border-radius: 0; }
    .mayan-map-open .mayan-sheet-handle {
        display: grid;
        place-items: center;
        width: 100%;
        height: 23px;
        cursor: ns-resize;
        touch-action: pan-y;
    }
    .mayan-sheet-handle span { width: 40px; height: 3px; border-radius: 99px; background: #adbac1; }
    .mayan-map-open .mayan-results-row { min-height: 33px; }
    .mayan-map-open .mayan-results-row :is(.mayan-map-toggle, .mayan-result-order) { display: none; }
    .mayan-map-open .mayan-sheet-list {
        display: inline-flex;
        justify-self: end;
        align-items: center;
        gap: 6px;
        grid-column: 3;
        min-height: 36px;
    }
}
@media (max-width: 359px) {
    .mayan-explore-ready .mayan-map-toggle .mayan-map-full { display: none; }
    .mayan-explore-ready .mayan-map-toggle .mayan-map-short { display: inline; }
}
