.city-search {
    position: relative;
    flex: 0 1 100%;
    min-width: 0;
}

.city-search .header__search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    cursor: text;
}

.city-search .header__search-input {
    width: 100%;
    min-width: 0;
}

.city-search .header__search-menu {
    position: fixed;
    top: 44px;
    left: 0;
    right: 0;
    z-index: 350;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-16px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.city-search .header__search-menu.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.city-search .header__search-menu-dropdown {
    position: relative;
    z-index: 1;
    background: #fff;
    box-shadow: 0 12px 48px rgba(31, 31, 31, 0.08);
    padding: 32px 0 40px;
    border-radius: 0 0 40px 40px;
}

.city-search .header__search-menu-dropdown > .container {
    display: block;
    height: auto;
    overflow: visible;
    padding-inline: var(--container-padding-x, 1rem);
}

.city-search .header__search-form {
    max-width: 1012px;
    margin: 0 auto;
}

.city-search .header__search-top,
.city-search-page__form {
    display: flex;
    align-items: center;
    gap: 16px;
}

.city-search .header__search-input-wrapper,
.city-search-page__form .header__search-input-wrapper {
    position: relative;
    width: 100%;
}

/* Декоративная лупа из main.css не должна перехватывать клики по крестику */
.city-search .header__search-input-wrapper::after {
    pointer-events: none;
}

.city-search .header__search-input-wrapper input,
.city-search-page__form .header__search-input-wrapper input {
    width: 100%;
    max-width: 100%;
    padding: 16px 48px 16px 20px;
    border: 1px solid #f7f7f7;
    border-radius: 40px;
    background: #f7f7f7;
    color: #1f1f1f;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.city-search .header__search-input-wrapper input:focus,
.city-search-page__form .header__search-input-wrapper input:focus {
    border-color: #00b955;
    background: #fff;
}

.city-search .header__search-input-wrapper input::placeholder,
.city-search-page__form .header__search-input-wrapper input::placeholder {
    color: rgba(31, 31, 31, 0.4);
}

.city-search .header__search-clear,
.city-search-page__form .header__search-clear {
    position: absolute;
    top: 50%;
    right: 16px;
    z-index: 2;
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(31, 31, 31, 0.54);
    transform: translateY(-50%);
    cursor: pointer;
}

.city-search .header__overlay {
    position: fixed;
    inset: 0;
    z-index: 250;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: rgba(31, 31, 31, 0.1);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.city-search .header__overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.city-search__content {
    margin-top: 32px;
}

.city-search__section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.city-search__section--history {
    padding-top: 4px;
}

.city-search__section + .city-search__section {
    margin-top: 24px;
}

.city-search__section--results .city-search__section-label {
    margin-bottom: 4px;
}

.city-search__item--category {
    padding: 14px 18px;
}

.city-search__item--category .city-search__item-title {
    font-size: 16px;
    line-height: 1.35;
}

.city-search__item-icon--category {
    color: #00b955;
}

.city-search__item-icon--category .icon {
    width: 20px;
    height: 20px;
}

.city-search__item-icon--category .icon path[stroke]:not([stroke="none"]),
.city-search__item-icon--category .icon circle[stroke]:not([stroke="none"]) {
    stroke: #00b955 !important;
}

.city-search__item-icon--category .icon path[fill]:not([fill="none"]),
.city-search__item-icon--category .icon circle[fill]:not([fill="none"]) {
    fill: #00b955 !important;
}

.city-search__section-label {
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.city-search__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.city-search__list-item {
    margin: 0;
    padding: 0;
}

.city-search__item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    border-radius: 24px;
    background: #f7f7f7;
    color: #1f1f1f;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.city-search__item:hover {
    background: #eef9f2;
    color: #00b955;
}

button.city-search__item,
.city-search__item--faq {
    border: 0;
    cursor: pointer;
    font: inherit;
    text-align: left;
    appearance: none;
    -webkit-appearance: none;
}

.city-search__item--faq:focus-visible {
    outline: 2px solid #00b955;
    outline-offset: 2px;
}

.city-search__item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.city-search__item-icon--result::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(0, 185, 85, 0.22);
}

.city-search__item-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.city-search__item-title {
    color: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
}

.city-search__item-meta {
    color: rgba(31, 31, 31, 0.56);
    font-size: 12px;
    line-height: 1.4;
}

.city-search__item--skeleton {
    pointer-events: none;
}

.city-search__skeleton {
    display: inline-block;
    border-radius: 999px;
    background: linear-gradient(90deg, #ececec 0%, #f7f7f7 50%, #ececec 100%);
    background-size: 200% 100%;
    animation: city-search-shimmer 1.15s linear infinite;
}

.city-search__skeleton--title {
    width: min(360px, 72vw);
    height: 14px;
}

.city-search__skeleton--meta {
    width: min(220px, 52vw);
    height: 11px;
}

@keyframes city-search-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.city-search__empty {
    margin-top: 12px;
}

.city-search__results-link {
    display: inline-flex;
    width: 100%;
    margin-top: 24px;
    padding: 32px 0 0;
    border-top: 1px solid rgba(31, 31, 31, 0.08);
    align-items: center;
    gap: 8px;
    color: #00b955;
    text-decoration: none;
}

.city-search__results-link:hover {
    color: #00853d;
}

.city-search__spacer {
    width: 20px;
    height: 20px;
}

.city-search-open {
    overflow: hidden;
}

.header.header--search-open .header__main > .container,
.header.header--search-open .header__main .container,
body.city-search-open .header__main > .container,
body.city-search-open .header__main .container {
    border-bottom: 0 !important;
}

.header.header--search-open .header__main > .container::after,
.header.header--search-open .header__main .container::after,
body.city-search-open .header__main > .container::after,
body.city-search-open .header__main .container::after {
    display: none !important;
}

.city-search-page {
    width: 100%;
}

.search-page__main {
    min-width: 0;
}

.search-page__header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.search-page__inner {
    margin-top: clamp(1rem, -0.75rem + 5vw, 3rem);
}

.search-page__inner-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.search-page__aside {
    min-width: 280px;
}

.city-search-page__form {
    width: 100%;
    max-width: 100%;
}

.city-search-page__form .header__search-input-wrapper {
    flex: 1 1 auto;
    min-width: 0;
}

.city-search-page__results {
    margin-top: 0;
}

.city-search-page__result + .city-search-page__text-result,
.city-search-page__text-result + .city-search-page__text-result {
    margin-top: 12px;
}

.city-search-page__text-result {
    list-style: none;
}

.city-search-page__text-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 24px;
    border-radius: 24px;
    background: #f7f7f7;
    color: #1f1f1f;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.city-search-page__text-link:hover {
    background: #eef9f2;
    color: #00b955;
}

.city-search-page__text-link--faq,
.news__list-link--faq {
    width: 100%;
    border: 0;
    background: #f7f7f7;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.city-search-page__text-link--faq:hover,
.news__list-link--faq:hover {
    background: #eef9f2;
    color: #00b955;
}

.city-search-page__text-link--faq:focus-visible,
.news__list-link--faq:focus-visible {
    outline: 2px solid #00b955;
    outline-offset: 2px;
}

.news__tabs-count {
    margin-left: 6px;
    color: rgba(31, 31, 31, 0.45);
    font-size: 12px;
    font-weight: 500;
}

.city-search-page__pagination {
    margin-top: 28px;
}

.city-search-page__pagination .pagination__wrapper {
    flex-wrap: wrap;
    gap: 12px;
}

.city-search-page__pagination-nav {
    min-height: 52px;
    padding-inline: 20px;
}

.pagination__list-item--ellipsis .pagination__list-link {
    border-color: transparent;
}

.city-search-faq-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.city-search-faq-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.city-search-faq-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(31, 31, 31, 0.45);
    backdrop-filter: blur(4px);
}

.city-search-faq-modal__content {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    max-height: min(90vh, 100%);
    overflow: hidden;
    border-radius: 32px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(31, 31, 31, 0.18);
}

.city-search-faq-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: #f7f7f7;
    color: #1f1f1f;
    cursor: pointer;
}

.city-search-faq-modal__body {
    max-height: min(90vh, 100%);
    overflow: auto;
    padding: 28px 24px 32px;
}

.city-search-faq-modal__question {
    margin: 0 48px 16px 0;
    color: #1f1f1f;
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 500;
    line-height: 1.25;
}

.city-search-faq-modal__answer {
    color: rgba(31, 31, 31, 0.84);
    font-size: 16px;
    line-height: 1.55;
}

.city-search-faq-modal__answer p {
    margin: 0 0 12px;
}

.city-search-faq-modal__answer p:last-child {
    margin-bottom: 0;
}

body.city-search-faq-open {
    overflow: hidden;
}

.city-search-page__text-type {
    color: #00b955;
    font-size: 12px;
    line-height: 1.4;
}

.city-search-page__text-title {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.2;
}

.city-search-page__text-description {
    color: rgba(31, 31, 31, 0.64);
    font-size: 14px;
    line-height: 1.45;
}

.city-search-page__text-snippet {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.city-search-page__text-title mark,
.city-search__item-title mark,
.news__card-title mark {
    background: #fff3a3;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.city-search-page__text-snippet mark {
    background: #fff3a3;
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.city-search-page__empty {
    padding: 24px 0;
    color: rgba(31, 31, 31, 0.64);
    font-size: 16px;
}

.city-search-page__preview {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 20;
    padding: 8px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(31, 31, 31, 0.12);
}

.city-search-page__preview-empty {
    padding: 10px 14px 6px;
}

.city-search-page__preview-link {
    padding: 4px 10px 8px;
}

.news__search {
    position: relative;
}

.news__search-preview {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 20;
    padding: 8px;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(31, 31, 31, 0.12);
}

.news__search-preview .city-search__list {
    gap: 6px;
}

.news__search-preview .city-search__item {
    padding: 12px 14px;
    border-radius: 18px;
}

.news__search-preview .city-search__item-title {
    font-size: 13px;
}

.news__search-preview .city-search__item-meta {
    font-size: 11px;
}

@media (max-width: 1200px) {
    .search-page__aside {
        display: none;
    }
}

@media (max-width: 800px) {
    .city-search .header__search-menu {
        top: 90px;
    }

    .city-search .header__search-menu-dropdown {
        padding: 24px 0 32px;
        border-radius: 0;
        max-height: calc(100dvh - 90px);
        overflow-y: auto;
    }

    .city-search .header__search-top,
    .city-search-page__form {
        flex-direction: column;
        align-items: stretch;
    }

    .city-search .header__search-top .button,
    .city-search-page__form .button {
        width: 100%;
        justify-content: center;
    }

    .city-search-faq-modal {
        align-items: flex-end;
        padding: 0;
    }

    .city-search-faq-modal__content {
        width: 100%;
        max-height: 92dvh;
        border-radius: 24px 24px 0 0;
    }

    .city-search-faq-modal__body {
        max-height: 92dvh;
        padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    }

    .city-search-faq-modal__question {
        margin-right: 40px;
        font-size: 20px;
    }

    .search-page__inner-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .city-search-page__text-link {
        padding: 18px 20px;
        border-radius: 20px;
    }

    .city-search-page__text-title {
        font-size: 18px;
    }
}
