/* UK / US English Switcher
 * The toggle takes its font and colour from wherever it sits, so it matches
 * light and dark headers without extra setup. Override with the variables:
 *   --ukus-color, --ukus-font-size, --ukus-topbar-bg, --ukus-topbar-color
 */

.ukus-switcher {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 3px;
	border-radius: 999px;
	color: var(--ukus-color, inherit);
	font: inherit;
	font-size: var(--ukus-font-size, 0.8125em);
	line-height: 1;
	white-space: nowrap;
	vertical-align: middle;
}

/* Outline drawn in the text colour at low strength. */
.ukus-switcher::before {
	content: "";
	position: absolute;
	inset: 0;
	border: 1px solid currentColor;
	border-radius: inherit;
	opacity: 0.3;
	pointer-events: none;
}

/* Reset theme / Elementor kit button styles. */
.ukus-switcher .ukus-btn,
.ukus-switcher .ukus-btn:hover,
.ukus-switcher .ukus-btn:focus,
.ukus-switcher .ukus-btn:active {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	display: inline-flex;
	align-items: center;
	width: auto;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0.5em 0.85em;
	border: 0;
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font: inherit;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 0.15s ease;
}

.ukus-switcher .ukus-btn:hover {
	opacity: 1;
}

.ukus-switcher .ukus-btn[aria-pressed="true"] {
	opacity: 1;
	cursor: default;
}

/* Selected pill: a tint of the text colour, readable on any background. */
.ukus-switcher .ukus-btn[aria-pressed="true"]::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: currentColor;
	opacity: 0.14;
}

.ukus-switcher .ukus-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
	opacity: 1;
}

.ukus-switcher .ukus-btn:focus:not(:focus-visible) {
	outline: none;
}

/* Inside a header menu */
.ukus-menu-item {
	display: flex;
	align-items: center;
	list-style: none;
	padding: 0 0.5em;
}

.elementor-nav-menu--dropdown .ukus-menu-item {
	padding: 10px 20px;
}

/* Bar above the header */
.ukus-topbar {
	position: relative;
	z-index: 100;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	padding: 6px clamp(12px, 4vw, 32px);
	background: var(--ukus-topbar-bg, #f3f4f6);
	color: var(--ukus-topbar-color, #1f2328);
	font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
	.ukus-switcher .ukus-btn {
		transition: none;
	}
}
