:root {
	--ai-search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cg transform='translate(0,512) scale(0.1,-0.1)' fill='%233388ff' stroke='none'%3E%3Cpath d='M3791 4221c-8-5-25-46-38-91-61-211-190-378-373-482-30-17-104-47-165-67-101-33-110-38-110-61 0-21 7-27 45-38 104-31 191-65 251-100 78-45 204-167 253-244 43-67 91-184 107-257 11-53 34-76 63-65 9 3 19 18 22 33 39 176 107 304 222 418 87 85 233 171 337 197 102 25 105 27 105 50 0 31-13 39-93 61-149 39-298 133-400 253-57 67-140 233-158 316-16 75-36 97-68 77z'/%3E%3Cpath d='M2277 3724c-391-70-723-274-960-589-76-101-183-309-222-429-64-201-86-497-51-706 84-510 426-946 898-1144 109-45 162-62 293-92 115-26 463-27 585-1 238 51 490 170 659 311l44 37 347-345c333-333 347-346 384-346 53 0 96 43 96 96 0 37-13 51-347 385l-346 347 40 49c103 123 202 304 257 467 52 155 91 425 72 499-10 43-44 67-92 67-60 0-94-41-94-114 0-212-79-476-199-666-186-295-456-492-800-583-110-29-126-31-311-31-183-1-202 1-305 28-266 69-459 179-641 368-99 102-161 188-225 315-95 187-139 373-139 594 0 355 122 656 368 911 235 243 532 379 867 395 103 6 111 8 137 34 38 38 39 92 1 131-26 27-29 28-132 27-58 0-141-7-184-15z' stroke='%233388ff' stroke-width='170' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/g%3E%3C/svg%3E");
	--ai-search-icon-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cg transform='translate(0,512) scale(0.1,-0.1)' fill='%23ffffff' stroke='none'%3E%3Cpath d='M3791 4221c-8-5-25-46-38-91-61-211-190-378-373-482-30-17-104-47-165-67-101-33-110-38-110-61 0-21 7-27 45-38 104-31 191-65 251-100 78-45 204-167 253-244 43-67 91-184 107-257 11-53 34-76 63-65 9 3 19 18 22 33 39 176 107 304 222 418 87 85 233 171 337 197 102 25 105 27 105 50 0 31-13 39-93 61-149 39-298 133-400 253-57 67-140 233-158 316-16 75-36 97-68 77z'/%3E%3Cpath d='M2277 3724c-391-70-723-274-960-589-76-101-183-309-222-429-64-201-86-497-51-706 84-510 426-946 898-1144 109-45 162-62 293-92 115-26 463-27 585-1 238 51 490 170 659 311l44 37 347-345c333-333 347-346 384-346 53 0 96 43 96 96 0 37-13 51-347 385l-346 347 40 49c103 123 202 304 257 467 52 155 91 425 72 499-10 43-44 67-92 67-60 0-94-41-94-114 0-212-79-476-199-666-186-295-456-492-800-583-110-29-126-31-311-31-183-1-202 1-305 28-266 69-459 179-641 368-99 102-161 188-225 315-95 187-139 373-139 594 0 355 122 656 368 911 235 243 532 379 867 395 103 6 111 8 137 34 38 38 39 92 1 131-26 27-29 28-132 27-58 0-141-7-184-15z' stroke='%23ffffff' stroke-width='170' stroke-linejoin='round' stroke-linecap='round'/%3E%3C/g%3E%3C/svg%3E");
}

.ai-search-open {
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: center;
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #38f;
	font-size: 0;
	cursor: pointer;
	transition: opacity 0.2s linear;
}

.ai-search-open:before {
	content: "";
	display: block;
	width: 30px;
	height: 30px;
	background: var(--ai-search-icon) center/contain no-repeat;
	transform: translateY(-4px);
}

.ai-search-open:hover,
.ai-search-open:focus {
	opacity: 0.72;
}

body.home .header:not(.fixed_header) .ai-search-open,
body.page-template-template-homepage .header:not(.fixed_header) .ai-search-open {
	--ai-search-icon: var(--ai-search-icon-white);
	color: #fff;
}

.ai-search-layer {
	position: fixed;
	z-index: 120;
	inset: 75px 0 0;
	overflow: auto;
	padding: 54px 0;
	background: rgba(0, 20, 76, 0.36);
}

.ai-search-active {
	overflow: hidden;
}

.ai-search-layer .contacts_page {
	min-height: calc(100vh - 183px);
	padding: 0;
	background: transparent;
}

.ai-search-panel {
	position: relative;
	max-width: 860px;
	margin: 0 auto;
	padding: 58px 72px 64px;
	border: 1px solid #f2f2f2;
	background: #fafafa;
}

