/* UK & US English Switcher
 * Inherits font and colour from the header. Adjust with:
 *   --ukus-font-size   (default 14px)
 */

.ukus-switcher {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	margin: 0;
	color: inherit;
	font: inherit;
	font-size: var(--ukus-font-size, 14px);
	line-height: 1.3;
	white-space: nowrap;
}

.ukus-switcher-label {
	margin: 0;
	font-size: inherit;
	font-weight: 500;
}

/* Higher specificity than theme / Elementor kit select styles. */
.ukus-switcher .ukus-variant-select {
	-webkit-appearance: none;
	appearance: none;
	width: auto;
	max-width: 160px;
	min-height: 34px;
	margin: 0;
	padding: 5px 30px 5px 10px;
	border: 1px solid currentColor;
	border-radius: 4px;
	/* Arrow drawn in the text colour, so it works on light and dark headers. */
	background-color: transparent;
	background-image:
		linear-gradient(45deg, transparent 50%, currentColor 50%),
		linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - 15px) 55%, calc(100% - 10px) 55%;
	background-size: 5px 5px;
	background-repeat: no-repeat;
	box-shadow: none;
	color: inherit;
	font: inherit;
	line-height: 1.2;
	cursor: pointer;
}

.ukus-switcher .ukus-variant-select:focus {
	outline: none;
}

.ukus-switcher .ukus-variant-select:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.ukus-variant-select option {
	color: #222;
	background: #fff;
}

.ukus-screen-reader {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.ukus-menu-switcher-item {
	display: flex;
	align-items: center;
	list-style: none;
}

.ukus-menu-switcher-item > .ukus-switcher {
	padding: 5px 10px;
}

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

@media (max-width: 782px) {
	.ukus-switcher .ukus-variant-select {
		max-width: 140px;
		min-height: 40px;
	}
}

/* Missed-word checker (admins, ?ukus_audit=1) */
.ukus-audit {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 999999;
	width: min(340px, calc(100vw - 32px));
	max-height: min(70vh, 560px);
	overflow: auto;
	padding: 14px 16px 16px;
	border: 1px solid #c3c4c7;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
	color: #1d2327;
	font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	text-align: left;
}
.ukus-audit__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 15px; }
.ukus-audit h3 { margin: 14px 0 4px; font-size: 13px; font-weight: 600; color: #50575e; }
.ukus-audit p { margin: 4px 0; }
.ukus-audit__note { color: #646970; font-size: 12px; }
.ukus-audit ul { margin: 0; padding: 0; list-style: none; }
.ukus-audit li { display: flex; gap: 8px; align-items: baseline; padding: 3px 0; border-bottom: 1px solid #f0f0f1; }
.ukus-audit button { font: inherit; cursor: pointer; }
.ukus-audit .ukus-audit__word { padding: 0; border: 0; background: none; color: #2271b1; text-decoration: underline; }
.ukus-audit__fix { color: #50575e; white-space: pre; }
.ukus-audit textarea { width: 100%; box-sizing: border-box; font: 12px/1.5 Menlo, Consolas, monospace; }
.ukus-audit .ukus-audit__btn { margin: 8px 8px 0 0; padding: 6px 12px; border: 1px solid #2271b1; border-radius: 4px; background: #2271b1; color: #fff; }
.ukus-audit .ukus-audit__btn--quiet { background: #fff; color: #2271b1; }
.ukus-audit .ukus-audit__x { padding: 0 4px; border: 0; background: none; color: #50575e; font-size: 20px; line-height: 1; }
