/* NOVA LANGUEGE SWITCHER. */

.nova-lang {
	position: relative;
	flex-shrink: 0;
}

.nova-lang-list {
	position: absolute;
	top: calc(100% + .625rem);
	right: 50%;
	translate: 50% 0;
	z-index: 7;
	min-width: max-content;
	margin: 0;
	padding: max(.375rem, calc(.375 * var(--su)));
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: max(.375rem, calc(.375 * var(--su)));
	border-radius: var(--nova-header-radius);
	background-color: var(--white-100);
	box-shadow: 0 12px 32px rgba(47, 51, 76, .14);
	opacity: 1;
	transform: translateY(0);
	transition: opacity .6s cubic-bezier(.2, 1, .22, 1),
	            transform .6s cubic-bezier(.2, 1, .22, 1),
	            display .6s allow-discrete;
}

/* display moet meelopen, anders valt er niets te animeren aan het
   hidden-attribuut. */
.nova-lang-list[hidden] {
	display: none;
	opacity: 0;
	transform: translateY(-20px);
}

@starting-style {
	.nova-lang-list:not([hidden]) {
		opacity: 0;
		transform: translateY(-20px);
	}
}

.nova-lang-list::before {
	content: '';
	position: absolute;
	bottom: 100%;
	left: 50%;
	translate: -50% 0;
	border: .5rem solid transparent;
	border-bottom-color: var(--white-100);
}

/* Terugknop hoort bij het schuivende paneel van de mobiele header. */
.nova-lang-back {
	display: none;
}

.nova-lang-item > a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: max(.5rem, calc(.5 * var(--su)));
	padding: max(.25rem, calc(.25 * var(--su))) max(.25rem, calc(.25 * var(--su))) max(.25rem, calc(.25 * var(--su))) max(.75rem, calc(.75 * var(--su)));
	border-radius: var(--nova-header-pill);
	color: var(--primary-100);
	font-family: var(--pk-text-font-family);
	font-size: var(--header-nav-fontsize);
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .15s ease;
	outline: 1px solid var(--primary-5);
	outline-offset: -1px;
}

.nova-lang-item > a:hover,
.nova-lang-item.is-current > a {
	outline-color: var(--support-3);
	background-color: var(--support-3);
}

/* Vlag-URL komt per taal binnen als inline --nova-lang-flag. */
.nova-lang-item > a::after {
	content: '';
	flex-shrink: 0;
	width: max(1.25rem, calc(1.25 * var(--su)));
	height: auto;
	aspect-ratio: 1;
	background-image: var(--nova-lang-flag);
	background-repeat: no-repeat;
	background-position: center right;
	background-size: contain;
	border-radius: 50%;
}

.nova-lang-item > a:not([style*="--nova-lang-flag"])::after {
	display: none;
}

/* In de knop staat de code (NL); de volledige naam is voor het mobiele menu. */
.nova-lang-toggle .nova-lang-name {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.nova-lang-list {
		transition: none;
		transform: none;
	}
}