.ai-search-intro {
	max-width: 670px;
	margin-top: 18px;
	color: #333;
	font: 400 16px/24px "Lato";
}

.ai-search-close {
	position: absolute;
	top: 22px;
	right: 22px;
	display: grid;
	width: 34px;
	height: 34px;
	place-items: center;
	border: 0;
	background: transparent;
	color: #000;
	font-size: 0;
	cursor: pointer;
}

.ai-search-close:before,
.ai-search-close:after {
	content: "";
	position: absolute;
	width: 18px;
	height: 2px;
	background: #000;
}

.ai-search-close:before {
	transform: rotate(45deg);
}

.ai-search-close:after {
	transform: rotate(-45deg);
}

.ai-search-close:hover:before,
.ai-search-close:hover:after {
	background: #38f;
}

.ai-search-box {
	margin-top: 28px;
}

.ai-search-field {
	position: relative;
	display: flex;
	align-items: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 56px;
	padding: 0 58px;
	border: 1px solid #f2f2f2;
	background: #fff;
	color: #000;
	font: 700 18px/22px "Lato";
}

.ai-search-field:before {
	content: "";
	position: absolute;
	top: 50%;
	left: 22px;
	width: 22px;
	height: 22px;
	background: var(--ai-search-icon) center/contain no-repeat;
	transform: translateY(-50%) translateY(-3px);
}

.ai-search-field input[type="search"] {
	width: 100%;
	min-height: 54px;
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-bottom: 0 !important;
	outline: 0;
	background: transparent !important;
	box-shadow: none !important;
	color: #000;
	font: inherit;
	-webkit-appearance: none;
	appearance: none;
}

.ai-search-field input[type="search"]::-webkit-search-cancel-button,
.ai-search-field input[type="search"]::-webkit-search-decoration {
	display: none;
	-webkit-appearance: none;
	appearance: none;
}

.ai-search-field input[type="search"]::placeholder {
	color: #333 !important;
	font: 400 14px "Lato";
	opacity: 1;
}

.ai-search-clear {
	position: absolute;
	top: 50%;
	right: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	cursor: pointer;
	transform: translateY(-50%);
	transition: background 0.2s linear;
}

.ai-search-clear[hidden] {
	display: none;
}

.ai-search-clear:before,
.ai-search-clear:after {
	content: "";
	position: absolute;
	width: 14px;
	height: 2px;
	background: #1f54c0;
	transition: background 0.2s linear;
}

.ai-search-clear:before {
	transform: rotate(45deg);
}

.ai-search-clear:after {
	transform: rotate(-45deg);
}

.ai-search-clear:hover,
.ai-search-clear:focus {
	background: #e7f2fc;
}

.ai-search-clear:hover:before,
.ai-search-clear:hover:after,
.ai-search-clear:focus:before,
.ai-search-clear:focus:after {
	background: #38f;
}

.ai-search-box .main_btn {
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin-top: 16px;
	border: 2px solid transparent;
	text-align: center;
}

.ai-search-box .main_btn:hover,
.ai-search-box .main_btn:focus {
	border-color: #38f;
}

.ai-search-suggestions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 20px;
}

.ai-search-suggestions button {
	max-width: 100%;
	padding: 13px 18px;
	border: 1px solid #e5e5e5;
	background: #fff;
	color: #333;
	font: 600 14px/18px "Lato";
	text-align: left;
	cursor: pointer;
	overflow-wrap: anywhere;
}

.ai-search-suggestions button:hover,
.ai-search-suggestions button:focus {
	border-color: #38f;
	color: #38f;
}

.ai-search-status {
	min-height: 22px;
	margin-top: 20px;
	color: #555;
	font: 400 14px/20px "Lato";
}

.ai-search-status.is-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 74px;
	margin: 30px auto 0;
	color: #38f;
	font: 700 30px/36px "Lato";
	text-align: center;
	letter-spacing: 0;
}

.ai-search-status-wave {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
}

.ai-search-status-char {
	display: inline-block;
	animation: ai-search-status-wave 1.15s ease-in-out infinite;
	animation-delay: calc(var(--ai-search-wave-index) * 0.06s);
	will-change: transform;
}

.ai-search-status.is-error {
	color: #dc3232;
}

.ai-search-results {
	margin-top: 46px;
}

.ai-search-results-title {
	margin-bottom: 24px;
}

.ai-search-result {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-top: 18px;
	padding: 22px 24px;
	border: 1px solid #f2f2f2;
	background: #fff;
}

.ai-search-result:first-of-type {
	background: #e7f2fc;
}

