/* Header language switcher */

.bsmarty-header-language {
	position: relative;
	display: inline-flex;
	flex-shrink: 0;
}

.bsmarty-header-language__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.2rem;
	width: auto;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.45rem;
	border: 0;
	border-radius: 1.25rem;
	background: transparent;
	color: #525252;
	cursor: pointer;
	transition: color 0.3s ease, background-color 0.3s ease;
}

.bsmarty-header-language__toggle:hover,
.bsmarty-header-language__toggle[aria-expanded="true"] {
	color: #171717;
	background: #fafafa;
}

.bsmarty-header-language__toggle svg {
	width: 1.1rem;
	height: 1.1rem;
	flex-shrink: 0;
}

.bsmarty-header-language__code {
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1;
}

.bsmarty-header-language__menu {
	position: absolute;
	top: calc(100% + 0.5rem);
	right: 0;
	z-index: 50;
	min-width: 10.5rem;
	max-height: 16rem;
	margin: 0;
	padding: 0.375rem;
	list-style: none;
	overflow-y: auto;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 1rem;
	background: #fff;
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.bsmarty-header-language__menu[hidden] {
	display: none;
}

.bsmarty-header-language__item + .bsmarty-header-language__item {
	margin-top: 0.125rem;
}

.bsmarty-header-language__option {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	width: 100%;
	padding: 0.5rem 0.625rem;
	border-radius: 0.75rem;
	color: #404040;
	font-size: 0.875rem;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

a.bsmarty-header-language__option:hover {
	background: #f5f5f5;
	color: #171717;
}

.bsmarty-header-language__option.is-active {
	background: #eef2ff;
	color: #312e81;
	font-weight: 600;
}

.bsmarty-header-language__option.is-disabled {
	opacity: 0.55;
}

.bsmarty-header-language__option-code {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.75rem;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
}

.bsmarty-header-language__option-label {
	flex: 1;
}

@media (max-width: 639px) {
	.bsmarty-header-language__toggle {
		gap: 0;
		padding: 0 0.35rem;
	}

	.bsmarty-header-language__toggle svg {
		position: relative;
		z-index: 1;
	}

	/* Pull initials under the globe by ~10% of icon width. */
	.bsmarty-header-language__code {
		margin-left: -0.1rem;
		position: relative;
		z-index: 0;
	}
}
