/* ================================================================
   Search Button Loader — изолированные стили
   Применяется только к кнопке с классом .search-btn
   ================================================================ */

.search-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 650px;
    min-height: 56px;
    padding: 0 26px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: transform .12s ease, box-shadow .2s ease;
    box-shadow: 0 6px 20px rgba(16, 185, 129, .35);
    font-family: inherit;
    margin-left: auto;
    margin-right: auto;
}

.search-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(16, 185, 129, .35);
}

.search-btn:disabled {
    cursor: wait;
}

/* Лейбл — то, что видно до клика */
.search-btn .search-btn__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: opacity .2s ease, transform .2s ease;
}

.search-btn.is-loading .search-btn__label {
    opacity: 0;
    transform: translateY(-4px);
}

/* Лоадер — появляется во время загрузки */
.search-btn .search-btn__loader {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
}

.search-btn.is-loading .search-btn__loader {
    display: flex;
}

/* Текст */
.search-btn .search-btn__text {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .2px;
    white-space: nowrap;
}

/* Бегущая полоска */
.search-btn .search-btn__bar-track {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, .18);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.search-btn .search-btn__bar-fill {
    position: absolute;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    animation: searchBarSlide 1.1s infinite linear;
}

@keyframes searchBarSlide {
    0%   { left: -40%; }
    100% { left: 100%; }
}

/* ================================================================
   ГРУППА ПОИСКА (поле + кнопка)
   Обёртка .search-group управляет раскладкой:
   - на широких экранах — поле и кнопка в одну строку
   - на узких — кнопка уезжает под поле
   - обе всегда центрированы
   ================================================================ */

.search-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
}

/* Поле внутри группы — на всю ширину группы */
.search-group .search-box {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* Кнопка внутри группы — на всю ширину группы */
.search-group .search-btn {
    width: 100%;
    max-width: none;
    margin: 0;
}

/* На широких экранах — поле и кнопка в одну строку */
@media (min-width: 768px) {
    .search-group {
        flex-direction: row;
        align-items: stretch;
        max-width: 850px;
        gap: 10px;
    }

    .search-group .search-box {
        flex: 1 1 auto;
        min-width: 0;
    }

    .search-group .search-btn {
        flex: 0 0 auto;
        width: auto;
        min-width: 280px;
    }
}

/* На узких экранах — кнопка под полем, обе на всю ширину */
@media (max-width: 767px) {
    .search-group {
        flex-direction: column;
    }

    .search-group .search-btn {
        width: 100%;
        height: 60px;
    }
}

/* ================================================================
   DADATA SUGGESTIONS — выпадающий список подсказок
   ================================================================ */

/* Родитель поля ввода должен быть позиционирован —
   тогда .suggestions-wrapper с position: absolute встанет
   ровно под полем, а не относительно .hero-section */
.search-group .search-box {
    position: relative;
}

/* Корневой контейнер списка подсказок DaData */
.suggestions-wrapper {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    z-index: 1050 !important;
    margin: 0 !important;
}

/* Сам блок подсказок */
.suggestions-suggestions {
    background: #fff !important;
    border: 1px solid rgba(16, 185, 129, 0.15) !important;
    border-radius: 12px !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.10) !important;
    padding: 6px !important;
    max-height: 320px;
    overflow-y: auto;
    font-family: inherit;
}

/* Одна подсказка */
.suggestions-suggestion {
    padding: 10px 14px !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    border-radius: 8px !important;
    cursor: pointer;
    color: #1f2937;
    transition: background .12s ease;
}

.suggestions-suggestion + .suggestions-suggestion {
    margin-top: 2px;
}

.suggestions-suggestion:hover,
.suggestions-suggestion.suggestions-suggestion_active,
.suggestions-suggestion[aria-selected="true"] {
    background: #ecfdf5 !important;
    color: #065f46 !important;
}

/* Подсветка совпавших букв */
.suggestions-suggestion b,
.suggestions-highlighting {
    color: #059669;
    font-weight: 600;
}

/* Скрываем подсказку «Выберите вариант или продолжите ввод» */
.suggestions-hint {
    display: none !important;
}

/* Логотип DaData внизу списка (бесплатный тариф) — оставляем,
   но делаем аккуратнее */
.suggestions-logo {
    opacity: 0.55;
    padding: 6px 10px 2px;
    text-align: right;
    font-size: 11px;
}

/* Адаптация под мобильные */
@media (max-width: 767px) {
    .suggestions-suggestions {
        max-height: 260px;
    }

    .suggestions-suggestion {
        padding: 12px 14px !important;
        font-size: 13.5px !important;
    }
}

/* ================================================================
   DADATA SUGGESTIONS — исправление обрезки списка
   ================================================================ */

/* Вся группа поиска должна быть выше следующих секций */
.search-group {
    position: relative;
    z-index: 100;
}

/* Родитель списка — тоже */
.search-group .search-box {
    position: relative;
    z-index: 101;
}

/* Сам список — максимальный приоритет */
.suggestions-wrapper {
    z-index: 9999 !important;
}

.search-btn .search-btn__result {
    display: none;
    align-items: center;
    gap: 8px;
}

.search-btn.is-result .search-btn__label {
    display: none;
}

.search-btn.is-result .search-btn__result {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.search-btn.is-result {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    box-shadow: 0 6px 20px rgba(14, 165, 233, .35);
}

.search-btn.is-result:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(14, 165, 233, .35);
}

/* ================================================================
   RESOLVE HINT — блок-подсказка, если не удалось определить кадастровый номер
   ================================================================ */

.resolve-hint {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    max-width: 650px;
    margin: 0 auto;
    padding: 18px 20px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-left: 4px solid #f59e0b;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.08);
    text-align: left;
    animation: resolveHintAppear 0.25s ease-out;
}

@keyframes resolveHintAppear {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.resolve-hint__icon {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.resolve-hint__content {
    flex: 1 1 auto;
    min-width: 0;
}

.resolve-hint__title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: #92400e;
    line-height: 1.3;
}

.resolve-hint__text {
    margin: 0 0 12px;
    font-size: 13.5px;
    line-height: 1.5;
    color: #78350f;
}

.resolve-hint__text strong {
    color: #92400e;
    background: rgba(255, 255, 255, 0.6);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.resolve-hint__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.resolve-hint__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
    color: #fff;
    text-decoration: none;
}

.resolve-hint__btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.resolve-hint__btn i {
    font-size: 15px;
}

/* Адаптация под мобильные */
@media (max-width: 575px) {
    .resolve-hint {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .resolve-hint__icon {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .resolve-hint__title {
        font-size: 14px;
    }

    .resolve-hint__text {
        font-size: 13px;
    }

    .resolve-hint__btn {
        width: 100%;
        justify-content: center;
    }
}