.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 280ms ease;
}

.search-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

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

@media (max-width: 1140px) {
    .search-overlay {
        z-index: 2050;
    }
}

.js-search-toggle {
    cursor: pointer;
}

.header-search {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition:
        max-height 340ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 220ms ease;
}

.header-search.is-open {
    max-height: 80px;
    opacity: 1;
    overflow: visible;
}

.header-search__input-wrap {
    flex: 1;
    position: relative;
    min-width: 0;
}

.header-search__inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--background-color);
    position: relative;
}

.header-search__icon {
    flex-shrink: 0;
    display: flex;
    color: var(--text-color);
    opacity: 0.45;
}

.header-search__input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: var(--font-size-base);
    font-family: inherit;
    color: var(--text-color);
    padding: 0;
}

.header-search__input::placeholder {
    color: #b0b0b0;
}

.header-search__close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease;
}

.header-search__close:hover {
    background: var(--background-color);
    color: var(--black);
}

@media (max-width: 1140px) {
    .header-search {
        position: fixed;
        top: auto !important;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: none !important;
        opacity: 1 !important;
        transform: translateY(100%);
        border-radius: 15px 15px 0 0;
        box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.12);
        padding: 15px 0 20px;
        transition: transform 340ms cubic-bezier(0.22, 1, 0.36, 1) !important;
        z-index: 2100;
        overflow: visible;
    }

    .header-search.is-open {
        transform: translateY(0) !important;
    }

    .header-search__inner {
        border-bottom: none;
    }
}
