/*
 * Выбор города: указатель в шапке и модальное окно.
 * Отдельный файл, чтобы не трогать донорские таблицы стилей.
 * Цвета взяты из темы: #007a6c основной, #ef4e96 акцент.
 */

/* ---------- Указатель в шапке ---------- */

.city-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15.2px;
    color: #6c757d;
    white-space: nowrap;
    margin-right: 20px;
}

.city-switcher i {
    color: #007a6c;
}

.city-switcher-label {
    color: #9a9a9a;
}

.city-switcher-current {
    padding: 0;
    border: 0;
    border-bottom: 1px dashed #007a6c;
    background: none;
    color: #007a6c;
    font-weight: 600;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
}

.city-switcher-current:hover {
    color: #ef4e96;
    border-bottom-color: #ef4e96;
}

/* ---------- Модальное окно ---------- */

.city-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.city-modal[hidden] {
    display: none;
}

.city-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.city-modal-box {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    padding: 28px;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.city-modal-box[hidden] {
    display: none;
}

.city-modal-title {
    margin: 0 0 18px;
    font-size: 20px;
    font-weight: 600;
    color: #3b3b3a;
}

.city-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 28px;
    line-height: 1;
    color: #b4b9be;
    cursor: pointer;
}

.city-modal-close:hover {
    color: #3b3b3a;
}

/* ---------- Кнопки ---------- */

.city-modal-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.city-btn {
    border: 0;
    font-family: inherit;
    font-size: 15.2px;
    cursor: pointer;
}

.city-btn-primary {
    padding: 10px 26px;
    background: #007a6c;
    color: #fff;
    font-weight: 600;
}

.city-btn-primary:hover {
    background: #00695c;
}

.city-btn-link {
    padding: 10px 0;
    background: none;
    color: #007a6c;
    border-bottom: 1px dashed #007a6c;
}

.city-btn-link:hover {
    color: #ef4e96;
    border-bottom-color: #ef4e96;
}

/* ---------- Список городов ---------- */

.city-search {
    width: 100%;
    padding: 9px 12px;
    margin-bottom: 14px;
    border: 1px solid #ced4da;
    font-size: 15.2px;
    font-family: inherit;
}

.city-search:focus {
    outline: none;
    border-color: #007a6c;
}

.city-list {
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-y: auto;
    column-count: 2;
    column-gap: 18px;
}

.city-list li {
    break-inside: avoid;
    margin-bottom: 4px;
}

.city-list li[hidden] {
    display: none;
}

.city-list a {
    color: #212529;
    font-size: 14px;
    text-decoration: none;
}

.city-list a:hover {
    color: #ef4e96;
}

.city-list-empty {
    margin: 10px 0 0;
    color: #9a9a9a;
    font-size: 14px;
}

.city-list-empty[hidden] {
    display: none;
}

/* ---------- Мобильные ---------- */

@media (max-width: 575.98px) {
    .city-modal-box {
        padding: 20px;
        max-height: 88vh;
    }

    .city-list {
        column-count: 1;
    }

    .city-switcher {
        margin: 8px 0 0;
        font-size: 14px;
    }
}

/* Ссылка на полный каталог со страницы города */
.catalog-all-link {
    margin: 20px 0 10px;
    font-size: 15.2px;
}

.catalog-all-link a {
    color: #007a6c;
    border-bottom: 1px dashed #007a6c;
    text-decoration: none;
}

.catalog-all-link a:hover {
    color: #ef4e96;
    border-bottom-color: #ef4e96;
}
