/* spot_cities.css — выбор города (cities.tpl). Полировка 10.2026: старая страница в стиле редизайна. Токены — spot_ui.css, классы с префиксом spot-.
   Структура: крошки → H1 → вкладки стран (если стран больше одной) → карточка: поиск, строка «Объявления <страна>», список городов (строки 48px),
   пустое состояние. Классы .cities-search-input и .cities-search-list-container читает vendor.js (живой поиск) — они сохранены.
   Ответ живого поиска приходит в старой разметке (.row / .col-*): обёртки раскрыты через display: contents, строки стилизуются по <a>. */

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

.spot-cities {
    font-family: var(--spot-font);
    color: var(--spot-ink);
    padding-bottom: 32px;
}

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

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

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

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

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

.spot-cities-h1 {
    margin: 0;
    padding: 4px 0 12px;
    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-cities-tabs {
    margin: 0 -15px 12px;
}

.spot-cities-tabs__row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 15px 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 15px;
}

.spot-cities-tabs__row::-webkit-scrollbar {
    display: none;
}

.spot-cities-tab {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    height: var(--spot-control-h);
    padding: 0 16px;
    box-sizing: border-box;
    border: 1px solid var(--spot-line);
    border-radius: 22px;
    background: var(--spot-surface);
    color: var(--spot-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 18px;
    white-space: nowrap;
    text-decoration: none;
    scroll-snap-align: start;
}

.spot-cities-tab.spot-cities-tab--on {
    border-color: var(--spot-ink);
    background: var(--spot-inv);
    color: var(--spot-on-inv);
}

.spot-cities-tab:focus-visible {
    outline: 2px solid var(--spot-focus);
    outline-offset: 2px;
}

.spot-cities-tab:active {
    opacity: .6;
}

/* карточка: на телефоне белая полоса до краёв экрана, на десктопе — карточка с рамкой */
.spot-cities-card {
    margin: 0 -15px;
    padding: 16px 16px 8px;
    background: var(--spot-surface);
}

/* поле поиска */
.spot-cities-search {
    margin: 0 0 8px;
}

.spot-cities-card .spot-cities-field {
    position: relative;
    display: flex;
    align-items: center;
}

.spot-cities-field__ic {
    position: absolute;
    right: 14px;
    top: 50%;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    color: var(--spot-mut);
    display: flex;
    pointer-events: none;
}

.spot-cities-card .spot-cities-field input {
    width: 100%;
    min-width: 0;
    height: var(--spot-control-h-l);
    box-sizing: border-box;
    margin: 0;
    padding: 0 44px 0 52px;
    border: 1px solid var(--spot-field-border);
    border-radius: var(--spot-radius);
    background: var(--spot-surface);
    font-family: var(--spot-font);
    font-size: 16px;
    line-height: 20px;
    color: var(--spot-ink);
    box-shadow: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.spot-cities-card .spot-cities-field input::placeholder {
    color: var(--spot-mut);
    opacity: 1;
}

.spot-cities-card .spot-cities-field input:focus {
    border-color: var(--spot-focus);
    outline: 2px solid var(--spot-focus);
    outline-offset: 0;
}

.spot-cities-clear {
    position: absolute;
    left: 4px;
    top: 50%;
    width: var(--spot-tap);
    height: var(--spot-tap);
    margin-top: calc(var(--spot-tap) / -2);
    padding: 0;
    border: 0;
    border-radius: 22px;
    background: transparent;
    color: var(--spot-mut);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.spot-cities-clear[hidden] {
    display: none;
}

.spot-cities-clear:active {
    opacity: .6;
}

/* строка «Объявления <страна>» — все объявления страны, без выбора города */
.spot-cities-all {
    min-height: 56px;
    margin: 0 -16px;
    padding: 8px 16px 8px 12px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--spot-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 20px;
    text-decoration: none;
}

.spot-cities-all__ic {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--spot-red-soft);
    color: var(--spot-red-fg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.spot-cities-all__t {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.spot-cities-chev {
    flex-shrink: 0;
    color: var(--spot-mut);
}

.spot-cities-all:focus-visible {
    outline: 2px solid var(--spot-focus);
    outline-offset: -2px;
    border-radius: var(--spot-radius-s);
}

.spot-cities-all:active {
    opacity: .6;
}

/* список городов: строки-ссылки 48px с разделителями; обёртки старой разметки живого поиска раскрыты */
.spot-cities-list {
    display: flex;
    flex-direction: column;
}

.spot-cities-list .row,
.spot-cities-list [class*="col-"] {
    display: contents;
}

.spot-cities-list a {
    position: relative;
    min-height: 48px;
    padding: 6px 0 6px 28px;
    box-sizing: border-box;
    border-top: 1px solid var(--spot-line);
    display: flex;
    align-items: center;
    font-size: 15px;
    line-height: 20px;
    font-weight: 500;
    color: var(--spot-ink);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.spot-cities-list a::after {
    content: "";
    position: absolute;
    left: 2px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    /* шеврон: маска, цвет — токен */
    background-color: var(--spot-mut);
    -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='M9 6l6 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='M9 6l6 6-6 6' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
}

.spot-cities-list a[hidden] {
    display: none !important;
}

.spot-cities-list a:focus-visible {
    outline: 2px solid var(--spot-focus);
    outline-offset: -2px;
    border-radius: var(--spot-radius-s);
}

.spot-cities-list a:active {
    opacity: .6;
}

/* пустое состояние (ничего не найдено / у страны нет городов) */
.spot-cities-empty {
    margin: 0;
    padding: 28px 0 32px;
    border-top: 1px solid var(--spot-line);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    line-height: 20px;
    color: var(--spot-ink-2);
}

.spot-cities-empty svg {
    color: var(--spot-mut);
}

.spot-cities-empty[hidden] {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .spot-cities-crumbs a:hover,
    .spot-cities-all:hover,
    .spot-cities-list a:hover {
        color: var(--spot-red-fg);
        text-decoration: none;
    }
    .spot-cities-tab:hover {
        border-color: var(--spot-ink);
        color: var(--spot-ink);
        text-decoration: none;
    }
    .spot-cities-tab.spot-cities-tab--on:hover {
        color: var(--spot-on-inv);
    }
    .spot-cities-clear:hover {
        color: var(--spot-ink);
    }
}

/* десктоп: карточка с рамкой, список в 3 колонки */
@media (min-width: 992px) {
    .spot-cities-h1 {
        padding: 8px 0 20px;
        font-size: 32px;
        line-height: 40px;
    }
    .spot-cities-tabs {
        margin: 0 0 16px;
    }
    .spot-cities-tabs__row {
        padding: 2px 0 4px;
        flex-wrap: wrap;
        overflow: visible;
    }
    .spot-cities-card {
        margin: 0;
        padding: 24px 32px 12px;
        border: 1px solid var(--spot-line);
        border-radius: var(--spot-radius-l);
    }
    .spot-cities-search {
        max-width: 520px;
        margin-bottom: 12px;
    }
    .spot-cities-all {
        margin: 0 -12px;
        padding: 8px 12px;
        border-radius: var(--spot-radius);
    }
    .spot-cities-list {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: 32px;
    }
    .spot-cities-list a {
        padding-left: 24px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .spot-cities-tab,
    .spot-cities-all,
    .spot-cities-list a,
    .spot-cities-clear {
        transition: none;
    }
}
