.header-search-control {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

#contacts {
    scroll-margin-top: 106px;
}

.header-search-toggle,
.header-location-link {
    display: flex;
    width: 38px;
    height: 38px;
    padding: 7px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}

.header-search-toggle:hover,
.header-search-toggle:focus-visible,
.header-search-control.is-open .header-search-toggle,
.header-location-link:hover,
.header-location-link:focus-visible {
    background: rgba(255, 255, 255, .68);
    outline: none;
    transform: scale(1.04);
}

.header-search-toggle img,
.header-location-link svg {
    display: block;
    width: 24px;
    height: 24px;
    opacity: .72;
}

.typography-refresh .main-header a[href^="tel:"] {
    color: #333;
}

.header-search-panel {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    z-index: 1100;
    width: min(380px, calc(100vw - 32px));
    padding: 12px;
    border: 1px solid rgba(89, 72, 76, .16);
    border-radius: 16px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 20px 48px rgba(22, 31, 39, .3);
    backdrop-filter: blur(16px);
}

.header-search-panel .header-global-search.section-search__wrapper-input {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: none;
}

.header-search-panel .header-global-search input {
    width: 100%;
    height: 46px;
    padding: 0 48px 0 16px;
    border: 1px solid rgba(89, 72, 76, .2);
    border-radius: 999px;
    background: #fff;
    color: #514044;
    font: 500 15px/1 Inter, Arial, sans-serif;
    outline: none;
}

.header-search-panel .header-global-search input:focus {
    border-color: #806259;
    box-shadow: 0 0 0 3px rgba(128, 98, 89, .14);
}

.header-search-panel .global-search-submit {
    position: absolute;
    top: 7px;
    right: 7px;
    z-index: 2;
    display: flex;
    width: 32px;
    height: 32px;
    padding: 7px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #806259;
    cursor: pointer;
    transform: none;
    transition: background-color .2s ease, transform .2s ease;
}

.header-search-panel .global-search-submit:hover,
.header-search-panel .global-search-submit:focus-visible {
    background: #6a4f48;
    outline: none;
    transform: scale(1.04);
}

.header-search-panel .global-search-submit img {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

.header-search-panel .header__wrapper-search-window {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    width: 100%;
}

.header-search-panel .header__search-window {
    top: 0;
    z-index: 1101;
    max-height: min(65vh, 520px);
    padding: 14px;
    border-radius: 14px;
}

@media (max-width: 576px) {
    body.typography-refresh .header-bottom .contacts-header-main {
        grid-template-columns: minmax(0, 1fr) 30px 30px;
        grid-template-areas: "contact search location";
        gap: 4px;
    }

    .header-search-control {
        grid-area: search;
    }

    .header-search-toggle,
    .header-location-link {
        width: 30px;
        height: 30px;
        padding: 1px;
    }

    .header-search-toggle img,
    .header-location-link svg {
        width: 27px;
        height: 27px;
    }

    .header-search-panel {
        position: fixed;
        top: 96px;
        right: 16px;
        left: 16px;
        width: auto;
    }
}

@media (max-width: 360px) {
    body.typography-refresh .header-bottom .contacts-header-main {
        grid-template-columns: minmax(0, 1fr) 30px 30px;
        grid-template-areas: "contact search location";
        gap: 3px;
    }
}
