/* templates/traveller/css/site-search.css
   Поиск по сайту: иконка в шапке + модальное окно по центру экрана. */

.trvtmpl-header__search {
    display: flex;
    align-items: center;
    margin-left: 12px;
    flex: none;
}

/* Кнопка-лупа: цвет задаётся явно, подложка делает её видимой на любом фоне.
   Цвет можно переопределить: --trvtmplSearchIconColor */
.trvtmpl-search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1.5px solid var(--trvtmplSearchIconColor, #fff);
    border-radius: 50%;
    background: rgba(0, 0, 0, .28);
    color: var(--trvtmplSearchIconColor, #fff);
    cursor: pointer;
    transition: background-color .2s;
}

.trvtmpl-search-toggle:hover,
.trvtmpl-search-toggle:focus-visible {
    background: rgba(255, 255, 255, .28);
    outline: none;
}

.trvtmpl-search-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
    stroke: currentColor;
}

/* Корень: на весь экран, содержимое по центру */
.trvtmpl-site-search {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 99990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    visibility: hidden;
    opacity: 0;
    transition: opacity .2s, visibility .2s;
}

.trvtmpl-site-search.is-open {
    visibility: visible;
    opacity: 1;
}

.trvtmpl-site-search__backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, .55);
}

.trvtmpl-site-search__box {
    position: relative;
    width: 100%;
    max-width: 680px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    box-sizing: border-box;
    padding: 24px;
    border-radius: 16px;
    background: var(--trvtmplBlockColor, #fff);
    color: var(--trvtmplFontDarkColor, #222);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
    transform: translateY(10px) scale(.98);
    transition: transform .2s;
}

.trvtmpl-site-search.is-open .trvtmpl-site-search__box {
    transform: none;
}

.trvtmpl-site-search__form {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, .15);
    padding-bottom: 10px;
}

.trvtmpl-site-search__icon {
    width: 20px;
    height: 20px;
    flex: none;
    opacity: .6;
}

.trvtmpl-site-search__input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 18px;
    padding: 8px 0;
    -webkit-appearance: none;
    appearance: none;
}

.trvtmpl-site-search__input::-webkit-search-cancel-button {
    display: none;
}

.trvtmpl-site-search__submit {
    flex: none;
    border: 0;
    border-radius: 8px;
    padding: 10px 20px;
    background: var(--trvtmplButtonsColor, #0e4f5f);
    color: var(--trvtmplButtonsTextColor, #fff);
    font: inherit;
    cursor: pointer;
}

.trvtmpl-site-search__close {
    flex: none;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    opacity: .6;
}

.trvtmpl-site-search__close:hover {
    opacity: 1;
}

.trvtmpl-site-search__suggest {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}

.trvtmpl-site-search__suggest:empty {
    display: none;
}

.trvtmpl-site-search__suggest li {
    padding: 10px 8px;
    border-radius: 6px;
    cursor: pointer;
}

.trvtmpl-site-search__suggest li:hover,
.trvtmpl-site-search__suggest li.is-active {
    background: rgba(0, 0, 0, .06);
}

.trvtmpl-site-search__popular {
    margin-top: 14px;
}

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

@media (max-width: 767px) {
    .trvtmpl-header__search {
        margin-right: 10px;
				margin-left: 0px;
    }

    .trvtmpl-search-toggle {
        width: 36px;
        height: 36px;
    }

    .trvtmpl-site-search__box {
        padding: 16px;
    }

    .trvtmpl-site-search__input {
        font-size: 16px;
    }

    .trvtmpl-site-search__submit {
        padding: 8px 12px;
    }
		
		.trvtmpl-header--menu-opened .trvtmpl-header--loaded .trvtmpl-header__wrapper .trvtmpl-header__search {
			display: none;
		}
		
}