/**
 * Верхняя часть шапки — как в React (tskdiplomat).
 * Только высота и стили верхней полосы, остальные компоненты не трогаем.
 */

/* Верхний блок — без sticky, обычный поток, blur и разделитель */
.newhead-general .shad-container {
	position: relative;
	z-index: 999;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(30px) saturate(180%);
	-webkit-backdrop-filter: blur(30px) saturate(180%);
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	box-shadow: none;
}

/* Обёртка строки = wrapper + preHeader по высоте и отступам */
.newhead-general .shad-container .osn-container {
	max-width: 1366px;
	min-width: 320px;
	margin: 0 auto;
	width: 100%;
}

.newhead-general .shad-container .cont {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 6px 20px;
	width: 100%;
	box-sizing: border-box;
	font-size: 13px;
	min-height: 40px;
	height: auto;
	font-family: 'Montserrat', sans-serif;
}

/* Верхняя строка меню/контактов — фиксированная высота как в React */
.newhead-general .shad-container #subHeaderLine {
	min-height: 40px !important;
	height: auto !important;
	line-height: 1 !important;
	border: none !important;
	border-bottom: none !important;
	border-top: none !important;
	background: transparent !important;
	padding: 0 !important;
	display: flex !important;
	align-items: center;
}

.newhead-general .shad-container #subHeaderLine .limiter {
	width: 100%;
	max-width: none;
	padding: 0;
}

.newhead-general .shad-container #subHeaderLine .subLineContainer {
	display: flex;
	width: 100%;
	table-layout: auto;
	align-items: center;
}

.newhead-general .shad-container #subHeaderLine .subLineLeft {
	display: flex;
	align-items: center;
	border-left: none;
	vertical-align: middle;
}

/* Правая часть строки (контакты + авторизация) в одну линию */
.newhead-general .shad-container .dev-login {
	position: static;
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
}

.newhead-general .shad-container .dev-login .obl_contacts,
.newhead-general .shad-container .dev-login #bx_incl_area_2 {
	display: flex;
	align-items: center;
	gap: 8px;
}

.newhead-general .shad-container .dev-login li {
	margin: 0;
}

.newhead-general .shad-container .dev-login li a {
	font-size: 13px;
	font-weight: 500;
}

.newhead-general .shad-container .new-menu-ahead {
	display: flex;
	align-items: center;
}

/* ========== Правая часть: телефон, почта, соцсети, вход (как в React) ========== */
.tsk-header-right {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: 'Montserrat', sans-serif;
	font-size: 13px;
}

