/**
 * Minimal inline language codes (ET | RU). Override colors on .tb-lang-switch or in Customizer:
 * --tb-lang-active, --tb-lang-inactive, --tb-lang-hover, --tb-lang-sep
 */
.tb-lang-switch {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.35em;
	font-family: var(--tb-lang-font, inherit);
	font-size: var(--tb-lang-size, inherit);
	font-weight: 600;
	line-height: 1.25;
	text-transform: uppercase;
	letter-spacing: 0.04em;

	/* Default: dark header palette (screenshot 1) */
	--tb-lang-active: #ffffff;
	--tb-lang-inactive: rgba(255, 255, 255, 0.78);
	--tb-lang-hover: #ffffff;
	--tb-lang-sep: rgba(255, 255, 255, 0.42);
}

.tb-lang-switch *,
.tb-lang-switch *::before,
.tb-lang-switch *::after {
	box-sizing: inherit;
}

.tb-lang-switch__sep {
	flex: 0 0 auto;
	user-select: none;
	color: var(--tb-lang-sep);
	font-weight: 500;
	opacity: 1;
	margin: 0 0.1em;
}

.tb-lang-switch__item {
	flex: 0 0 auto;
	margin: 0;
	padding: 0;
	min-width: 0;
	border: none;
	background: transparent;
	font: inherit;
	text-decoration: none;
	cursor: pointer;
	color: var(--tb-lang-inactive);
	transition: color 0.15s ease, opacity 0.15s ease;
}

.tb-lang-switch a.tb-lang-switch__item:hover,
.tb-lang-switch a.tb-lang-switch__item:focus {
	color: var(--tb-lang-hover);
	outline: none;
}

.tb-lang-switch__item--current,
span.tb-lang-switch__item.tb-lang-switch__item--current {
	color: var(--tb-lang-active);
	cursor: default;
	pointer-events: none;
	text-decoration: none;
	font-weight: 700;
}

.tb-lang-switch a.tb-lang-switch__item:focus-visible {
	box-shadow: 0 0 0 2px var(--tb-lang-active);
	border-radius: 2px;
}

/* Appended after last item via wp_nav_menu_items (Primary Menu, Divi). */
li.tb-menu-item--lang-switch {
	display: inline-flex;
	align-items: center;
	list-style: none;
	margin-left: 0.35em;
	padding-left: 0.35em;
	border-left: 1px solid var(--tb-lang-sep);
}

li.tb-menu-item--lang-switch .tb-lang-switch {
	margin: 0;
}
