/* spot_map.css — объявления на карте (map.tpl, include/form_filters/map.php). Полировка 10.2026: старая страница в стиле редизайна.
   Токены — spot_ui.css, классы с префиксом spot-. Телефон: карта сверху (50vh), список карточками под ней; десктоп (≥992):
   список слева, карта справа, высота обеих колонок — окно под шапкой (--spot-map-h ставит js/spot_map.js).
   js/map.js по-прежнему пишет inline-размеры и положение .map-search-sidebar / .map-search-instance — здесь они гасятся !important,
   разметка и обработчики (map-search-*, #map_instance, #modal-map-filters) не меняются. */

body.spot-map-body {
    background: var(--spot-bg);
}

.spot-map {
    --spot-map-h: 640px;
    font-family: var(--spot-font);
    color: var(--spot-ink);
    padding-top: 4px;
    padding-bottom: calc(16px + var(--spot-safe-bottom));
}

.spot-map-hide {
    display: none;
}

/* ---------- Навигационная цепочка (как .spot-pg-crumbs) ---------- */
.spot-map-crumbs ol {
    margin: 0;
    padding: 4px 0 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 4px;
    font-size: 13px;
    line-height: 18px;
}

.spot-map-crumbs li {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.spot-map-crumbs li + li::before {
    content: "›";
    color: var(--spot-mut);
}

.spot-map-crumbs a {
    min-height: 44px;
    display: flex;
    align-items: center;
    color: var(--spot-mut);
    text-decoration: none;
}

.spot-map-crumbs [aria-current] {
    min-height: 44px;
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--spot-ink);
}

/* ---------- Заголовок и инструменты ---------- */
.spot-map-head {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 0 12px;
}

.spot-map-head__txt {
    min-width: 0;
}

