.search.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.search__row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search__close,
.search__back {
    display: flex;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.search__back {
    display: none;
}

.search__input {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid #e4e4e4;
    transition: border-color 0.2s ease-in-out;
}

.search__input input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    font: inherit;
    font-size: 18px;
    line-height: 1.2;
    color: var(--color-black);
    background: transparent;
}

.search__input input::placeholder {
    color: rgba(36, 36, 36, 0.4);
}

.search__submit {
    display: flex;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* disable-состояние инпута: рамка #C8CACA, серые текст и иконка */
.search__input:hover {
    border-color: #000000;
}

.search__input.is-disabled {
    border-color: #c8caca;
}

.search__input.is-disabled input {
    color: var(--color-gray-2);
    pointer-events: none;
}

.search__input.is-disabled .search__submit {
    pointer-events: none;
    filter: brightness(0) invert(0.55);
}

@media (max-width: 1600px) {
    .search {
        padding: 20px;
    }
}

/* 768 и 375: полноэкранный оверлей, назад — шеврон, таб-бар остаётся */
@media (max-width: 1024px) {
    .search {
        bottom: 0;
        padding: 20px;
    }

    .search__close {
        display: none;
    }

    .search__back {
        display: flex;
    }

    .search__input {
        padding: 12px;
    }

    .search__input input {
        font-size: 16px;
    }

    /* под открытым поиском фон белый — таб-бар становится непрозрачно-чёрным */
    body.search-open .tabbar {
        background: var(--color-black);
    }

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

@media (max-width: 576px) {
    .search {
        padding: 20px 15px;
    }
}