.gmci-public-search,
.gmci-public-search * { box-sizing: border-box; }

.gm-header .header__bottom-wrap:has(.gmci-public-search) { position: relative; }

.gmci-public-search {
    flex: 1 1 420px;
    min-width: 140px;
    color: #fff;
    font-family: inherit;
}

.gmci-public-search__inner {
    position: relative;
    width: 100%;
}

.gmci-public-search__form {
    position: relative;
    width: 100%;
    min-width: 0;
}

.gmci-public-search__input-row {
    position: relative;
    display: flex;
    width: 100%;
    min-width: 0;
}

.gmci-public-search__input-row input {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 10px 108px 10px 18px;
    border: 1px solid rgba(215, 174, 107, .56);
    border-radius: 24px 6px 24px 6px;
    outline: 0;
    background: rgba(255, 255, 255, .055);
    color: #fff;
    font: inherit;
    font-size: 15px;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

.gmci-public-search__input-row input::placeholder { color: rgba(255, 255, 255, .54); }

.gmci-public-search__input-row input:focus {
    border-color: #d7ae6b;
    background: rgba(255, 255, 255, .075);
    box-shadow: 0 0 0 3px rgba(215, 174, 107, .17);
}

.gmci-public-search__input-row button {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 92px;
    height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 20px 5px 20px 5px;
    background: #d7ae6b;
    color: #211a11;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color .18s ease, transform .18s ease;
}

.gmci-public-search__input-row button:hover,
.gmci-public-search__input-row button:focus-visible { background: #e5c080; }
.gmci-public-search__input-row button:active { transform: translateY(1px); }

.gmci-search-onboarding-active .gmci-public-search__input-row input {
    border-color: #d7ae6b;
    box-shadow: 0 0 0 3px rgba(215, 174, 107, .16);
}

.gmci-search-onboarding-arrow {
    position: absolute;
    z-index: 100002;
    top: 0;
    left: 14px;
    width: 150px;
    height: 82px;
    overflow: visible;
    pointer-events: none;
}

.gmci-search-onboarding-arrow svg { display: block; width: 100%; height: 100%; overflow: visible; }
.gmci-search-onboarding-arrow__line,
.gmci-search-onboarding-arrow__head {
    fill: none;
    stroke: #ef4136;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 1px 2px rgba(239, 65, 54, .38));
}
.gmci-search-onboarding-arrow__line {
    stroke-dasharray: 160;
    stroke-dashoffset: 160;
    animation: gmci-search-arrow-draw .72s ease-out forwards, gmci-search-arrow-breathe 1.15s .72s ease-in-out infinite;
}
.gmci-search-onboarding-arrow__head {
    opacity: 0;
    animation: gmci-search-arrow-head .25s .58s ease-out forwards;
}
.gmci-search-onboarding-arrow__pulse {
    fill: #ef4136;
    opacity: .25;
    transform-origin: 9px 70px;
    animation: gmci-search-arrow-pulse .9s ease-out infinite;
}
.gmci-search-onboarding-suggestions .gmci-search-onboarding-arrow { display: none; }
.gmci-public-search__input-row button.gmci-search-onboarding-button {
    animation: gmci-search-button-vibrate .56s linear infinite;
    box-shadow: 0 0 0 0 rgba(215, 174, 107, .5);
}
.gmci-public-search__suggestions button.gmci-public-search__suggestion--demo-highlight {
    background: #f3e5ce;
    box-shadow: inset 4px 0 0 #c79343;
    animation: gmci-search-suggestion-highlight 1.25s ease-in-out infinite;
}

.gmci-public-search__suggestions {
    position: absolute;
    z-index: 100000;
    top: 54px;
    left: 0;
    display: grid;
    width: 100%;
    overflow: hidden;
    border: 1px solid #d9d1c6;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .24);
}

.gmci-public-search__suggestions[hidden] { display: none; }

.gmci-public-search__suggestions button {
    padding: 11px 15px;
    border: 0;
    border-bottom: 1px solid #eee8df;
    background: #fff;
    color: #201b16;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.gmci-public-search__suggestions button:hover,
.gmci-public-search__suggestions button:focus { background: #f6efe5; }

.gmci-public-search__status {
    position: absolute;
    z-index: 100001;
    top: 58px;
    left: 0;
    min-height: 0;
    color: #f4dfbd;
    font-size: 14px;
}

.gmci-public-search__status:not(:empty) { margin-top: 8px; }

.gmci-public-search__status[data-state=loading]:before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 8px;
    border: 2px solid rgba(255, 255, 255, .3);
    border-top-color: #d7ae6b;
    border-radius: 50%;
    animation: gmci-spin .8s linear infinite;
}

.gmci-public-search__status[data-state=error] { color: #ffd2ca; }

.gmci-session-drops {
    position: absolute;
    z-index: 99999;
    top: 56px;
    left: 50%;
    width: max-content;
    max-width: calc(100vw - 24px);
    transform: translateX(-50%);
    text-align: center;
}

.gmci-session-drops[hidden],
.gmci-session-drops__panel[hidden] { display: none; }

.gmci-session-drops__toggle {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    min-height: 26px;
    padding: 2px 8px;
    border: 0;
    background: transparent;
    color: #f2eadf;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    text-shadow: 0 1px 5px rgba(0, 0, 0, .55);
}

.gmci-session-drops__toggle:hover,
.gmci-session-drops__toggle:focus-visible { color: #d7ae6b; }

.gmci-session-drops__panel {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 2px;
    padding: 8px 10px;
    border: 1px solid rgba(215, 174, 107, .2);
    border-radius: 18px 5px 18px 5px;
    background: rgba(24, 23, 21, .97);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
}

.gmci-session-drops__items {
    display: flex;
    gap: 10px;
    align-items: center;
}

.gmci-session-drops__item {
    min-height: 38px;
    padding: 7px 16px;
    border: 1px solid rgba(215, 174, 107, .72);
    border-radius: 19px 5px 19px 5px;
    background: rgba(255, 255, 255, .035);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    cursor: pointer;
}

.gmci-session-drops__item:hover,
.gmci-session-drops__item:focus-visible {
    background: rgba(215, 174, 107, .14);
    color: #f5d9ab;
}

.gmci-session-drops__close {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, .78);
    font: inherit;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
}

html.gmci-search-open,
body.gmci-search-open {
    overflow: hidden !important;
}

.gmci-public-search__result {
    position: absolute;
    z-index: 100000;
    top: 66px;
    left: 50%;
    display: grid;
    gap: 16px;
    width: min(1180px, calc(100vw - 32px));
    max-height: calc(100dvh - 82px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px;
    border-radius: 22px;
    background: #f4efe7;
    color: #201b16;
    transform: translateX(-50%);
    box-shadow: 0 24px 70px rgba(0, 0, 0, .28);
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.gmci-public-search__result[hidden] { display: none; }

.gmci-public-search__close {
    position: sticky;
    z-index: 3;
    top: 0;
    justify-self: end;
    width: 38px;
    height: 38px;
    margin: 0 0 -54px;
    padding: 0;
    border: 1px solid rgba(33, 27, 21, .14);
    border-radius: 50%;
    background: #fff;
    color: #201b16;
    font-family: inherit;
    font-size: 25px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .12);
}

.gmci-public-search__close:hover,
.gmci-public-search__close:focus-visible { background: #ead8ba; }

.gmci-public-search__answer { padding-right: 48px; }

.gmci-public-search__answer > span,
.gmci-public-search__offer > span,
.gmci-public-search__advice > span {
    color: #a77831;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.gmci-public-search__answer h3,
.gmci-public-search__offer h3,
.gmci-public-search__advice h3 {
    margin: 5px 0 7px;
    color: #201b16;
    font-size: clamp(23px, 2.5vw, 34px);
}

.gmci-public-search__answer p,
.gmci-public-search__offer p,
.gmci-public-search__advice p {
    max-width: 820px;
    margin: 6px 0;
    color: #665d54;
    line-height: 1.5;
}

.gmci-public-search__catalog-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    margin-top: 9px;
    padding: 9px 16px;
    border-radius: 18px 5px 18px 5px;
    background: #c99b51;
    color: #20170d;
    font-weight: 800;
    text-decoration: none;
}

.gmci-public-search__catalog-link:hover,
.gmci-public-search__catalog-link:focus-visible {
    background: #dab36f;
    color: #20170d;
}

.gmci-public-search__offer,
.gmci-public-search__advice {
    padding: 17px 19px;
    border-left: 5px solid #c49a58;
    border-radius: 12px;
    background: #fff;
}

.gmci-public-search__advice { border-left-color: #6b7d57; }

.gmci-public-search__evidence {
    padding: 14px 16px;
    border: 1px solid rgba(33, 27, 21, .12);
    border-radius: 12px;
    background: #fff;
}

.gmci-public-search__evidence summary { cursor: pointer; font-weight: 750; }

.gmci-public-search__evidence ol {
    display: grid;
    gap: 10px;
    margin: 14px 0 0;
    padding-left: 22px;
}

.gmci-public-search__evidence li span {
    display: block;
    margin-top: 3px;
    color: #756b60;
    font-size: 13px;
    line-height: 1.45;
}

.gmci-public-search__empty {
    padding: 19px;
    border-radius: 12px;
    background: #fff;
}

.gmci-public-search__empty a {
    display: inline-block;
    margin-top: 8px;
    color: #74551f;
    font-weight: 750;
}

.gmci-public-search__result .gm-cg {
    left: auto;
    width: 100%;
    max-width: none;
    margin-top: 4px;
    padding: 20px;
    transform: none;
    box-shadow: none;
}

.gmci-public-search__more {
    min-height: 48px;
    padding: 14px 18px;
    border: 1px solid rgba(33, 27, 21, .12);
    border-radius: 18px 5px 18px 5px;
    background: #fff;
    color: #74551f;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
}

.gmci-public-search__final {
    display: grid;
    gap: 14px;
    padding-top: 4px;
}

.gmci-public-search__final[hidden] { display: none; }

.gmci-public-search__continuation {
    padding: 20px;
    border-radius: 18px 5px 18px 5px;
    background: #211b16;
    color: #fff;
}

.gmci-public-search__continuation > span {
    color: #d7ae6b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.gmci-public-search__continuation h3 {
    margin: 6px 0 8px;
    color: #fff;
    font-size: clamp(22px, 2.2vw, 31px);
}

.gmci-public-search__continuation p {
    max-width: 760px;
    margin: 0 0 14px;
    color: #ddd3c8;
    line-height: 1.5;
}

.gmci-public-search__continuation button {
    min-height: 42px;
    padding: 10px 18px;
    border: 0;
    border-radius: 18px 5px 18px 5px;
    background: #d7ae6b;
    color: #21170d;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

@keyframes gmci-spin { to { transform: rotate(360deg); } }
@keyframes gmci-search-arrow-draw { to { stroke-dashoffset: 0; } }
@keyframes gmci-search-arrow-head { to { opacity: 1; } }
@keyframes gmci-search-arrow-breathe { 50% { opacity: .52; } }
@keyframes gmci-search-arrow-pulse { 0% { opacity: .65; transform: scale(.7); } 100% { opacity: 0; transform: scale(3.2); } }
@keyframes gmci-search-button-vibrate {
    0%,100% { transform: translateX(0) rotate(0); box-shadow: 0 0 0 0 rgba(215,174,107,.46); }
    20% { transform: translateX(-2px) rotate(-1deg); }
    40% { transform: translateX(2px) rotate(1deg); box-shadow: 0 0 0 7px rgba(215,174,107,0); }
    60% { transform: translateX(-1px) rotate(-.6deg); }
    80% { transform: translateX(1px) rotate(.6deg); }
}
@keyframes gmci-search-suggestion-highlight { 50% { background: #ead1aa; } }

@media (max-width: 1500px) and (min-width: 768px) {
    .gm-header .header__bottom-wrap:has(.gmci-public-search) {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    .gm-header .header__bottom-wrap:has(.gmci-public-search) .gm-header__logo-link {
        order: 1;
    }

    .gm-header .header__bottom-wrap:has(.gmci-public-search) .gm-header__contacts {
        order: 2;
        flex: 1 1 auto;
    }

    .gmci-public-search {
        order: 3;
        flex: 1 0 100%;
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 767.98px) {
    .gm-header .header__bottom-wrap:has(.gmci-public-search),
    body:has(.gm-home) .gm-header .header__bottom-wrap:has(.gmci-public-search) {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    .gm-header .header__bottom-wrap:has(.gmci-public-search) .gm-header__contacts {
        order: 1;
    }

    .gmci-public-search {
        order: 2;
        flex: 0 0 auto;
        width: 100%;
        min-width: 0;
    }

    .gmci-public-search__input-row input {
        height: 44px;
        padding-right: 96px;
        border-radius: 22px 5px 22px 5px;
    }

    .gmci-public-search__input-row button {
        min-width: 82px;
        height: 36px;
        padding: 0 14px;
        border-radius: 18px 4px 18px 4px;
        font-size: 12px;
    }

    .gmci-public-search__suggestions { top: 50px; }

    .gmci-search-onboarding-arrow {
        top: -2px;
        left: 5px;
        width: 138px;
        height: 78px;
    }

    .gmci-search-onboarding-arrow__line,
    .gmci-search-onboarding-arrow__head {
        stroke: #ef4136;
        stroke-width: 1.5;
        filter: drop-shadow(0 1px 2px rgba(239, 65, 54, .38));
    }

    .gmci-search-onboarding-arrow__pulse { fill: #ef4136; }

    .gmci-public-search__status { top: 52px; }

    .gmci-session-drops {
        top: 50px;
        width: calc(100vw - 20px);
    }

    .gmci-session-drops__panel {
        width: 100%;
        padding: 7px 8px;
    }

    .gmci-session-drops__items {
        flex: 1 1 auto;
        overflow-x: auto;
        padding-bottom: 2px;
        overscroll-behavior-x: contain;
        scrollbar-width: thin;
    }

    .gmci-session-drops__item {
        min-height: 36px;
        padding: 6px 13px;
        font-size: 12px;
    }

    .gmci-public-search__result {
        top: 58px;
        width: calc(100vw - 20px);
        max-height: calc(100dvh - 68px);
        padding: 10px;
        border-radius: 17px;
    }

    .gmci-public-search__result .gm-cg { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .gmci-search-onboarding-arrow,
    .gmci-public-search__input-row button.gmci-search-onboarding-button { animation: none !important; }
}
