.listing-display-tabs-host {
    position: relative;
}

.listing-display-tabs {
    position: absolute;
    left: 50%;
    bottom: 100%;
    z-index: 12;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    transform: translateX(-50%);
    pointer-events: none;
}

.listing-display-tabs .listing-display-floating-cta,
.listing-display-map-area-tab {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    width: auto;
    min-width: 170px;
    max-width: 250px;
    min-height: 36px;
    padding: 0 18px;
    pointer-events: auto;
}

.listing-display-map-area-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 28px 28px 0 0;
    background: #fff;
    color: #176438;
    box-shadow:
        inset 0 7px 12px rgba(255, 255, 255, 0.9),
        inset 0 -7px 12px rgba(20, 60, 40, 0.035);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.listing-display-map-area-tab::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 7px;
    background: #fff;
    pointer-events: none;
}

.listing-display-map-area-tab:hover,
.listing-display-map-area-tab.is-active {
    color: #038120;
    background:
        linear-gradient(
            180deg,
            rgba(2, 139, 2, 0.13) 0%,
            rgba(3, 129, 32, 0.035) 44%,
            rgba(255, 255, 255, 1) 100%
        );
}

.listing-display-map-area-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(3, 129, 32, 0.1);
    color: #176438;
    font-size: 11px;
    font-weight: 800;
}

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

.listing-map-area-panel {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.listing-map-area-panel[hidden] {
    display: none !important;
}

.listing-map-area-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 2px 2px 14px;
    border-bottom: 1px solid rgba(20, 60, 40, 0.09);
}

.listing-map-area-panel__header h3 {
    margin: 0;
    color: #111;
    font-size: 22px;
    line-height: 1.15;
}

.listing-map-area-panel__header p {
    margin: 5px 0 0;
    color: #667085;
    font-size: 13px;
}

.listing-map-area-panel__close {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(20, 60, 40, 0.07);
    color: #31513a;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.listing-map-area-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 4px 4px 0;
    scrollbar-width: thin;
}

.map-area-card {
    width: 100%;
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border: 0;
    border-bottom: 1px solid rgba(20, 60, 40, 0.08);
    border-radius: 16px;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.map-area-card:hover,
.map-area-card:focus-visible {
    background: rgba(3, 129, 32, 0.055);
    outline: none;
}

.map-area-card__image {
    width: 108px;
    height: 86px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #eef4ef;
}

.map-area-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map-area-card__image-fallback {
    color: #6b7d70;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.map-area-card__content {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.map-area-card__category {
    margin-bottom: 4px;
    color: #15803d;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.2;
}

.map-area-card__title {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #161616;
    font-size: 15px;
    font-weight: 760;
    line-height: 1.22;
}

.map-area-card__location {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 7px;
    overflow: hidden;
    color: #667085;
    font-size: 12px;
    line-height: 1.25;
}

.map-area-card__location strong {
    flex: 0 0 auto;
    color: #31513a;
    font-weight: 800;
}

.map-area-card__place {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-area-card__footer {
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.map-area-card__price {
    color: #111;
    font-size: 13px;
    font-weight: 800;
}

.map-area-card__arrow {
    color: #15803d;
    font-size: 22px;
    line-height: 1;
}

.listing-map-area-empty {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #667085;
    text-align: center;
}

.listing-map-area-empty strong {
    color: #31513a;
}

.listing-map-area-more {
    align-self: center;
    margin-top: 8px;
    padding: 9px 16px;
    border: 0;
    border-radius: 999px;
    background: rgba(3, 129, 32, 0.09);
    color: #176438;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 900px) {
    .listing-display-tabs {
        gap: 6px;
    }

    .listing-display-tabs .listing-display-floating-cta,
    .listing-display-map-area-tab {
        min-width: 138px;
        padding: 0 12px;
        font-size: 12px;
    }
}

@media (max-width: 640px) {
    .listing-display-tabs {
        width: calc(100% - 32px);
        justify-content: center;
    }

    .listing-display-tabs .listing-display-floating-cta,
    .listing-display-map-area-tab {
        flex: 1 1 0;
        min-width: 0;
        max-width: 190px;
    }

    .map-area-card {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 10px;
        padding: 9px 6px;
    }

    .map-area-card__image {
        width: 88px;
        height: 74px;
    }
}
