/* Keep both top tabs visible while the feed replaces only the detail content. */
.listing-display-box.is-map-area-mode > .listing-display-tabs {
    display: flex !important;
}

.listing-display-box.is-map-area-mode > :not(.listing-map-area-panel):not(.listing-display-tabs) {
    display: none !important;
}

/* Match the active Map Area tab to the Add a free listing hover treatment. */
.listing-display-map-area-tab.is-active {
    box-shadow: inset 0 8px 14px rgba(3, 129, 32, 0.055);
}

/* Clear TRADEL-green filter indicator without making the border thicker. */
.reset-category-btn.is-filter-active {
    border: 1px solid #038120;
    background: #ffffff;
    box-shadow:
        0 0 0 3px rgba(3, 129, 32, 0.16),
        0 5px 14px rgba(3, 129, 32, 0.18);
}

.reset-category-btn.is-filter-active:hover {
    border-color: #02751d;
    background: rgba(3, 129, 32, 0.05);
    box-shadow:
        0 0 0 4px rgba(3, 129, 32, 0.18),
        0 6px 16px rgba(3, 129, 32, 0.2);
}

/* Align the right panel exactly with the map row only while both are columns. */
@media (min-width: 1101px) {
    .browse-map-layout > .listing-display-box,
    .browse-map-layout > .listing-display-shell {
        align-self: stretch;
        height: 540px;
        min-height: 540px;
    }

    .browse-map-layout > .listing-display-box {
        position: relative;
        top: auto;
    }

    .listing-display-shell .listing-display-box {
        position: relative;
        top: auto;
        height: 100%;
    }
}

/*
 * At the one-column breakpoint the tabs sit above the details box.
 * Reserve their height so they cannot overlap the bottom of the map.
 */
@media (max-width: 1100px) {
    .browse-map-layout > .listing-display-tabs-host {
        margin-top: 42px;
    }

    .listing-display-tabs .listing-display-floating-cta {
        display: inline-flex !important;
    }

    .browse-map-floating-cta {
        display: none !important;
    }

    .listing-display-box,
    .listing-display-shell .listing-display-box {
        top: auto;
    }
}

/* Compact feed header with a proper back action. */
.listing-map-area-panel__header {
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding-bottom: 12px;
}

.listing-map-area-panel__header > div {
    min-width: 0;
}

.listing-map-area-panel__header p {
    display: none !important;
}

.listing-map-area-panel__close {
    order: -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    font-size: 20px;
    font-weight: 700;
}