.spot-map-h1 {
    margin: 0;
    font-family: var(--spot-font);
    font-size: 26px;
    font-weight: 800;
    line-height: 32px;
    letter-spacing: -0.4px;
    color: var(--spot-ink);
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.spot-map-geo {
    margin: 6px 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    line-height: 18px;
    color: var(--spot-mut);
}

.spot-map-geo svg {
    flex-shrink: 0;
    color: var(--spot-red-fg);
}

.spot-map-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spot-map-tool {
    position: relative;
    flex-shrink: 0;
    height: var(--spot-control-h);
    box-sizing: border-box;
    padding: 0 14px;
    border: 0;
    border-radius: var(--spot-radius);
    background: var(--spot-surface);
    box-shadow: inset 0 0 0 1px var(--spot-line);
    color: var(--spot-ink);
    font-family: var(--spot-font);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    cursor: pointer;
}

.spot-map-tool--icon {
    width: var(--spot-control-h);
    padding: 0;
    justify-content: center;
}

.spot-map-tool:active {
    opacity: .7;
}

.spot-map-tool:disabled {
    opacity: .55;
    cursor: default;
}

/* счётчик выбранных фильтров: прежний класс .map-label-count (styles.css рисует его абсолютно) — здесь в строке кнопки */
.spot-map-tool .map-label-count {
    position: static;
    width: 22px;
    height: 22px;
    margin: 0;
    border: 0;
    border-radius: 11px;
    background: var(--spot-red);
    color: var(--spot-on-inv) !important;
    font-size: 12px;
    font-weight: 700;
}

/* рисование области (только Яндекс) — мышью, на телефоне и планшете не показываем, как и раньше */
@media (max-width: 991.98px) {
    .spot-map-tools .map-search-controls-draw,
    .spot-map-tools .map-search-controls-draw-close {
        display: none !important;
    }
}

/* ---------- Чипы выбранных значений (как в каталоге) ---------- */
.spot-map-chips {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 -15px;
    padding: 0 15px 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.spot-map-chips::-webkit-scrollbar {
    display: none;
}

/* правый край ленты: последний чип не упирается в срез экрана */
.spot-map-chips::after {
    content: "";
    flex: 0 0 8px;
}

.spot-map-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 260px;
    height: var(--spot-control-h);
    box-sizing: border-box;
    padding: 0 14px 0 10px;
    border-radius: 22px;
    background: var(--spot-inv);
    color: var(--spot-on-inv);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}

.spot-map-chip:hover,
.spot-map-chip:focus {
    color: var(--spot-on-inv);
    text-decoration: none;
}

.spot-map-chip .spot-cat-ico {
    flex-shrink: 0;
    opacity: .7;
}

.spot-map-chip__t {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spot-map-chip:active {
    opacity: .7;
}

.spot-map-chips__reset {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    height: var(--spot-control-h);
    padding: 0 8px;
    color: var(--spot-red-fg);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
}

.spot-map-chips__reset:hover,
.spot-map-chips__reset:focus {
    color: var(--spot-red-dark-fg);
    text-decoration: none;
}

/* ---------- Кнопки оболочки ---------- */
.spot-map-btn {
    min-height: var(--spot-control-h);
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--spot-radius);
    font-family: var(--spot-font);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.spot-map-btn:hover,
.spot-map-btn:focus {
    text-decoration: none;
}

.spot-map-btn:active {
    opacity: .7;
}

.spot-map-btn--primary,
.spot-map-btn--primary:hover,
.spot-map-btn--primary:focus {
    background: var(--spot-red);
    color: var(--spot-on-inv);
}

.spot-map-btn--ghost,
.spot-map-btn--ghost:hover,
.spot-map-btn--ghost:focus {
    background: var(--spot-surface);
    color: var(--spot-ink);
    box-shadow: inset 0 0 0 1px var(--spot-field-border);
}

.spot-map-btn--soft,
.spot-map-btn--soft:hover,
.spot-map-btn--soft:focus {
    background: var(--spot-field);
    color: var(--spot-ink);
}

.spot-map-btn--grow {
    flex: 1 1 auto;
    min-width: 0;
}

/* ---------- Сетка: карта и панель списка ---------- */
.spot-map .map-search-container {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: auto;
    height: auto !important;
    overflow: visible;
}

.spot-map-mapwrap {
    position: relative;
    isolation: isolate;
    box-sizing: border-box;
    border: 1px solid var(--spot-line);
    border-radius: var(--spot-radius-l);
    overflow: hidden;
    background: var(--spot-field);
}

.spot-map .map-search-instance {
    position: relative;
    z-index: 0;
    width: 100%;
    height: 50vh !important;
    height: 50dvh !important; /* телефон: от видимой области, а не от окна с панелью браузера */
    min-height: 320px;
    background: var(--spot-field);
}

.spot-map-draw {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
    display: none;
}

/* «карта не загрузилась» (js/spot_map.js) */
.spot-map-fallback {
    position: absolute;
    inset: 0;
    z-index: 3;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px;
    text-align: center;
    background: var(--spot-surface);
    color: var(--spot-ink);
}

.spot-map-fallback[hidden] {
    display: none;
}

.spot-map-fallback__ic {
    width: 64px;
    height: 64px;
    border-radius: 32px;
    background: var(--spot-bg);
    color: var(--spot-ink-2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.spot-map-fallback__title {
    font-size: 20px;
    font-weight: 800;
    line-height: 26px;
}

.spot-map-fallback p {
    max-width: 360px;
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 21px;
    color: var(--spot-ink-2);
}

/* панель списка: прежний .map-search-sidebar (styles.css прячет, map.js показывает и ставит inline-координаты) */
.spot-map .map-search-sidebar {
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    z-index: auto;
    box-sizing: border-box;
    border: 1px solid var(--spot-line);
    border-radius: var(--spot-radius-l);
    background: var(--spot-surface);
    box-shadow: none;
    scroll-margin-top: calc(var(--spot-header-h) + var(--spot-search-h) + 8px);
}

.spot-map .map-search-offers-header {
    height: auto;
    margin: 0;
    padding: 12px 16px 10px;
    border-bottom: 1px solid var(--spot-line);
}

.spot-map-panel__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2px 12px;
}

.spot-map-count {
    min-width: 0;
    font-size: 17px;
    font-weight: 800;
    line-height: 22px;
    color: var(--spot-ink);
}

.spot-map-count .map-search-offers-header-count-info {
    margin-right: 6px;
    font-size: 16px;
    color: var(--spot-mut);
    vertical-align: -1px;
}

.spot-map-sub {
    height: var(--spot-control-h);
    margin: -6px -10px -6px 0;
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--spot-focus);
    font-family: var(--spot-font);
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-align: right;
    white-space: normal;
}

.spot-map-sub .spot-cat-ico {
    flex-shrink: 0;
}

.spot-map-sub:active {
    opacity: .7;
}

/* список: сетка карточек 2 колонки (ajax отдаёт .row.no-gutters > .col-6 > .item-grid) */
.spot-map .map-search-offers-list {
    height: auto !important;
    overflow: visible;
    padding: 10px;
}

.spot-map .map-search-offers-list > .row {
    margin: 0 -5px;
}

.spot-map .map-search-offers-list .col-6 {
    padding: 5px;
}

.spot-map .map-search-offers-list .item-grid {
    margin: 0;
    height: 100%;
    box-sizing: border-box;
    border: 1px solid var(--spot-line);
    border-radius: var(--spot-radius);
    background: var(--spot-surface);
    box-shadow: none;
    transition: none;
}

.spot-map .map-search-offers-list .item-grid-img,
.spot-map .map-search-offers-list .item-grid-img a {
    height: 132px;
}

.spot-map .map-search-offers-list .item-grid-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spot-map .map-search-offers-list .item-grid-count-photo {
    right: 8px;
    bottom: 8px;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--spot-font);
}

.spot-map .map-search-offers-list .item-grid-info {
    padding: 10px 12px 12px;
}

.spot-map .map-search-offers-list .item-grid-price {
    margin-bottom: 2px;
}

.spot-map .map-search-offers-list .item-grid-price-now,
.spot-map .map-search-offers-list .board-view-price {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--spot-ink);
}