.ai-search-result .category {
	margin-bottom: 9px;
	color: #38f;
	text-transform: uppercase;
	font: 700 11px "Lato";
}

.ai-search-result .title {
	display: inline-block;
	color: #000;
	font: 700 20px/26px "Lato";
	overflow-wrap: anywhere;
}

.ai-search-result .text,
.ai-search-fallback .text {
	max-width: 600px;
	margin-top: 8px;
	color: #555;
	font: 400 14px/20px "Lato";
}

.ai-search-result .border_btn {
	flex: 0 0 auto;
	border-color: #38f;
	color: #38f;
	text-align: center;
}

.ai-search-result .border_btn:hover {
	border-color: #38f;
	background: #38f;
	color: #fff;
}

.ai-search-fallback {
	padding: 22px 24px;
	border: 1px solid #f2f2f2;
	background: #fff;
}

.ai-search-fallback .border_btn {
	display: inline-block;
	margin-top: 18px;
}

body.night .ai-search-panel,
body.night .ai-search-result,
body.night .ai-search-fallback,
body.night .ai-search-field,
body.night .ai-search-suggestions button {
	border-color: rgba(255, 255, 255, 0.14);
	background: #101820;
	color: #fff;
}

body.night .ai-search-field input[type="search"] {
	color: #fff;
}

body.night .ai-search-field input[type="search"]::placeholder {
	color: #fff !important;
	font: 400 14px "Lato";
}

body.night .ai-search-intro {
	color: rgba(255, 255, 255, 0.78);
}

body.night .ai-search-clear:before,
body.night .ai-search-clear:after {
	background: #fff;
}

body.night .ai-search-clear:hover,
body.night .ai-search-clear:focus {
	background: rgba(255, 255, 255, 0.08);
}

body.night .ai-search-clear:hover:before,
body.night .ai-search-clear:hover:after,
body.night .ai-search-clear:focus:before,
body.night .ai-search-clear:focus:after {
	background: #38f;
}

body.night .ai-search-result:first-of-type {
	background: #102947;
}

body.night .ai-search-close:before,
body.night .ai-search-close:after {
	background: #fff;
}

body.night .ai-search-result .title,
body.night .ai-search-result .text,
body.night .ai-search-fallback .text,
body.night .ai-search-status {
	color: #fff;
}

body.night .ai-search-status.is-loading {
	color: #76adff;
}

@keyframes ai-search-status-wave {
	0%,
	40%,
	100% {
		transform: translateY(0);
	}

	20% {
		transform: translateY(-9px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ai-search-status-char {
		animation: none;
	}
}

@media screen and (max-width: 1199px) {
	.ai-search-open {
		width: 30px;
		height: 30px;
		margin: 0;
	}

	.ai-search-open:before {
		width: 27px;
		height: 27px;
	}
}

@media screen and (max-width: 991px) {
	.ai-search-open {
		position: static;
		flex: 0 0 auto;
		align-self: center;
		margin: 0;
	}

	.ai-search-layer {
		padding: 34px 0;
	}

	.ai-search-layer .contacts_page {
		min-height: calc(100vh - 143px);
	}

	.ai-search-panel {
		padding: 54px 36px 50px;
	}

	.ai-search-result {
		display: block;
	}

	.ai-search-result .border_btn {
		display: block;
		margin-top: 18px;
	}
}

@media screen and (max-width: 565px) {
	.ai-search-open {
		width: 28px;
		height: 28px;
		margin: 0;
	}

	.ai-search-open:before {
		width: 25px;
		height: 25px;
	}

	.ai-search-layer {
		inset: 74px 0 0;
		padding: 0;
	}

	.ai-search-layer .contacts_page.second_p {
		min-height: calc(100vh - 74px);
		padding: 0;
	}

	.ai-search-panel {
		min-height: calc(100vh - 74px);
		padding: 36px 15px 54px;
		border: 0;
	}

	.ai-search-close {
		top: 20px;
		right: 15px;
	}

	.ai-search-field {
		min-height: 64px;
		padding-right: 52px;
		font-size: 16px;
		line-height: 20px;
	}

	.ai-search-suggestions {
		gap: 10px;
	}

	.ai-search-suggestions button {
		padding: 11px 14px;
		font-size: 13px;
	}

	.ai-search-status.is-loading {
		min-height: 64px;
		font-size: 24px;
		line-height: 30px;
	}

	.ai-search-results {
		margin-top: 24px;
	}

	.ai-search-result,
	.ai-search-fallback {
		padding: 18px;
	}

	.ai-search-result .title {
		font-size: 18px;
		line-height: 22px;
	}
}
