/**
 * Built-in aisa/language-switcher. Width-neutral so it sits in a header
 * flex row beside the nav. Colors and type come from block supports
 * (has-{slug}-color, has-{size}-font-size).
 */
.aisa-ls {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	align-self: center;
	width: auto;
	max-width: none;
	margin: 0;
	padding: 0;
	list-style: none;
	line-height: 1;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	position: relative;
}

.aisa-ls--inline {
	flex-wrap: nowrap;
	gap: 0;
}

.aisa-ls__link,
.aisa-ls__current,
.aisa-ls__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	color: inherit;
	text-decoration: none;
	line-height: 1;
	background: none;
	border: 0;
	padding: 0;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	cursor: pointer;
}

.aisa-ls__link:hover,
.aisa-ls__link:focus-visible,
.aisa-ls__toggle:hover,
.aisa-ls__toggle:focus-visible {
	text-decoration: underline;
}

.aisa-ls__current {
	opacity: 0.55;
	cursor: default;
}

.aisa-ls__sep {
	display: inline-block;
	margin: 0 0.55em;
	opacity: 0.45;
	font-weight: 400;
}

.aisa-ls__flag {
	display: inline-block;
	width: 18px;
	height: 12px;
	object-fit: cover;
}

.aisa-ls__chevron {
	display: inline-block;
	width: 0.45em;
	height: 0.45em;
	margin-left: 0.35em;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-0.1em);
}

.aisa-ls--dropdown.is-open .aisa-ls__chevron {
	transform: rotate(225deg) translateY(-0.05em);
}

.aisa-ls__menu {
	position: absolute;
	top: calc(100% + 0.5em);
	right: 0;
	z-index: 20;
	margin: 0;
	padding: 0.4em 0;
	list-style: none;
	min-width: 100%;
	background: var(--wp--preset--color--contrast, #111);
	color: var(--wp--preset--color--base, #fff);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.aisa-ls__menu[hidden] {
	display: none;
}

.aisa-ls__menu li {
	margin: 0;
}

.aisa-ls__menu .aisa-ls__link,
.aisa-ls__menu .aisa-ls__current {
	display: flex;
	width: 100%;
	padding: 0.45em 0.85em;
	box-sizing: border-box;
	text-decoration: none;
}

.aisa-ls__menu .aisa-ls__link:hover,
.aisa-ls__menu .aisa-ls__link:focus-visible {
	text-decoration: none;
	background: rgba(255, 255, 255, 0.08);
}

.aisa-ls--empty {
	font-size: 0.8em;
	opacity: 0.7;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
}