.spot-map .map-search-offers-list .item-grid-price-old {
    margin-right: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--spot-mut);
}

.spot-map .map-search-offers-list .item-grid-info > a {
    font-size: 14px;
    line-height: 19px;
    font-weight: 500;
    color: var(--spot-ink-2);
    -webkit-line-clamp: 2;
}

/* загрузка списка */
.spot-map .map-search-offers-list .preload {
    margin: 0;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spot-map .map-search-offers-list .preload::after {
    content: "";
    width: 22px;
    height: 22px;
    box-sizing: border-box;
    border: 2px solid var(--spot-line);
    border-top-color: var(--spot-red);
    border-radius: 50%;
    animation: spot-map-spin .8s linear infinite;
}

@keyframes spot-map-spin {
    to { transform: rotate(-360deg); }
}

/* пусто: ничего не найдено / нет объявлений в этой области (ajax отдаёт тот же блок со значком las — значок прячем, свой — круг ::before
   и булавка-маска ::after с цветом из токена) */
.spot-map .map-no-result {
    position: relative;
    margin: 0;
    padding: 28px 16px 20px;
    text-align: center;
}

.spot-map .map-no-result i.las {
    display: none;
}

.spot-map .map-no-result::before {
    content: "";
    display: block;
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 32px;
    background: var(--spot-bg);
}

.spot-map .map-no-result::after {
    content: "";
    position: absolute;
    right: 50%;
    top: 46px;
    width: 28px;
    height: 28px;
    margin-right: -14px;
    background-color: var(--spot-ink-2);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 21s-6.5-6-6.5-11a6.5 6.5 0 0113 0c0 5-6.5 11-6.5 11z' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='10' r='2.3' stroke='%23000' stroke-width='1.8'/%3E%3C/svg%3E") center / 28px 28px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 21s-6.5-6-6.5-11a6.5 6.5 0 0113 0c0 5-6.5 11-6.5 11z' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='10' r='2.3' stroke='%23000' stroke-width='1.8'/%3E%3C/svg%3E") center / 28px 28px no-repeat;
}

.spot-map .map-no-result h6 {
    margin: 0 0 6px;
    font-family: var(--spot-font);
    font-size: 17px;
    font-weight: 800;
    line-height: 22px;
    color: var(--spot-ink);
}

.spot-map .map-no-result p {
    margin: 0;
    font-size: 14px;
    line-height: 20px;
    color: var(--spot-ink-2);
}

.spot-map .map-no-result .spot-map-btn {
    margin-top: 16px;
}

/* постраничная навигация списка (out_navigation: .pagination > .page-item > .page-link) */
.spot-map .pagination-map-offers {
    margin: 6px 0 4px;
    gap: 6px;
    flex-wrap: wrap;
}

.spot-map .pagination-map-offers .page-link {
    min-width: 44px;
    height: 44px;
    box-sizing: border-box;
    margin: 0;
    padding: 0 10px;
    border: 1px solid var(--spot-line);
    border-radius: 10px;
    background: var(--spot-surface);
    color: var(--spot-ink);
    font-family: var(--spot-font);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.spot-map .pagination-map-offers .page-item.active .page-link {
    background: var(--spot-red);
    border-color: var(--spot-red);
    color: var(--spot-on-inv);
}

/* карточка выбранной метки (loadOffer) */
.spot-map .map-search-offer-header {
    padding: 6px 8px;
    border-bottom: 1px solid var(--spot-line);
}

.spot-map-back {
    height: var(--spot-control-h);
    padding: 0 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--spot-ink);
    font-family: var(--spot-font);
    font-size: 15px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.spot-map-back:active {
    opacity: .7;
}

.spot-map .map-search-offer-item {
    padding: 12px;
}

.spot-map .map-search-offer-item .item-grid {
    margin: 0 !important;
    border: 1px solid var(--spot-line);
    border-radius: var(--spot-radius);
    box-shadow: none;
}

.spot-map .map-search-offer-item .item-grid-info > a {
    -webkit-line-clamp: 2;
    font-size: 15px;
    line-height: 20px;
}

/* ---------- Десктоп: список слева, карта справа ---------- */
@media (min-width: 992px) {
    .spot-map {
        padding-top: 0;
        padding-bottom: 24px;
    }

    .spot-map-crumbs ol {
        padding-top: 8px;
    }

    .spot-map-head {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 16px;
        padding: 4px 0 16px;
    }

    .spot-map-h1 {
        font-size: 32px;
        line-height: 40px;
    }

    .spot-map-chips {
        margin: 0;
        padding: 0 0 16px;
        flex-wrap: wrap;
        overflow: visible;
    }

    .spot-map-chips::after {
        display: none;
    }

    .spot-map .map-search-container {
        display: grid;
        grid-template-columns: 460px minmax(0, 1fr);
        gap: 16px;
        height: var(--spot-map-h) !important;
    }

    .spot-map-mapwrap {
        grid-column: 2;
        grid-row: 1;
        height: var(--spot-map-h);
    }

    .spot-map .map-search-instance {
        height: 100% !important;
        min-height: 0;
    }

    .spot-map .map-search-sidebar {
        grid-column: 1;
        grid-row: 1;
        height: var(--spot-map-h) !important;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .spot-map .map-search-offers-header {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--spot-surface);
    }

    .spot-map .map-search-offers-list {
        padding: 12px;
    }

    .spot-map .map-search-offers-list .item-grid-img,
    .spot-map .map-search-offers-list .item-grid-img a {
        height: 150px;
    }
}

@media (min-width: 1200px) {
    .spot-map .map-search-container {
        grid-template-columns: 520px minmax(0, 1fr);
    }
}

/* ---------- Лист «Категории и фильтры» (#modal-map-filters): шторка на телефоне, окно на десктопе ---------- */
.modal-custom-bg.spot-map-flt {
    z-index: 1100;
    padding: 0;
    align-items: flex-end;
    overflow: hidden;
    background: var(--spot-scrim);
    font-family: var(--spot-font);
    color: var(--spot-ink);
}

.spot-map-flt .modal-custom {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    max-height: calc(100% - 40px - var(--spot-safe-top));
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    border-radius: var(--spot-radius-sheet) var(--spot-radius-sheet) 0 0;
    background: var(--spot-surface);
    box-shadow: var(--spot-shadow-sheet);
    animation: spot-map-up .22s cubic-bezier(.2, .8, .2, 1);
    overflow: hidden;
}

@keyframes spot-map-up {
    from { transform: translateY(24px); opacity: .6; }
    to { transform: none; opacity: 1; }
}

/* кнопка «Закрыть»: styles.css ставит .modal-custom .modal-custom-close за угол окна (-13px) — здесь внутри панели, зона 44px */
.spot-map-flt .modal-custom > .modal-custom-close.spot-map-flt__close {
    position: absolute;
    top: 8px;
    left: calc(8px + var(--spot-safe-right));
    z-index: 3;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--spot-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.spot-map-flt__close .spot-cat-ico {
    box-sizing: content-box;
    width: 20px;
    height: 20px;
    padding: 6px;
    border-radius: 16px;
    background: var(--spot-field);
}

.spot-map-flt__head {
    position: relative;
    flex: none;
    min-height: 60px;
    box-sizing: border-box;
    padding: 18px 56px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spot-map-flt__grab {
    position: absolute;
    top: 8px;
    right: 50%;
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--spot-line);
    transform: translateX(50%);
}

.spot-map-flt__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
}

.spot-map-flt__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px calc(16px + var(--spot-safe-left)) 16px calc(16px + var(--spot-safe-right));
}

.spot-map-flt .modal-map-footer {
    flex: none;
    margin: 0;
    padding: 12px calc(16px + var(--spot-safe-left)) calc(12px + var(--spot-safe-bottom)) calc(16px + var(--spot-safe-right));
    border-top: 1px solid var(--spot-line);
    background: var(--spot-surface);
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: right;
}

.spot-map-flt .modal-map-footer .spot-map-btn {
    min-height: var(--spot-control-h-l);
    margin: 0;
    padding: 0 18px;
    width: auto;
}

/* строки формы: подпись над полем (раньше — две колонки бутстрапа) */
.spot-map-flt .modal-form-filter .row {
    display: flex;
    flex-direction: column;
    margin: 0 0 14px;
}

.spot-map-flt .modal-form-filter .row > [class*="col-"] {
    flex: none;
    width: 100%;
    max-width: 100%;
    padding: 0;
}

.spot-map-flt .modal-form-filter .row > .col-lg-4 > label,
.spot-map-flt .modal-form-filter .row > .col-lg-4 > label strong {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
    color: var(--spot-ink-2);
}

.spot-map-flt .modal-form-filter .row.mt15,
.spot-map-flt .modal-form-filter .row.mb15 {
    margin-top: 0 !important;
    margin-bottom: 14px !important;
}

.spot-map-flt .modal-form-filter .mb10,
.spot-map-flt .modal-form-filter .mb15 {
    display: none;
}

.spot-map-flt .filter-items,
.spot-map-flt .filter-items-spacing {
    margin: 0;
    padding: 0;
}

/* выпадающий список uni-select (vendor.js / site-select.js: .uni-select-open, .uni-select-item-active) */
.spot-map-flt .uni-select {
    height: 48px;
    border: 1px solid var(--spot-field-border);
    border-radius: var(--spot-radius);
    background: var(--spot-surface);
}

.spot-map-flt .uni-select + .uni-select,
.spot-map-flt .select-box-city-options .uni-select,
.spot-map-flt .select-box-subcategory .uni-select {
    margin-top: 8px;
}

.spot-map-flt .uni-select-name {
    padding: 0 14px 0 44px;
    font-size: 15px;
    font-weight: 500;
    color: var(--spot-ink);
}

.spot-map-flt .uni-select-name span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spot-map-flt .uni-select-name i {
    display: none;
}

.spot-map-flt .uni-select-name::after {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    background-color: var(--spot-inv);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
    transition: transform .15s ease;
}

.spot-map-flt .uni-select-open {
    z-index: 10;
    border-radius: var(--spot-radius) var(--spot-radius) 0 0;
    border-color: var(--spot-focus);
}

.spot-map-flt .uni-select-open .uni-select-name::after {
    transform: rotate(-180deg);
}

.spot-map-flt .uni-select-list {
    top: 46px;
    right: -1px;
    left: -1px;
    max-height: 260px;
    padding: 6px 0;
    border: 1px solid var(--spot-focus);
    border-top: 0;
    border-radius: 0 0 var(--spot-radius) var(--spot-radius);
    background: var(--spot-surface);
    box-shadow: var(--spot-shadow-pop);
}

.spot-map-flt .uni-select-list > label {
    position: relative;
    min-height: 44px;
    margin: 0;
    padding: 6px 14px 6px 44px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    font-size: 15px;
    color: var(--spot-ink);
}

.spot-map-flt .uni-select-list > label span {
    display: block;
    padding: 0;
    font-size: 15px;
    color: var(--spot-ink) !important;
}

.spot-map-flt .uni-select-list > label i {
    display: none;
}

.spot-map-flt .uni-select-list > label.uni-select-item-active {
    background: var(--spot-red-soft);
}

.spot-map-flt .uni-select-list > label.uni-select-item-active span {
    font-weight: 600;
}

.spot-map-flt .uni-select-list > label.uni-select-item-active::after {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    background-color: var(--spot-red);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

.spot-map-flt .uni-select-list-search {
    padding: 4px 10px 8px;
}

.spot-map-flt .uni-select-list-search input {
    width: 100%;
    height: 40px;
    box-sizing: border-box;
    padding: 0 12px;
    border: 1px solid var(--spot-field-border);
    border-radius: 10px;
    font-family: var(--spot-font);
    font-size: 16px;
}

/* город или регион: булавка — маска на ::before контейнера (цвет из токена), поле без фоновой картинки */
.spot-map-flt .modal-search-geo-container {
    position: relative;
}

.spot-map-flt .modal-search-geo-container::before {
    content: "";
    position: absolute;
    right: 14px;
    top: 15px;
    z-index: 1;
    width: 18px;
    height: 18px;
    pointer-events: none;
    background-color: var(--spot-red);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 21s-6.5-6-6.5-11a6.5 6.5 0 0113 0c0 5-6.5 11-6.5 11z' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='10' r='2.3' stroke='%23000' stroke-width='1.8'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M12 21s-6.5-6-6.5-11a6.5 6.5 0 0113 0c0 5-6.5 11-6.5 11z' stroke='%23000' stroke-width='1.8' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='10' r='2.3' stroke='%23000' stroke-width='1.8'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

.spot-map-flt .modal-search-geo-input.form-control {
    height: 48px !important;
    padding: 0 40px 0 14px !important;
    border: 1px solid var(--spot-field-border);
    border-radius: var(--spot-radius);
    background: var(--spot-surface);
    color: var(--spot-ink);
    font-family: var(--spot-font);
    font-size: 16px;
    font-weight: 500;
    box-shadow: none;
}

.spot-map-flt .modal-search-geo-input.form-control::placeholder {
    color: var(--spot-mut);
    opacity: 1;
}

.spot-map-flt .modal-search-geo-input.form-control:focus {
    border-color: var(--spot-focus);
    box-shadow: 0 0 0 1px var(--spot-focus);
}

.spot-map-flt .modal-search-geo-results {
    top: 52px;
    z-index: 20;
    max-height: 280px;
    overflow-y: auto;
    padding: 6px 0;
    border: 1px solid var(--spot-line);
    border-radius: var(--spot-radius);
    box-shadow: var(--spot-shadow-pop);
}

.spot-map-flt .modal-search-geo-results .item-city {
    min-height: 44px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 15px;
    color: var(--spot-ink);
    cursor: pointer;
}

.spot-map-flt .modal-search-geo-results .item-city:active {
    background: var(--spot-bg);
}

/* диапазоны «от — до» (цена, даты, числовые фильтры) */
.spot-map-flt .filter-input {
    height: auto;
    z-index: auto;
    display: flex;
    gap: 8px;
}

.spot-map-flt .filter-input::after {
    display: none;
}

.spot-map-flt .filter-input > div {
    position: relative;
    float: none;
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    height: 48px;
    box-sizing: border-box;
    margin: 0 !important;
    padding-right: 42px;
    border: 1px solid var(--spot-field-border);
    border-radius: var(--spot-radius);
    background: var(--spot-surface);
}

.spot-map-flt .filter-input > div:focus-within {
    border-color: var(--spot-focus);
    box-shadow: 0 0 0 1px var(--spot-focus);
}

.spot-map-flt .filter-input > div span {
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--spot-mut);
}

.spot-map-flt .filter-input input {
    width: 100%;
    height: 46px;
    padding: 0 0 0 12px;
    background: transparent;
    color: var(--spot-ink);
    font-family: var(--spot-font);
    font-size: 16px;
    font-weight: 500;
}

/* флажки и переключатели (bootstrap .custom-control): зона касания 44px — на самой подписи (кликабельна только она), красная отметка */
.spot-map-flt .filter-items-spacing {
    display: flex;
    flex-direction: column;
}

.spot-map-flt .custom-control {
    margin: 0;
    padding-right: 34px;
    display: flex;
    align-items: center;
}

.spot-map-flt .custom-control-label {
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 15px;
    line-height: 20px;
    color: var(--spot-ink);
    cursor: pointer;
}

.spot-map-flt .custom-control-label::before,
.spot-map-flt .custom-control-label::after {
    right: -34px;
    top: 50%;
    width: 22px;
    height: 22px;
    margin-top: -11px;
}

.spot-map-flt .custom-control-label::before {
    border: 1.5px solid var(--spot-field-border);
    border-radius: 6px;
    background: var(--spot-surface);
    box-shadow: none;
}

.spot-map-flt .custom-radio .custom-control-label::before {
    border-radius: 50%;
}

.spot-map-flt .custom-control-input:checked ~ .custom-control-label::before {
    border-color: var(--spot-red);
    background: var(--spot-red);
}

.spot-map-flt .custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: none;
}

.spot-map-flt .custom-control-input:focus-visible ~ .custom-control-label::before {
    outline: 2px solid var(--spot-focus);
    outline-offset: 2px;
}

.spot-map-flt .custom-control-label::after {
    background-size: 14px 14px;
}

/* станции метро (vendor.js; в Грузии не используется): чип станции — цвет линии через --spot-metro (form_filters/map.php), значок удаления spot_cat_icon */
.spot-map-flt .ads-container-metro-station span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    margin: 6px 0 0 8px;
    padding: 0 10px 0 4px;
    border: 1px solid var(--spot-line);
    border-radius: 16px;
    background: var(--spot-surface);
    font-size: 14px;
    color: var(--spot-ink);
}

