/* Unsolve Multilingual — language switcher */

.ml-switcher ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em;
	align-items: center;
}

.ml-switcher li {
	display: inline-flex;
	align-items: center;
}

.ml-switcher a {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	text-decoration: none;
	color: inherit;
	/* Comfortable tap target on touch devices without visually
	   inflating desktop menus. */
	padding: 0.25em 0;
	min-height: 24px;
}

.ml-switcher .ml-code {
	letter-spacing: 0.03em;
}

.ml-switcher .ml-current > a {
	font-weight: 700;
}

/* Dropdown variant: current language visible, rest on hover/focus.
   focus-within also opens it on touch (tap focuses the link) and for
   keyboard users. */
.ml-switcher.ml-style-dropdown {
	position: relative;
	display: inline-block;
}

.ml-switcher.ml-style-dropdown ul {
	display: block;
}

.ml-switcher.ml-style-dropdown li {
	display: none;
	padding: 0.35em 0.85em;
}

.ml-switcher.ml-style-dropdown li.ml-current {
	display: flex;
	cursor: pointer;
}

/* Caret on the visible (current) language; rotates when open. */
.ml-switcher.ml-style-dropdown li.ml-current > a::after {
	content: "▾";
	font-size: 0.75em;
	margin-left: 0.35em;
	transition: transform 0.2s ease;
}

.ml-switcher.ml-style-dropdown.ml-no-caret li.ml-current > a::after {
	content: none;
}

.ml-switcher.ml-style-dropdown:hover li.ml-current > a::after,
.ml-switcher.ml-style-dropdown:focus-within li.ml-current > a::after {
	transform: rotate(180deg);
}

.ml-switcher.ml-style-dropdown:hover li,
.ml-switcher.ml-style-dropdown:focus-within li {
	display: flex;
}

.ml-switcher.ml-style-dropdown:hover ul,
.ml-switcher.ml-style-dropdown:focus-within ul {
	position: absolute;
	top: 0;
	left: 0;
	min-width: max-content;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
	z-index: 999;
}

/* Keep the open dropdown inside the viewport when the switcher sits
   near the right edge (common in headers): add the ml-align-right
   class next to ml-switcher. */
.ml-switcher.ml-style-dropdown.ml-align-right:hover ul,
.ml-switcher.ml-style-dropdown.ml-align-right:focus-within ul {
	left: auto;
	right: 0;
}

@media (max-width: 480px) {
	.ml-switcher ul {
		gap: 0.5em 1em;
	}

	.ml-switcher a {
		min-height: 44px; /* iOS/Android recommended tap size */
	}

	.ml-switcher.ml-style-dropdown li {
		padding: 0.6em 1em;
	}
}