.tsk-contacts {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* Иконки контактов — только в мобильной версии */
.tsk-contactIcon {
	display: none;
	flex-shrink: 0;
	vertical-align: middle;
}

/* Телефон — как Tel в React */
.tsk-tel {
	margin: 0;
}

.tsk-tel a,
.tsk-mail a {
	text-decoration: none;
	font-weight: 500;
	font-size: 13px;
	color: #333;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	padding: 5px 10px;
	border-radius: 6px;
	display: inline-block;
	position: relative;
	letter-spacing: 0.1px;
}

.tsk-tel a::before,
.tsk-mail a::before {
	content: '';
	position: absolute;
	bottom: 3px;
	left: 10px;
	right: 10px;
	height: 2px;
	background: linear-gradient(90deg, #ffcc33 0%, #ffd700 100%);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tsk-tel a:hover,
.tsk-mail a:hover {
	color: #1a1a1a;
	background: rgba(255, 204, 51, 0.1);
}

.tsk-tel a:hover::before,
.tsk-mail a:hover::before {
	transform: scaleX(1);
}

.tsk-mail {
	margin: 0;
}

/* Соцсети — как Auth headLinks/heada в React. Все 4 иконки всегда видны (и при авторизации) */
.tsk-socialLinks {
	display: flex;
	align-items: center;
	gap: 4px;
	min-width: 96px;
	flex-shrink: 0;
}

.tsk-socialLink {
	margin: 0 2px;
	transition: opacity 0.3s ease, transform 0.3s ease;
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	min-width: 24px;
}

.tsk-socialLink:hover {
	opacity: 0.7;
}

.tsk-socialLink img {
	display: block;
	width: 20px;
	height: 20px;
	min-width: 20px;
	min-height: 20px;
	object-fit: contain;
	object-position: center;
	vertical-align: middle;
}
/* Дзен — всегда виден. Перебиваем глобальное правило [href^="https://dzen.ru"] { display: none !important } из стилей пользователя/расширений */
a.tsk-socialLink--dzen[href^="https://dzen.ru"],
.tsk-socialLink--dzen {
	flex-shrink: 0;
	visibility: visible;
	display: inline-flex !important;
}
.tsk-socialLink--dzen img {
	opacity: 1;
	visibility: visible;
	min-width: 20px;
	min-height: 20px;
}

/* Вход/регистрация — как Auth.authCard в React */
.tsk-authWrap {
	display: flex;
	align-items: center;
}

.tsk-authCard {
	background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
	padding: 6px 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), inset 0 1px 2px rgba(255, 255, 255, 0.6);
	display: flex;
	align-items: center;
	gap: 8px;
	border-radius: 8px;
	border: 1px solid rgba(0, 0, 0, 0.06);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tsk-authCard:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), inset 0 1px 2px rgba(255, 255, 255, 0.7);
}

.tsk-authCardLoggedIn {
	/* тот же нейтральный стиль, что и у блока «Войти/Регистрация» — без жёлтого */
}

.tsk-authCardLoggedIn .tsk-authCardLinkIcon {
	background-color: transparent;
	color: #666;
}

.tsk-authCardLoggedIn .tsk-authCardLinkIcon:hover {
	background-color: transparent;
	color: #333;
}

.tsk-authCardGreeting {
	color: #1a1a1a;
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.2px;
}

.tsk-authCardLink {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 10px;
	border-radius: 8px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	text-decoration: none;
	color: #1a1a1a;
	background-color: rgba(255, 255, 255, 0.4);
	font-size: 13px;
	font-weight: 500;
	border: none;
	cursor: pointer;
	font-family: inherit;
}

.tsk-authCardLink:hover {
	background-color: rgba(255, 255, 255, 0.7);
}

.tsk-authCard:not(.tsk-authCardLoggedIn) .tsk-authCardLink {
	background-color: transparent;
	color: #666;
}

.tsk-authCard:not(.tsk-authCardLoggedIn) .tsk-authCardLink:hover {
	background-color: transparent;
	color: #333;
}

/* Иконки «Войти» / «Регистрация» — Feather-стиль, один размер, без файлов */
.tsk-authCardLinkIcon {
	width: 28px;
	height: 28px;
	min-width: 28px;
	min-height: 28px;
	padding: 6px !important;
	box-sizing: border-box;
	transition: opacity 0.3s ease, background-color 0.3s ease;
}

.tsk-authCardLinkIcon .tsk-authIcon {
	display: block;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	transition: opacity 0.3s ease;
}

.tsk-authCardLinkIcon .tsk-authIcon {
	flex-shrink: 0;
}

/* Выцветание при наведении, без сдвига */
.tsk-authCardLinkIcon:hover {
	opacity: 0.75;
}

.tsk-authCardLinkIcon:hover .tsk-authIcon {
	opacity: 0.85;
}

.tsk-authLogoutForm {
	display: inline-flex;
	align-items: center;
	margin: 0;
	padding: 0;
}

@media (max-width: 1100px) {
	.tsk-socialLinks {
		display: none;
	}
}

/* ========== Адаптивность как в React: 960px (телефон слева, почта по центру, войти/рег справа) ========== */
@media (max-width: 960px) {
	.newhead-general .shad-container .new-menu-ahead {
		display: none !important;
	}

	.newhead-general .shad-container #subHeaderLine .subLineContainer {
		width: 100%;
		justify-content: flex-end;
	}

	.newhead-general .shad-container .dev-login {
		width: 100%;
		max-width: 100%;
		justify-content: flex-end;
		box-sizing: border-box;
	}

	.newhead-general .shad-container .dev-login .obl_contacts,
	.newhead-general .shad-container .dev-login #bx_incl_area_2 {
		width: 100%;
		max-width: 100%;
		min-width: 0;
		box-sizing: border-box;
	}

	.tsk-header-right {
		display: grid;
		grid-template-columns: 1fr 1fr 1fr;
		align-items: center;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		gap: 8px;
		box-sizing: border-box;
	}

	.tsk-contactsRow {
		grid-column: 1 / 3;
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 6px 12px;
		min-width: 0;
	}

	.tsk-contactLink {
		display: inline-flex !important;
		align-items: center;
		gap: 6px;
		padding: 4px 8px !important;
		font-size: 12px !important;
	}

	.tsk-contactLink::before {
		display: none !important;
	}

	.tsk-contactIcon {
		display: block !important;
		width: 16px;
		height: 16px;
	}

	.tsk-authWrap {
		grid-column: 3;
		justify-self: end;
		flex-shrink: 0;
		min-width: 0;
	}
}

@media (max-width: 900px) {
	.newhead-general .shad-container .cont {
		padding: 6px 12px;
	}

	.tsk-contactsRow {
		gap: 4px 10px;
	}

	.tsk-contactLink {
		padding: 3px 6px !important;
		font-size: 11px !important;
		gap: 4px;
	}

	.tsk-contactIcon {
		width: 14px;
		height: 14px;
	}

	.tsk-header-right {
		gap: 6px;
	}
}

/* Мобильная версия: только телефон слева, почта справа (без входа/рег) */
@media (max-width: 768px) {
	.newhead-general .shad-container .dev-login,
	.newhead-general .shad-container .dev-login #bx_incl_area_2 {
		width: 100%;
		max-width: 100%;
	}

	.tsk-header-right {
		display: flex;
		justify-content: space-between;
		width: 100%;
		max-width: 100%;
		min-width: 0;
		box-sizing: border-box;
	}

	.tsk-contactsRow {
		grid-column: auto;
		flex: 1;
		min-width: 0;
		justify-content: space-between;
		width: 100%;
	}

	.tsk-authWrap {
		display: none !important;
	}
}