.spot-map-flt .ads-container-metro-station span > i:first-child {
    width: 10px;
    height: 10px;
    margin: 0;
    border-radius: 50%;
    background: var(--spot-metro, var(--spot-mut));
}

.spot-map-flt .ads-container-metro-station .ads-metro-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0;
    border-radius: 16px;
    color: var(--spot-mut);
    cursor: pointer;
}

.spot-map-flt .action-input-search-metro {
    width: 100%;
    height: 44px;
    box-sizing: border-box;
    margin-top: 8px;
    padding: 0 12px;
    border: 1px solid var(--spot-field-border);
    border-radius: var(--spot-radius);
    font-family: var(--spot-font);
    font-size: 16px;
}

@media (min-width: 992px) {
    .modal-custom-bg.spot-map-flt {
        align-items: center;
        padding: 24px;
    }

    .spot-map-flt .modal-custom {
        max-width: 720px;
        max-height: calc(100vh - 48px);
        border-radius: var(--spot-radius-l);
        animation: none;
    }

    .spot-map-flt__grab {
        display: none;
    }

    .spot-map-flt__head {
        padding: 16px 24px 8px 56px;
        justify-content: flex-start;
    }

    .spot-map-flt__title {
        font-size: 20px;
        line-height: 26px;
        text-align: right;
    }

    .spot-map-flt .modal-custom > .modal-custom-close.spot-map-flt__close {
        top: 12px;
        left: 12px;
    }

    .spot-map-flt__body {
        padding: 4px 24px 20px;
    }

    .spot-map-flt .modal-map-footer {
        padding: 14px 24px;
        justify-content: flex-end;
    }

    .spot-map-flt .modal-map-footer .spot-map-btn--grow {
        flex: 0 0 auto;
        min-width: 180px;
    }

    .spot-map-flt .filter-input {
        max-width: 420px;
    }
}

