/*
 * ISC Español: language switch.
 * Brand: plum #3d2144, cream #f9f3ec, teal #3C6E73, lilac #b998c2.
 * LS Jordan Design.
 */

.isc-lang {
	--isc-lang-speed: 340ms;
	--isc-lang-ease: cubic-bezier(.2, .7, .2, 1);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 12.5px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .01em;
	-webkit-font-smoothing: antialiased;
}
.isc-lang__globe { flex: 0 0 auto; opacity: .8; }
.isc-lang__track,
.isc-lang--drawer {
	position: relative;
	display: inline-flex;
	align-items: stretch;
	padding: 3px;
	border-radius: 999px;
	isolation: isolate;
}
.isc-lang__opt {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 13px;
	border-radius: 999px;
	text-decoration: none !important;
	white-space: nowrap;
	transition: color var(--isc-lang-speed) var(--isc-lang-ease), opacity var(--isc-lang-speed), background-color var(--isc-lang-speed);
}
.isc-lang__abbr { display: none; }
.isc-lang__thumb {
	position: absolute;
	z-index: 0;
	top: 3px;
	bottom: 3px;
	left: 0;
	width: 0;
	border-radius: 999px;
	opacity: 0;
	pointer-events: none;
	transition: transform var(--isc-lang-speed) var(--isc-lang-ease), width var(--isc-lang-speed) var(--isc-lang-ease), opacity 200ms;
}
/* Before the script measures: the active option carries its own fill. */
.isc-lang.is-ready .isc-lang__thumb { opacity: 1; }
.isc-lang.is-ready .isc-lang__opt.is-active { background-color: transparent !important; }
.isc-lang__opt:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ---------- In the plum crisis strip ---------- */
.isc-lang--bar { color: #f9f3ec; }
.isc-lang--bar .isc-lang__track {
	background: rgba(249, 243, 236, .08);
	box-shadow: inset 0 0 0 1px rgba(249, 243, 236, .30);
}
/* The header widget colours every link in the strip, so these need !important. */
.isc-lang--bar .isc-lang__opt { color: #f9f3ec !important; opacity: .82; }
.isc-lang--bar .isc-lang__opt:hover { opacity: 1; }
.isc-lang--bar .isc-lang__opt.is-active { color: #3d2144 !important; opacity: 1; background-color: #f9f3ec; }
.isc-lang--bar .isc-lang__thumb { background: #f9f3ec; box-shadow: 0 1px 3px rgba(20, 8, 24, .35); }

/* Sits at the end of the crisis strip, in line with the hotlines. */
.elementor-widget-isc-header .isc-utility .isc-lang--bar { flex: 0 0 auto; }

@media (max-width: 600px) {
	.isc-lang--bar { font-size: 12px; gap: 6px; }
	.isc-lang--bar .isc-lang__globe { display: none; }
	.isc-lang--bar .isc-lang__opt { padding: 5px 10px; min-height: 28px; }
	.isc-lang--bar .isc-lang__full {
		position: absolute !important; width: 1px; height: 1px; overflow: hidden;
		clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
	}
	.isc-lang--bar .isc-lang__abbr { display: inline; }
}

/* ---------- In the mobile menu ---------- */
.isc-lang-drawer {
	margin: 18px 0 0;
	padding: 14px 0 16px;
	border-bottom: 1px solid rgba(61, 33, 68, .14);
}
.isc-lang-drawer__label {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 10px;
	font-family: "Public Sans", system-ui, sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #3C6E73;
}
.isc-lang--drawer {
	display: flex;
	width: 100%;
	padding: 4px;
	background: rgba(61, 33, 68, .06);
	box-shadow: inset 0 0 0 1.5px rgba(61, 33, 68, .16);
	font-size: 16px;
}
.isc-lang--drawer .isc-lang__opt {
	flex: 1 1 50%;
	padding: 13px 10px;
	min-height: 48px;
	color: #3d2144 !important;
	font-family: "Bricolage Grotesque", "Public Sans", sans-serif;
	font-weight: 700;
}
.isc-lang--drawer .isc-lang__opt.is-active { color: #f9f3ec !important; background-color: #3d2144; }
.isc-lang--drawer .isc-lang__thumb { top: 4px; bottom: 4px; background: #3d2144; box-shadow: 0 2px 8px rgba(61, 33, 68, .25); }

/* Fallback when a page has no ISC header. */
.isc-lang-float { position: fixed; z-index: 9999; right: 14px; bottom: 14px; padding: 6px 8px; border-radius: 999px; background: #3d2144; box-shadow: 0 6px 22px rgba(20, 8, 24, .28); }

/* ---------- "Prefer Spanish?" hint on English pages ---------- */
.isc-lang-hint {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px 14px;
	padding: 10px 52px 10px 18px;
	position: relative;
	background: #3C6E73;
	color: #f9f3ec;
	font-family: "Public Sans", system-ui, sans-serif;
	font-size: 14px;
	line-height: 1.4;
	opacity: 0;
	transform: translateY(-6px);
	transition: opacity 420ms cubic-bezier(.2, .7, .2, 1), transform 420ms cubic-bezier(.2, .7, .2, 1);
}
.isc-lang-hint.is-in { opacity: 1; transform: none; }
.isc-lang-hint a {
	color: #3d2144;
	background: #f9f3ec;
	padding: 6px 14px;
	border-radius: 999px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}
.isc-lang-hint a:hover, .isc-lang-hint a:focus-visible { background: #fff; }
.isc-lang-hint button {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	appearance: none;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 22px;
	line-height: 1;
	padding: 8px 10px;
	cursor: pointer;
	border-radius: 8px;
}
.isc-lang-hint button:focus-visible { outline: 2px solid #f9f3ec; }

/* ---------- English-only article note ---------- */
.isc-i18n-only-en {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 24px;
	padding: 12px 16px;
	border-radius: 12px;
	background: #f3e9f5;
	color: #3d2144;
	font-weight: 600;
	font-size: 15px;
}
.isc-i18n-only-en span {
	flex: 0 0 auto;
	padding: 4px 7px;
	border-radius: 6px;
	background: #3d2144;
	color: #f9f3ec;
	font-size: 11px;
	letter-spacing: .06em;
}

@media (prefers-reduced-motion: reduce) {
	.isc-lang, .isc-lang * , .isc-lang-hint { transition: none !important; }
}
