/* MLang language switcher — intentionally light so it inherits the theme. */
.mlang-switcher {
	position: relative;
	display: inline-block;
	font-size: inherit;
	line-height: 1.4;
}
.mlang-switcher__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25em 0.75em;
	margin: 0;
	padding: 0;
	list-style: none;
}
.mlang-switcher__item {
	margin: 0;
	padding: 0;
}
.mlang-switcher a,
.mlang-switcher__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	min-height: 24px;
	min-width: 24px;
	padding: 0.2em 0.35em;
	color: inherit;
	text-decoration: none;
	border-radius: 4px;
}
.mlang-switcher a:hover .mlang-switcher__name,
.mlang-switcher a:focus .mlang-switcher__name {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}
.mlang-switcher a[aria-current="true"] {
	font-weight: 700;
}
.mlang-switcher a:focus-visible,
.mlang-switcher__toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}
.mlang-switcher .mlang-flag {
	display: inline-block;
	width: 20px;
	height: 15px;
	object-fit: cover;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
	flex: none;
}
.mlang-switcher .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Dropdown (disclosure) */
.mlang-switcher__toggle {
	font: inherit;
	background: transparent;
	border: 1px solid currentColor;
	cursor: pointer;
	padding: 0.35em 0.6em;
}
.mlang-switcher__caret {
	transition: transform 0.15s ease;
}
.mlang-switcher__toggle[aria-expanded="true"] .mlang-switcher__caret {
	transform: rotate(180deg);
}
.mlang-switcher--dropdown .mlang-switcher__list {
	position: absolute;
	z-index: 1000;
	top: calc(100% + 4px);
	inset-inline-start: 0;
	flex-direction: column;
	gap: 0;
	min-width: 100%;
	width: max-content;
	max-height: 70vh;
	overflow-y: auto;
	padding: 0.35em;
	background: var(--mlang-switcher-bg, #fff);
	color: var(--mlang-switcher-color, #1e1e1e);
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 6px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}
.mlang-switcher--dropdown .mlang-switcher__list[hidden] {
	display: none;
}
.mlang-switcher--dropdown .mlang-switcher__list a {
	display: flex;
	width: 100%;
	padding: 0.45em 0.7em;
	box-sizing: border-box;
}
.mlang-switcher--dropdown .mlang-switcher__list a:hover,
.mlang-switcher--dropdown .mlang-switcher__list a:focus {
	background: rgba(0, 0, 0, 0.06);
}

/* Floating */
.mlang-switcher--floating {
	position: fixed;
	z-index: 99999;
	bottom: 16px;
	font-size: 15px;
}
.mlang-switcher--floating.mlang-switcher--bottom-right {
	right: 16px;
}
.mlang-switcher--floating.mlang-switcher--bottom-left {
	left: 16px;
}
.mlang-switcher--floating .mlang-switcher__toggle {
	background: var(--mlang-switcher-bg, #fff);
	color: var(--mlang-switcher-color, #1e1e1e);
	border-color: rgba(0, 0, 0, 0.2);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	border-radius: 999px;
	padding: 0.5em 0.9em;
}
.mlang-switcher--floating .mlang-switcher__list {
	top: auto;
	bottom: calc(100% + 6px);
}
.mlang-switcher--floating.mlang-switcher--bottom-right .mlang-switcher__list {
	inset-inline-start: auto;
	right: 0;
}

@media (prefers-reduced-motion: reduce) {
	.mlang-switcher__caret {
		transition: none;
	}
}
@media (forced-colors: active) {
	.mlang-switcher__toggle,
	.mlang-switcher--dropdown .mlang-switcher__list {
		border: 1px solid CanvasText;
	}
}
