.msa-lang-switcher {
	position: relative;
	display: inline-flex;
	align-items: center;
	margin-inline-end: 0.5rem;
	flex-shrink: 0;
}

.msa-lang-switcher__trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	max-width: 11.5rem;
	padding: 0.3rem 0.55rem;
	border: 1px solid rgba(11, 79, 135, 0.15);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.85);
	color: var(--msa-primary-blue, #0b4f87);
	font-size: 0.75rem;
	font-weight: 600;
	cursor: pointer;
	line-height: 1.2;
}

.msa-lang-switcher__current {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.6rem;
	padding: 0.08rem 0.3rem;
	border-radius: 999px;
	background: rgba(11, 79, 135, 0.08);
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	flex-shrink: 0;
}

.msa-lang-switcher__label {
	max-width: 7.5rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.msa-lang-switcher__chevron {
	flex-shrink: 0;
	opacity: 0.7;
}

.msa-lang-switcher__menu {
	position: absolute;
	top: calc(100% + 0.35rem);
	right: 0;
	z-index: 120;
	min-width: 15.5rem;
	max-width: min(18rem, calc(100vw - 2rem));
	max-height: min(70vh, 20rem);
	overflow-y: auto;
	overflow-x: hidden;
	margin: 0;
	padding: 0.35rem;
	list-style: none;
	border: 1px solid rgba(11, 79, 135, 0.12);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 12px 40px -16px rgba(8, 61, 107, 0.25);
	-webkit-overflow-scrolling: touch;
}

.msa-lang-switcher__menu[hidden] {
	display: none;
}

.msa-lang-switcher__option {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.1rem;
	padding: 0.5rem 0.7rem;
	border-radius: 8px;
	color: var(--charcoal, #2c3e50);
	text-decoration: none;
	font-size: 0.875rem;
	line-height: 1.3;
}

.msa-lang-switcher__option-primary {
	font-weight: 600;
}

.msa-lang-switcher__option-native {
	font-size: 0.75rem;
	font-weight: 500;
	opacity: 0.72;
}

.msa-lang-switcher__option:hover,
.msa-lang-switcher__option.is-active {
	background: rgba(12, 154, 70, 0.08);
	color: var(--msa-primary-blue, #0b4f87);
}

.msa-header__actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
}

@media (max-width: 1200px) {
	.msa-lang-switcher__label {
		max-width: 5.5rem;
	}
}

@media (max-width: 1100px) {
	.msa-lang-switcher__label {
		display: none;
	}

	.msa-lang-switcher__trigger {
		max-width: none;
		padding: 0.3rem 0.45rem;
	}
}

@media (max-width: 920px) {
	.msa-lang-switcher__label {
		display: none;
	}

	.msa-lang-switcher__menu {
		right: 0;
		left: auto;
	}
}

/* Optional first-visit language prompt (English default; opt-in only). */
.msa-lang-prompt {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 1rem;
}

.msa-lang-prompt[hidden] {
	display: none !important;
}

.msa-lang-prompt__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 61, 107, 0.35);
}

.msa-lang-prompt__dialog {
	position: relative;
	z-index: 1;
	width: min(26rem, 100%);
	margin-bottom: 1rem;
	padding: 1.25rem 1.35rem 1.35rem;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 20px 60px -20px rgba(8, 61, 107, 0.35);
	color: var(--charcoal, #2c3e50);
}

.msa-lang-prompt__title {
	margin: 0 0 0.4rem;
	font-size: 1.15rem;
	font-weight: 700;
	color: var(--msa-primary-blue, #0b4f87);
	line-height: 1.3;
}

.msa-lang-prompt__text {
	margin: 0 0 1rem;
	font-size: 0.9rem;
	line-height: 1.45;
	opacity: 0.9;
}

.msa-lang-prompt__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.msa-lang-prompt__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.55rem 0.95rem;
	border-radius: 999px;
	border: 1px solid transparent;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	line-height: 1.2;
}

.msa-lang-prompt__btn--primary {
	background: var(--msa-primary-blue, #0b4f87);
	color: #fff;
}

.msa-lang-prompt__btn--ghost {
	background: transparent;
	border-color: rgba(11, 79, 135, 0.2);
	color: var(--msa-primary-blue, #0b4f87);
}

.msa-lang-prompt__options {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.4rem;
	margin-top: 0.9rem;
	max-height: min(40vh, 14rem);
	overflow-y: auto;
}

.msa-lang-prompt__options[hidden] {
	display: none !important;
}

.msa-lang-prompt__option {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.1rem;
	padding: 0.55rem 0.7rem;
	border: 1px solid rgba(11, 79, 135, 0.12);
	border-radius: 10px;
	background: #fff;
	color: var(--charcoal, #2c3e50);
	cursor: pointer;
	text-align: start;
}

.msa-lang-prompt__option:hover {
	background: rgba(12, 154, 70, 0.08);
	border-color: rgba(12, 154, 70, 0.25);
}

.msa-lang-prompt__option--suggested {
	border-color: rgba(12, 154, 70, 0.45);
	box-shadow: 0 0 0 1px rgba(12, 154, 70, 0.15);
}

.msa-lang-prompt__option-primary {
	font-size: 0.85rem;
	font-weight: 600;
}

.msa-lang-prompt__option-native {
	font-size: 0.75rem;
	opacity: 0.72;
}

@media (min-width: 640px) {
	.msa-lang-prompt {
		align-items: center;
	}

	.msa-lang-prompt__dialog {
		margin-bottom: 0;
	}
}

html.msa-lang-prompt-open {
	overflow: hidden;
}
