/* Meridian West – UK/US switcher and location prompt */

:root {
	--mw-region-navy: #0D0C33;
	--mw-region-accent: #2F31FC;
	--mw-region-muted: #6b6a85;
	--mw-region-line: rgba(13, 12, 51, 0.12);
	--mw-region-radius: 12px;
	--mw-region-shadow: 0 12px 32px rgba(13, 12, 51, 0.14), 0 2px 6px rgba(13, 12, 51, 0.08);
}

/* ── Switcher ──────────────────────────────────────────────────────────
 * Three placements share one component:
 *   --topbar  desktop top bar (hidden where the mobile menu takes over)
 *   --mobile  row at the foot of the mobile menu; choices pop up above it
 *   --footer  footer bottom bar, next to "Follow us"
 * Hidden until html.mw-switcher-on (preview switch, or launch).
 * Selectors are doubled up to beat the theme's [type=button] reset.
 */

.mw-region-switcher {
	display: none;
	position: relative;
	font-family: var(--mw-header-font, inherit);
	text-align: left;
}

html.mw-switcher-on .mw-region-switcher {
	display: block;
}

/* Trigger: flat, no pill. */
.mw-region-switcher .mw-region-switcher__button {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 100%;
	margin: 0;
	padding: 0 16px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.04em;
	line-height: 1;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.mw-region-switcher .mw-region-switcher__button:hover,
.mw-region-switcher .mw-region-switcher__button:focus,
.mw-region-switcher.is-open .mw-region-switcher__button {
	background: transparent;
	color: var(--mw-region-accent);
}

.mw-region-switcher .mw-region-switcher__button:focus-visible,
.mw-region-switcher .mw-region-switcher__option:focus-visible,
.mw-region-prompt :focus-visible {
	outline: 2px solid var(--mw-region-accent);
	outline-offset: -2px;
}

.mw-region-switcher__icon {
	display: block;
	width: 14px;
	height: 14px;
	flex: none;
}

/* The site font's tall ascender lifts the letters ~1px above the icon's centre. */
.mw-region-switcher__label {
	position: relative;
	top: 1px;
}

.mw-region-switcher__chevron {
	flex: none;
	transition: transform 0.2s ease;
}

.mw-region-switcher.is-open .mw-region-switcher__chevron {
	transform: rotate(180deg);
}

/* Dropdown: matches the main navigation's sub-menus (square, soft shadow). */
.mw-region-switcher__menu {
	position: absolute;
	top: 100%;
	right: 0;
	min-width: 220px;
	margin: 0;
	padding: 8px 0;
	list-style: none;
	background: #fff;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
	z-index: 10002;
}

.mw-region-switcher.is-open .mw-region-switcher__menu {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.mw-region-switcher__menu li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mw-region-switcher .mw-region-switcher__option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 24px;
	color: var(--mw-region-navy);
	font-family: var(--mw-header-font, inherit);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.4;
	text-decoration: none;
	transition: color 0.3s ease, background-color 0.3s ease;
}

.mw-region-switcher .mw-region-switcher__option:hover,
.mw-region-switcher .mw-region-switcher__option:focus {
	background: #f8f8f8;
	color: var(--mw-region-accent);
	text-decoration: none;
}

.mw-region-switcher .mw-region-switcher__option[aria-current] {
	color: var(--mw-region-accent);
}

.mw-region-switcher__tick {
	flex: none;
}

/* ── Top bar placement ── */

.mw-region-switcher--topbar {
	position: absolute;
	top: 0;
	bottom: 0;
	right: var(--mw-header-padding-x, 20px);
	color: var(--mw-region-navy);
	border-left: 1px solid rgba(13, 12, 51, 0.06);
	border-right: 1px solid rgba(13, 12, 51, 0.06);
}

html.mw-switcher-on .mw-top-bar__inner {
	position: relative;
	padding-left: calc(var(--mw-header-padding-x, 20px) + 96px);
	padding-right: calc(var(--mw-header-padding-x, 20px) + 96px);
}

/* Where the mobile menu takes over, the switcher lives in the menu instead. */
@media (max-width: 1200px) {
	html.mw-switcher-on .mw-region-switcher--topbar {
		display: none;
	}
	html.mw-switcher-on .mw-top-bar__inner {
		padding-left: var(--mw-header-padding-x, 20px);
		padding-right: var(--mw-header-padding-x, 20px);
	}
}

/* ── Mobile menu placement ──
 * A row under the menu items, text lined up with theirs (theme header.css: 18px
 * text, 24px inset; 16px / 20px on phones). Tapping it pops the choices up over
 * the menu, so it works the same for two sites or many.
 */

.mw-region-switcher.mw-region-switcher--mobile .mw-region-switcher__button {
	display: flex;
	align-items: stretch;
	gap: 0;
	width: 100%;
	height: auto;
	padding: 0 24px;
	color: var(--mw-header-text, var(--mw-region-navy));
	font-size: 18px;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.5;
	text-align: left;
}

.mw-region-switcher.mw-region-switcher--mobile .mw-region-switcher__button:hover,
.mw-region-switcher.mw-region-switcher--mobile .mw-region-switcher__button:focus,
.mw-region-switcher.mw-region-switcher--mobile.is-open .mw-region-switcher__button {
	color: var(--mw-header-link-hover, var(--mw-region-accent));
}

.mw-region-switcher--mobile .mw-region-switcher__icon {
	align-self: center;
	width: 18px;
	height: 18px;
	margin-right: 10px;
}

.mw-region-switcher--mobile .mw-region-switcher__label {
	top: 0;
	padding: 18px 0;
}

/* Pops up from the row, full width of the menu. */
.mw-region-switcher--mobile .mw-region-switcher__menu {
	top: auto;
	bottom: 100%;
	left: 0;
	right: 0;
	min-width: 0;
	box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.1);
	transform: translateY(8px);
}

