/**
 * Language switcher dropdown — Figma header control.
 */

.pbl-lang-switch {
	position: relative;
	display: inline-flex;
	flex-direction: column;
	align-items: stretch;
	font-family: inherit;
}

.pbl-lang-switch__trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem; /* 8px */
	box-sizing: border-box;
	min-height: 2.625rem; /* 42px */
	padding: 0.75rem 1rem; /* 12px 16px */
	border: 1px solid #fff;
	border-radius: 4px;
	background: transparent;
	color: #fff;
	font-family: inherit;
	font-size: 0.875rem; /* 14px */
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.pbl-lang-switch__trigger:hover,
.pbl-lang-switch__trigger:focus-visible {
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	outline: none;
}

.pbl-lang-switch__trigger:focus-visible {
	box-shadow: 0 0 0 3px rgba(10, 87, 205, 0.35);
}

.pbl-lang-switch.is-open .pbl-lang-switch__trigger {
	background: rgba(255, 255, 255, 0.1);
}

.pbl-lang-switch.is-open .pbl-lang-switch__chevron {
	transform: rotate(180deg);
}

.pbl-lang-switch__text {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem; /* 10px */
	min-width: 0;
}

.pbl-lang-switch__flag {
	display: block;
	flex-shrink: 0;
	width: 1rem;
	height: 0.75rem;
	object-fit: cover;
	border-radius: 1px;
}

.pbl-lang-switch__label {
	display: inline-block;
}

.pbl-lang-switch__chevron {
	display: inline-flex;
	flex-shrink: 0;
	width: 0.75rem;
	height: 0.375rem;
	color: currentColor;
	transition: transform 0.15s ease;
}

.pbl-lang-switch__chevron svg {
	display: block;
	width: 100%;
	height: 100%;
}

.pbl-lang-switch__menu {
	position: absolute;
	top: calc(100% + 0.375rem);
	right: 0;
	z-index: 100;
	min-width: 100%;
	margin: 0;
	padding: 0.375rem;
	list-style: none;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 6px;
	background: #002042;
	box-shadow: 0 12px 28px rgba(0, 20, 50, 0.35);
}

.pbl-lang-switch__menu[hidden] {
	display: none;
}

.pbl-lang-switch__option {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	width: 100%;
	box-sizing: border-box;
	padding: 0.625rem 0.75rem;
	border-radius: 4px;
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.pbl-lang-switch__option:hover,
.pbl-lang-switch__option:focus-visible {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	outline: none;
}

.pbl-lang-switch__option.is-current {
	background: rgba(10, 87, 205, 0.35);
	pointer-events: none;
}

.pbl-lang-switch--inactive .pbl-lang-switch__trigger {
	cursor: default;
	opacity: 0.7;
	pointer-events: none;
}

/* Dark-on-light variant */
.pbl-lang-switch--dark .pbl-lang-switch__trigger {
	border-color: #002042;
	color: #002042;
}

.pbl-lang-switch--dark .pbl-lang-switch__trigger:hover,
.pbl-lang-switch--dark .pbl-lang-switch__trigger:focus-visible {
	background: rgba(0, 32, 66, 0.06);
	color: #002042;
}

.pbl-lang-switch--dark .pbl-lang-switch__menu {
	border-color: rgba(0, 32, 66, 0.12);
	background: #fff;
	box-shadow: 0 12px 28px rgba(0, 32, 66, 0.16);
}

.pbl-lang-switch--dark .pbl-lang-switch__option {
	color: #002042;
}

.pbl-lang-switch--dark .pbl-lang-switch__option:hover,
.pbl-lang-switch--dark .pbl-lang-switch__option:focus-visible {
	background: rgba(10, 87, 205, 0.08);
	color: #002042;
}

.pbl-lang-switch--dark .pbl-lang-switch__option.is-current {
	background: rgba(10, 87, 205, 0.12);
}
