/*
 * Language switcher, injected into the footer of every page by
 * Website/i18n/build.ps1. Colours follow the footer palette in site-footer.css
 * (#FA7316 accent on a dark ground) rather than the Elementor globals, so the
 * widget renders the same on pages that load a different Elementor kit.
 */

.cc-lang {
	display: flex;
	justify-content: center;
	width: 100%;
	margin: 8px 0 4px;
	font-family: "Inter", sans-serif;
}

.cc-lang__wrap {
	position: relative;
}

.cc-lang__button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 999px;
	background: rgba(255, 255, 255, .06);
	color: #FFFFFF;
	font: inherit;
	font-size: 14px;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color .2s ease, background .2s ease;
}

.cc-lang__button:hover,
.cc-lang__button[aria-expanded="true"] {
	border-color: #FA7316;
	background: rgba(250, 115, 22, .12);
}

.cc-lang__button:focus-visible {
	outline: 2px solid #FA7316;
	outline-offset: 2px;
}

.cc-lang__list {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 8px);
	transform: translateX(-50%);
	z-index: 100;
	/* Two columns keep 23 locales on screen without an inner scrollbar on
	   desktop; the mobile rule below drops it back to one. */
	display: grid;
	grid-template-columns: repeat(2, minmax(150px, 1fr));
	gap: 2px 4px;
	max-height: 60vh;
	overflow-y: auto;
	margin: 0;
	padding: 8px;
	list-style: none;
	border: 1px solid rgba(255, 255, 255, .18);
	border-radius: 12px;
	background: #1E1E21;
	box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

.cc-lang__list[hidden] {
	display: none;
}

.cc-lang__list li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cc-lang__list a {
	display: block;
	padding: 7px 12px;
	border-radius: 8px;
	color: rgba(255, 255, 255, .8);
	font-size: 14px;
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
}

.cc-lang__list a:hover,
.cc-lang__list a:focus-visible {
	background: rgba(250, 115, 22, .16);
	color: #FFFFFF;
}

.cc-lang__list a.is-current {
	color: #FA7316;
	font-weight: 600;
}

@media (max-width: 640px) {
	.cc-lang__list {
		grid-template-columns: 1fr;
		max-height: 55vh;
	}
}

/* Without JavaScript there is no switcher, so nothing should reserve space. */
.cc-lang:empty {
	display: none;
}