.mw-region-switcher--mobile.is-open .mw-region-switcher__menu {
	transform: none;
}

/* Choices line up with the menu text; the tick sits centred under the menu's expand arrows (28px in, less half its 14px). */
.mw-region-switcher.mw-region-switcher--mobile .mw-region-switcher__option {
	padding: 14px 21px 14px 24px;
	font-size: 18px;
}

@media (max-width: 767px) {
	.mw-region-switcher.mw-region-switcher--mobile .mw-region-switcher__button {
		padding-left: 20px;
		padding-right: 20px;
		font-size: 16px;
	}

	.mw-region-switcher--mobile .mw-region-switcher__icon {
		width: 16px;
		height: 16px;
	}

	.mw-region-switcher--mobile .mw-region-switcher__label {
		padding: 16px 0;
	}

	.mw-region-switcher.mw-region-switcher--mobile .mw-region-switcher__option {
		padding-left: 20px;
		font-size: 16px;
	}
}

@media (min-width: 1201px) {
	html.mw-switcher-on .mw-region-switcher--mobile {
		display: none;
	}
}

/* ── Footer placement ── */

.mw-footer__social {
	position: relative;
}

.mw-region-switcher--footer {
	margin-left: 12px;
	padding-left: 12px;
	border-left: 1px solid var(--mw-footer-divider, rgba(255, 255, 255, 0.2));
	color: var(--mw-footer-text, #fff);
}

.mw-region-switcher--footer .mw-region-switcher__button {
	height: auto;
	padding: 4px 4px;
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0;
}

.mw-region-switcher--footer .mw-region-switcher__button:hover,
.mw-region-switcher--footer .mw-region-switcher__button:focus,
.mw-region-switcher--footer.is-open .mw-region-switcher__button {
	color: var(--mw-footer-link-hover, #a0a0ff);
}

/* Opens upwards from the bottom of the page. */
.mw-region-switcher--footer .mw-region-switcher__menu {
	top: auto;
	bottom: calc(100% + 8px);
	right: auto;
	left: 0;
	transform: translateY(-8px);
}

.mw-region-switcher--footer.is-open .mw-region-switcher__menu {
	transform: none;
}

/* ── Location prompt ───────────────────────────────────────────────── */

html.mw-region-prompt-open {
	overflow: hidden;
}

/* The cookie banner stays visible above the prompt (its z-index is the maximum). On phones
   it spans the bottom of the screen (cookieconsent's 640px breakpoint), so the prompt moves
   to the top to keep both readable. */
@media (max-width: 640px) {
	html.show--consent .mw-region-prompt {
		align-items: flex-start;
	}
}

.mw-region-prompt {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	font-family: var(--mw-header-font, "Meridian West", sans-serif);
}

.mw-region-prompt__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(13, 12, 51, 0.45);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.mw-region-prompt__dialog {
	position: relative;
	width: 100%;
	max-width: 440px;
	padding: 36px 32px 28px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 24px 64px rgba(13, 12, 51, 0.28);
	color: var(--mw-region-navy);
	text-align: center;
	opacity: 0;
	transform: translateY(12px) scale(0.98);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.mw-region-prompt.is-visible .mw-region-prompt__backdrop,
.mw-region-prompt.is-visible .mw-region-prompt__dialog {
	opacity: 1;
	transform: none;
}

.mw-region-prompt .mw-region-prompt__close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--mw-region-muted);
	cursor: pointer;
}

.mw-region-prompt .mw-region-prompt__close:hover,
.mw-region-prompt .mw-region-prompt__close:focus {
	background: #f3f3f8;
	color: var(--mw-region-navy);
}

.mw-region-prompt__dialog:focus {
	outline: none;
}

.mw-region-prompt__title {
	margin: 0 0 10px;
	color: var(--mw-region-navy);
	font-family: inherit;
	font-size: 26px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.mw-region-prompt__text {
	margin: 0 0 26px;
	color: var(--mw-region-muted);
	font-size: 16px;
	line-height: 1.5;
}

.mw-region-prompt__actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mw-region-prompt__go {
	display: block;
	padding: 15px 20px;
	border-radius: 999px;
	background: var(--mw-region-navy);
	color: #fff;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.mw-region-prompt__go:hover,
.mw-region-prompt__go:focus {
	background: var(--mw-region-accent);
	color: #fff;
	text-decoration: none;
}

.mw-region-prompt .mw-region-prompt__stay {
	padding: 12px 20px;
	border-radius: 999px;
	border: 0;
	background: transparent;
	color: var(--mw-region-navy);
	font: inherit;
	font-size: 15px;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.mw-region-prompt .mw-region-prompt__stay:hover,
.mw-region-prompt .mw-region-prompt__stay:focus {
	background: transparent;
	color: var(--mw-region-accent);
}

@media (prefers-reduced-motion: reduce) {
	.mw-region-switcher__menu,
	.mw-region-switcher__chevron,
	.mw-region-switcher .mw-region-switcher__option,
	.mw-region-prompt__backdrop,
	.mw-region-prompt__dialog {
		transition: none;
	}
}
