/* Realty feed map preview + fullscreen */

#feed-map-root {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
    /* Spacing comes from .messages-list row-gap (30px), same as between ads */
    margin: 0;
    clear: both;
    box-sizing: border-box;
}

.feed-map {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    border-radius: 10px;
    background: #E8E8E8;
    overflow: hidden;
    cursor: pointer;
}

.feed-map[hidden] {
    display: none !important;
}

.feed-map__open-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    appearance: none;
    border: 0;
    border-radius: 8px;
    padding: 9px 14px;
    background: #243447;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.feed-map__open-btn:hover {
    background: #1a2633;
}

.feed-map__preview {
    width: 100%;
    height: 220px;
    background: #E8E8E8;
}

@media (max-width: 767px) {
    .feed-map__preview {
        height: 180px;
    }

    .feed-map__open-btn {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Floating open-map button — shown after scrolling past the preview */
.feed-map-fab {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 10040;
    width: 48px;
    height: 48px;
    padding: 0;
    display: none;
    align-items: center;
    justify-content: center;
    appearance: none;
    border: 0;
    border-radius: 10px;
    background: #243447;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}

.feed-map-fab.is-visible {
    display: inline-flex;
}

.feed-map-fab:hover {
    background: #1a2633;
}

.feed-map-fab svg {
    width: 24px;
    height: 24px;
    display: block;
}

body.feed-map-fs-open .feed-map-fab {
    display: none !important;
}

@media (max-width: 767px) {
    .feed-map-fab {
        top: 10px;
        right: 10px;
        width: 44px;
        height: 44px;
        border-radius: 10px;
    }

    .feed-map-fab svg {
        width: 22px;
        height: 22px;
    }
}

/* Fullscreen */
.feed-map-fs {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    background: #ECEFF3;
}

.feed-map-fs.is-open {
    display: block;
}

.feed-map-fs.is-booting .feed-map-fs__map {
    background: #ECEFF3;
}

body.feed-map-fs-open {
    overflow: hidden;
}

html.feed-map-restore,
html.feed-map-restore body {
    overflow: hidden !important;
}

.feed-map-fs__map {
    width: 100%;
    height: 100%;
}

.feed-map-fs.has-sidebar .feed-map-fs__map {
    width: calc(100% - 360px);
    margin-left: 360px;
}

.feed-map-fs__top {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 2;
}

.feed-map-fs.has-sidebar .feed-map-fs__top {
    left: 376px;
}

.feed-map-fs__list-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    appearance: none;
    border: 0;
    border-radius: 8px;
    padding: 10px 14px;
    background: #243447;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.feed-map-fs__list-btn:hover {
    background: #1a2633;
}

.feed-map-fs__sidebar {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    width: 360px;
    max-width: 100%;
    height: 100%;
    background: #F7F8FA;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
    overflow: auto;
}

.feed-map-fs__sidebar[hidden] {
    display: none !important;
}

.feed-map-fs__sidebar-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.2);
}

.feed-map-fs__cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
}

/* Solo-like cards in map sidebar */
.feed-map-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.feed-map-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.feed-map-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #E8E8E8;
    overflow: hidden;
    line-height: 0;
}

.feed-map-card__media--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.3;
}

.feed-map-card__media .swiper-container,
.feed-map-card__media .video-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.feed-map-card__media .swiper-wrapper,
.feed-map-card__media .video-wrapper,
.feed-map-card__media .swiper-slide {
    width: 100%;
    height: 100%;
}

.feed-map-card__media .video-wrapper {
    position: relative;
}

.feed-map-card__media img,
.feed-map-card__media video.mes-video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    vertical-align: top;
}

.feed-map-card__media .feed-card-photo-label {
    display: block;
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 4;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    pointer-events: none;
}

.feed-map-card__media .swiper-pagination {
    display: none !important;
}

/* Override global .play-icon-overlay (msg-one.css) which uses translate(-50%,-50%)
   and pointer-events:none — that pushed the button off-screen inside overflow:hidden. */
.feed-map-card__media .play-icon-overlay {
    position: absolute;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.22);
    cursor: pointer;
    z-index: 3;
    transform: none;
    pointer-events: auto;
    line-height: normal;
}

.feed-map-card__media .play-button {
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    margin: 0;
    position: relative;
    flex-shrink: 0;
    box-sizing: border-box;
}

.feed-map-card__media .play-button::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-35%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #fff;
}

.feed-map-card__body {
    padding: 14px 16px 16px;
}

.feed-map-card__title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #002F34;
}

.feed-map-card__price {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    color: #002F34;
}

.feed-map-card__props {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.4;
    color: #4b5563;
}

.feed-map-card__desc {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.45;
    color: #374151;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.feed-map-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

.feed-map-card__meta {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    line-height: 1.3;
    color: #6b7280;
}

.feed-map-card__cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid #f37032;
    border-radius: 8px;
    background: #fff;
    color: #f37032;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.feed-map-card__link:hover .feed-map-card__cta {
    background: #f37032;
    color: #fff;
}

@media (max-width: 767px) {
    .feed-map-fs.has-sidebar .feed-map-fs__map {
        width: 100%;
        margin-left: 0;
        height: 45vh;
    }

    .feed-map-fs__sidebar {
        top: auto;
        bottom: 0;
        left: 0;
        width: 100%;
        height: auto;
        max-height: 55vh;
        box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18);
    }

    .feed-map-fs.has-sidebar .feed-map-fs__top {
        left: 12px;
        top: 12px;
    }

    .feed-map-fs__top {
        top: 12px;
        left: 12px;
    }

    .feed-map-fs__list-btn {
        padding: 9px 12px;
        font-size: 13px;
    }

    .feed-map-card__title {
        font-size: 16px;
    }

    .feed-map-card__price {
        font-size: 18px;
    }
}