/* ---------- Наведение, фокус, движение ---------- */
@media (hover: hover) and (pointer: fine) {
    .spot-map-crumbs a:hover {
        color: var(--spot-red-fg);
        text-decoration: none;
    }
    .spot-map-tool:hover,
    .spot-map-back:hover,
    .spot-map-sub:hover {
        background: var(--spot-field);
    }
    .spot-map-tool:hover {
        box-shadow: inset 0 0 0 1px var(--spot-line);
    }
    .spot-map-chip:hover {
        background: var(--spot-ink-2);
    }
    .spot-map-btn--primary:hover {
        background: var(--spot-red-dark);
    }
    .spot-map-btn--ghost:hover,
    .spot-map-btn--soft:hover {
        filter: brightness(.97);
    }
    .spot-map-flt .uni-select-list > label:hover {
        background: var(--spot-bg);
    }
    .spot-map-flt .uni-select-list > label.uni-select-item-active:hover {
        background: var(--spot-red-soft);
    }
    .spot-map-flt .modal-search-geo-results .item-city:hover {
        background: var(--spot-bg);
    }
    .spot-map .pagination-map-offers .page-link:hover {
        border-color: var(--spot-field-border);
        color: var(--spot-ink);
    }
    .spot-map-flt__close:hover .spot-cat-ico {
        background: var(--spot-line);
    }
}

.spot-map a:focus-visible,
.spot-map button:focus-visible,
.spot-map-flt a:focus-visible,
.spot-map-flt button:focus-visible,
.spot-map-flt .uni-select-name:focus-visible,
.spot-map-flt .modal-search-geo-input:focus-visible,
.spot-map-flt .filter-input input:focus-visible {
    outline: 2px solid var(--spot-focus) !important;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .spot-map-flt .modal-custom,
    .spot-map .map-search-offers-list .preload::after,
    .spot-map-flt .uni-select-name::after {
        animation: none !important;
        transition: none !important;
    }
}
