.pn-lang-switcher {
	/* Reuses the theme's brand CSS custom properties (see colors.css) when
	   present, falling back to the same values otherwise. */
	--pn-accent: var(--color-brand-orange, 240 140 0);
	--pn-accent-light: var(--color-brand-light-orange, 250 180 100);
	--pn-text: var(--color-brand-text, 133 123 86);
	--pn-dark: var(--color-brand-black, 38 38 38);

	display: inline-block;
	line-height: 0;
}

.pn-lang-switcher__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.4rem 0.6rem;
	border: 1.5px solid rgb(var(--pn-accent));
	border-radius: 9999px;
	background: transparent;
	color: rgb(var(--pn-accent));
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
	font-family: inherit;
	font-size: 0.875rem;
	line-height: 1;
}

.pn-lang-switcher__toggle:hover,
.pn-lang-switcher__toggle:focus-visible {
	background-color: rgb(var(--pn-accent));
	color: #fff;
}

.pn-lang-switcher__icon {
	width: 1.25rem;
	height: 1.25rem;
	flex-shrink: 0;
}

.pn-lang-switcher__current {
	font-weight: 600;
	letter-spacing: 0.02em;
}

.pn-lang-switcher__overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background-color: rgb(var(--pn-dark) / 75%);
	animation: pnLangFadeIn 0.2s ease;
}

.pn-lang-switcher__overlay[hidden] {
	display: none;
}

.pn-lang-switcher__dialog {
	box-sizing: border-box;
	width: 360px;
	max-width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
	background: #fff;
	color: rgb(var(--pn-text));
	border: 4px solid rgb(var(--pn-accent));
	border-radius: 1rem;
	box-shadow: 0 10px 25px rgb(0 0 0 / 15%);
	padding: 1.75rem 1.5rem 1.5rem;
	font-family: inherit;
	animation: pnLangSlideIn 0.2s cubic-bezier(0, 0, 0.2, 1);
}

.pn-lang-switcher__close {
	position: absolute;
	top: 0.25rem;
	right: 0.25rem;
	width: 2.75rem;
	height: 2.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 9999px;
	background: transparent;
	color: rgb(var(--pn-dark));
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	transition: color 0.2s ease;
}

.pn-lang-switcher__close:hover,
.pn-lang-switcher__close:focus-visible {
	color: rgb(var(--pn-accent));
}

.pn-lang-switcher__title {
	margin: 0 0 1rem;
	font-weight: 600;
	text-align: center;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.pn-lang-switcher__list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pn-lang-switcher__item {
	display: block;
	padding: 0.6rem 1rem;
	border-radius: 9999px;
	border: 1.5px solid rgb(var(--pn-accent));
	color: rgb(var(--pn-accent));
	text-align: center;
	text-decoration: none;
	font-weight: 500;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.pn-lang-switcher__item:hover,
.pn-lang-switcher__item:focus-visible {
	background-color: rgb(var(--pn-accent));
	color: #fff;
}

.pn-lang-switcher__item.is-current {
	background-color: rgb(var(--pn-accent-light));
	color: rgb(var(--pn-dark));
	border-color: rgb(var(--pn-accent-light));
	cursor: default;
}

@keyframes pnLangFadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes pnLangSlideIn {
	from {
		transform: translateY(10%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}
