/*
 * Language switcher for the landing (see landing-i18n.js).
 *
 * Everything here is either an overlay or applies to the switcher pill itself,
 * so the Figma-exported layout keeps its original geometry.
 */

html.dgl-i18n-pending body {
	visibility: hidden;
}

/* Flags for the pills that pull their icon from CSS `content`. */
html.dgl-lang-ky .language-flag-container {
	content: url("/assets/landingcode/main/indexicons/Language flag KG.svg");
}

html.dgl-lang-en .language-flag-container {
	content: url("/assets/landingcode/main/indexicons/Language flag EN.svg");
}

/* The shared country picker prints the Russian name under the English one.
   Redundant for an English reader; the cards stay uniform without it. */
html.dgl-lang-en .country-picker-option__russian,
html.dgl-lang-en .country-picker-trigger__secondary {
	display: none;
}

.dgl-lang-switch {
	cursor: pointer;
	user-select: none;
	-webkit-user-select: none;
}

.dgl-lang-switch:focus-visible {
	outline: 2px solid #3eb4c4;
	outline-offset: 2px;
}

.dgl-lang-menu {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	z-index: 12000;
	min-width: 104px;
	padding: 6px;
	box-sizing: border-box;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 12px 28px rgba(23, 50, 77, 0.18);
	display: flex;
	flex-direction: column;
	gap: 2px;
	text-align: left;
	font-family: Inter, sans-serif;
	cursor: default;
}

.dgl-lang-menu[hidden] {
	display: none;
}

.dgl-lang-menu__item {
	all: unset;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 8px 10px;
	border-radius: 10px;
	color: #17324d;
	font: 500 13px/1 Inter, sans-serif;
	cursor: pointer;
	transition: background-color 160ms ease;
}

.dgl-lang-menu__item:hover,
.dgl-lang-menu__item:focus-visible {
	background: rgba(62, 180, 196, 0.16);
}

.dgl-lang-menu__item.is-active {
	background: rgba(62, 180, 196, 0.28);
}

.dgl-lang-menu__flag {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	border-radius: 50%;
}

.dgl-lang-menu__code {
	white-space: nowrap;
}
