/*
 * Language switcher with codes only (inc/idiomes.php). It takes the font and
 * the colour of the header around it; the child can change the colours with
 * --od-idiomes-fons and --od-idiomes-text.
 */
.od-idiomes {
	position: relative;
	flex: none;
	font-size: inherit;
	line-height: 1;
}

.od-idiomes__actual {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
	padding: 0.5em 0.25em;
	cursor: pointer;
	list-style: none;
	font-weight: 600;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.od-idiomes__actual::-webkit-details-marker {
	display: none;
}

/* Small chevron, turned up while the list is open. */
.od-idiomes__actual::after {
	content: "";
	width: 0.4em;
	height: 0.4em;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-0.15em) rotate(45deg);
	transition: transform 0.15s;
}

.od-idiomes__desplegable[open] .od-idiomes__actual::after {
	transform: translateY(0.1em) rotate(-135deg);
}

.od-idiomes__llista {
	position: absolute;
	top: 100%;
	right: 0;
	z-index: 100;
	min-width: 100%;
	margin: 0.25em 0 0;
	padding: 0.25em 0;
	list-style: none;
	background: var(--od-idiomes-fons, var(--wp--preset--color--base, #fff));
	color: var(--od-idiomes-text, var(--wp--preset--color--contrast, #111));
	border-radius: 4px;
	box-shadow: 0 4px 16px rgb(0 0 0 / 0.15);
}

.od-idiomes__enllac {
	display: block;
	padding: 0.6em 0.9em;
	color: inherit;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-decoration: none;
	text-align: center;
	white-space: nowrap;
}

.od-idiomes__enllac:hover,
.od-idiomes__enllac:focus-visible {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.od-idiomes .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.od-idiomes__actual::after {
		transition: none;
	}
}
