/* Верхняя полоса: контакты + поиск */

.site-topbar.top_bg {
	background: #f3f1f5;
	box-shadow: inset 0 -1px 0 #e4dfe8;
}

.site-topbar__inner.top_block {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px 24px;
	max-width: 1060px;
	margin: 0 auto;
	padding: 10px 20px;
	box-sizing: border-box;
}

/* Сброс legacy float */
.site-topbar .phone_feedback,
.site-topbar .social_link,
.site-topbar .search {
	float: none !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	text-align: left !important;
	line-height: normal !important;
}

.site-topbar__contacts {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px 20px;
	flex: 1 1 auto;
	min-width: 0;
}

.site-topbar__phones {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 18px;
}

.site-topbar__phone {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: #212121;
	font-size: 14px;
	line-height: 1.25;
	white-space: nowrap;
	transition: opacity 0.2s;
}

.site-topbar__phone:hover {
	opacity: 0.85;
	color: #603669;
}

.site-topbar__phone-icon {
	display: inline-block;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	background: center / contain no-repeat;
	border-radius: 3px;
}

.site-topbar__phone-icon:not([style*="url("]),
.site-topbar__phone-icon[style*="url()"] {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23603669'%3E%3Cpath d='M6.6 10.8c1.4 2.8 3.8 5.1 6.6 6.6l2.2-2.2c.3-.3.7-.4 1.1-.3 1.2.4 2.5.6 3.9.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1-9.4 0-17-7.6-17-17 0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.4.2 2.7.6 3.9.1.4 0 .8-.3 1.1L6.6 10.8z'/%3E%3C/svg%3E") !important;
}

.site-topbar__phone-main {
	color: #603669;
	font-weight: 700;
}

.site-topbar__email {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: #212121;
	font-size: 14px;
	line-height: 1.25;
	white-space: nowrap;
}

.site-topbar__email:hover {
	color: #603669;
}

.site-topbar__email-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	background: center / contain no-repeat;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23603669'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}

.site-topbar__social {
	display: flex;
	align-items: center;
	gap: 8px;
}

.site-topbar__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	overflow: hidden;
	text-decoration: none;
	transition: transform 0.2s, box-shadow 0.2s;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.site-topbar__social-link:hover {
	transform: translateY(-1px);
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.site-topbar__social-link img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Поиск */
.site-topbar__search form {
	display: flex;
	align-items: stretch;
	margin: 0;
}

.site-topbar__search input[type="text"],
.site-topbar__search input[type="search"] {
	width: 220px;
	height: 36px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid #d8d2de;
	border-right: none;
	border-radius: 8px 0 0 8px;
	font: inherit;
	font-size: 14px;
	box-sizing: border-box;
	outline: none;
	background: #fff;
	-webkit-appearance: none;
}

.site-topbar__search input:focus {
	border-color: #603669;
	box-shadow: inset 0 0 0 1px #603669;
}

.site-topbar__search button {
	width: 40px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 1px solid #603669;
	border-radius: 0 8px 8px 0;
	background-color: #603669;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 18px 18px;
	cursor: pointer;
	flex-shrink: 0;
}

.site-topbar__search button:hover {
	background-color: #4a2854;
	border-color: #4a2854;
}

/* Скрыть старые списки соцсетей */
.site-topbar .modx-evo-ul-infasss,
.site-topbar .modx-evo-st-li-icons {
	display: contents;
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-topbar .modx-evo-soc-icons-infa,
.site-topbar .modx-evo-soc-icons-infa-iconns {
	display: contents;
}

@media (max-width: 900px) {
	.site-topbar__inner {
		flex-wrap: wrap;
	}

	.site-topbar__search {
		flex: 1 1 100%;
		order: 3;
	}

	.site-topbar__search form {
		width: 100%;
	}

	.site-topbar__search input[type="text"],
	.site-topbar__search input[type="search"] {
		width: 100%;
		flex: 1;
	}
}

@media (max-width: 600px) {
	.site-topbar__inner {
		padding: 12px 14px;
		gap: 12px;
	}

	.site-topbar__contacts {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
		width: 100%;
	}

	.site-topbar__phones {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		width: 100%;
	}

	.site-topbar__phone {
		white-space: normal;
	}

	.site-topbar__social {
		width: 100%;
		justify-content: flex-start;
	}
}
