/**
 * Стилі фронтендного перемикача мов Leng.
 */

.lang-switcher {
	background: #f8f8f8;
	border: 1px solid #eee;
	border-radius: 6px;
	box-shadow: 2px 2px 5px 0 rgba(0, 0, 0, 0.25);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 1;
	max-width: 100%;
	padding: 0;
	text-align: right;
	width: max-content;
}

.lang-switcher--floating {
	position: fixed;
	right: 10px;
	bottom: 10px;
	z-index: 1000;
}

.lang-switcher__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.lang-switcher__item {
	margin: 0;
	padding: 0;
	list-style: none;
}

.lang-switcher__link {
	display: flex;
	align-items: center;
	gap: 7px;
	min-height: 44px;
	padding: 5px 10px;
	line-height: 1;
	color: #1d2327;
	text-decoration: none;
	background-color: transparent !important;
	border-bottom: 1px solid transparent;
	box-sizing: border-box;
}

.lang-switcher__item:last-child .lang-switcher__link {
	border-bottom: none;
}

.lang-switcher__link:hover,
.lang-switcher__link:focus-visible {
	background: #fff !important;
	color: #135e96;
	outline: 2px solid #2271b1;
	outline-offset: -2px;
}

.lang-switcher__item--current .lang-switcher__link {
	cursor: default;
}

.lang-switcher__item--current .lang-switcher__name {
	font-weight: 700;
}

.lang-switcher__flag {
	display: inline-block;
	width: 18px;
	height: 12px;
	flex: 0 0 18px;
	vertical-align: middle;
}

.lang-switcher__flag--mobile {
	display: none;
}

.lang-switcher__name {
	vertical-align: middle;
	white-space: nowrap;
}

.lang-switcher__name--mobile {
	display: none;
}

.lang-switcher--flag_only .lang-switcher__link {
	justify-content: center;
	min-width: 44px;
	padding-right: 10px;
	padding-left: 10px;
}

.lang-switcher--text_only .lang-switcher__link {
	padding-right: 12px;
	padding-left: 12px;
}

.lang-switcher--menu {
	position: static;
	display: inline-block;
	box-shadow: none;
	text-align: left;
	vertical-align: middle;
}

.lang-switcher--menu .lang-switcher__list {
	display: flex;
	flex-wrap: wrap;
}

.lang-switcher--menu .lang-switcher__link {
	border-bottom: none;
}

.leng-menu-item {
	display: flex;
	align-items: center;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 600px) {
	.lang-switcher--floating {
		right: 8px;
		bottom: 8px;
		max-width: calc(100vw - 16px);
	}

	.lang-switcher--mobile-horizontal .lang-switcher__list,
	.lang-switcher--mobile-compact .lang-switcher__list {
		display: flex;
		flex-direction: row;
	}

	.lang-switcher--mobile-vertical .lang-switcher__list {
		display: flex;
		flex-direction: column;
	}

	.lang-switcher__link {
		min-height: 44px;
		padding: 8px 10px;
	}

	.lang-switcher__name {
		font-size: 13px;
	}

	.lang-switcher__name--desktop {
		display: none;
	}

	.lang-switcher__name--mobile {
		display: inline;
	}

	.lang-switcher__flag--mobile {
		display: inline-block;
	}

	.lang-switcher--mobile-label-flag .lang-switcher__name--mobile {
		display: none;
	}

	.lang-switcher--mobile-compact {
		font-size: 13px;
	}

	.lang-switcher--mobile-compact .lang-switcher__link {
		gap: 5px;
		min-width: 44px;
		padding-right: 8px;
		padding-left: 8px;
	}

	.lang-switcher--mobile-horizontal .lang-switcher__link,
	.lang-switcher--mobile-compact .lang-switcher__link {
		border-bottom: none;
	}

	.lang-switcher--mobile-horizontal .lang-switcher__item:not(:last-child) .lang-switcher__link,
	.lang-switcher--mobile-compact .lang-switcher__item:not(:last-child) .lang-switcher__link {
		border-right: 1px solid #eee;
	}

	.lang-switcher--mobile-vertical .lang-switcher__item:not(:last-child) .lang-switcher__link {
		border-bottom: 1px solid #eee;
	}
}

@media (max-width: 360px) {
	.lang-switcher--floating .lang-switcher__name {
		max-width: 120px;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}
