/* =============================================================
   GPL UI 2.18.2 – Compact one-row sticky header + centred search panel
   Markup: child header.php, inc/gpl-ui/site-header.php, inc/gpl-ui/search.php
   Brand: pink #c0176b, navy #0b0b6f, logo navy #2b2767.
   Notes:
   - The pink member bar is styled by Customizer → Additional CSS
     (absolute at the top of #masthead, height --gpl-bar-h). Untouched.
   - Selectors start with #masthead.gpl-header / #meta-member so they win
     over the Customizer and Max Mega Menu rules without editing them.
   ============================================================= */

/* ---------- 1. Sticky header (pink bar + white row stay on top) ---------- */
#masthead.site-header.gpl-header {
	--gplh-admin: 0px;
	--gplh-row: 84px;
	--gplh-logo: 56px;
	position: -webkit-sticky;
	position: sticky;
	top: var(--gplh-admin);
	z-index: 1000;
	background: #ffffff;
	border-bottom: 1px solid #e5e7eb;
	transition: box-shadow 0.2s ease;
}
.admin-bar #masthead.site-header.gpl-header {
	--gplh-admin: 32px;
}
@media screen and (max-width: 782px) {
	.admin-bar #masthead.site-header.gpl-header {
		--gplh-admin: 46px;
	}
}
@media screen and (max-width: 600px) {
	/* The admin bar is not fixed on small phones. */
	.admin-bar #masthead.site-header.gpl-header {
		--gplh-admin: 0px;
	}
}
#masthead.site-header.gpl-header.gpl-header--stuck {
	box-shadow: 0 6px 18px rgba(43, 39, 103, 0.10);
}

/* ---------- 2. The row: logo | menu | tools ---------- */
#masthead.gpl-header .gpl-header__row {
	display: flex !important;
	align-items: center;
	flex-wrap: nowrap;
	gap: clamp(16px, 2vw, 36px);
	min-height: var(--gplh-row);
}
#masthead.gpl-header .gpl-header__row::before,
#masthead.gpl-header .gpl-header__row::after {
	display: none !important;
	content: none !important;
}

/* Logo */
#masthead.gpl-header .gpl-header__brand {
	position: relative;
	flex: 0 0 auto;
	width: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	float: none !important;
}
#masthead.gpl-header .gpl-header__brand a.custom-logo-link {
	display: block;
	float: none;
	line-height: 0;
}
#masthead.gpl-header .gpl-header__brand a.custom-logo-link .custom-logo {
	display: block;
	width: auto !important;
	height: var(--gplh-logo) !important;
	max-height: none !important;
}
#masthead.gpl-header .gpl-header__brand a.custom-logo-link:focus-visible {
	outline: 2px solid #c0176b;
	outline-offset: 4px;
	border-radius: 4px;
}

/* Tools (phone search button + mobile menu button) */
#masthead.gpl-header .gpl-header__tools {
	display: none;
	align-items: center;
	gap: 2px;
	flex: 0 0 auto;
	margin-left: auto;
}

/* "Header Right" only holds the absolute pink bar → takes no room. */
@media screen and (min-width: 768px) {
	#masthead.gpl-header .gpl-header__right {
		display: contents !important;
	}
}

/* ---------- 3. Main menu (Max Mega Menu) in the row ---------- */
@media screen and (min-width: 768px) {
	#masthead.gpl-header #site-navigation {
		display: block;
		flex: 1 1 auto;
		min-width: 0;
		margin: 0;
		padding: 0;
		border: 0 !important;
		background: transparent !important;
	}
	#page #masthead.gpl-header #site-navigation .main-navigation.row {
		max-width: none !important;
		width: 100%;
		margin: 0;
	}
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary {
		background: transparent !important;
	}
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary {
		display: flex !important;
		align-items: stretch !important;
		justify-content: center !important;
		flex-wrap: nowrap !important;
		gap: clamp(10px, 1.9vw, 34px) !important;
		width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
		background: transparent !important;
	}
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item {
		margin: 0 !important;
		padding: 0 !important;
	}
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link {
		display: flex !important;
		align-items: center !important;
		height: var(--gplh-row) !important;
		line-height: 1.2 !important;
		margin: 0 !important;
		padding: 0 4px !important;
		background: transparent !important;
		color: #2b2767 !important;
		font-size: clamp(13.5px, 1.02vw, 16px) !important;
		font-weight: 500 !important;
		white-space: nowrap !important;
		box-shadow: none !important;
		transition: color 0.15s ease, box-shadow 0.15s ease;
	}
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link:hover,
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item.mega-toggle-on > a.mega-menu-link,
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link:focus {
		background: transparent !important;
		color: #c0176b !important;
		box-shadow: inset 0 -3px 0 rgba(192, 23, 107, 0.35) !important;
	}
	/* Current page / section */
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary > li.mega-current-menu-item > a.mega-menu-link,
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary > li.mega-current-menu-ancestor > a.mega-menu-link,
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary > li.mega-current-page-ancestor > a.mega-menu-link,
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary > li.mega-current_page_item > a.mega-menu-link {
		color: #c0176b !important;
		font-weight: 700 !important;
		box-shadow: inset 0 -3px 0 #c0176b !important;
	}
	/* Dropdowns open right under the header row */
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-flyout > ul.mega-sub-menu,
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-megamenu > ul.mega-sub-menu {
		top: 100% !important;
	}
}

/* Dropdowns that would leave the window (classes set by gpl-header.js).
   769px = Max Mega Menu's own desktop breakpoint. */
@media screen and (min-width: 769px) {
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary > li.gpl-mm-left > ul.mega-sub-menu {
		left: 0 !important;
		right: auto !important;
	}
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary > li.gpl-mm-right > ul.mega-sub-menu {
		left: auto !important;
		right: 0 !important;
	}
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary li.gpl-mm-open-right > ul.mega-sub-menu {
		left: 100% !important;
		right: auto !important;
	}
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary li.gpl-mm-flip > ul.mega-sub-menu {
		left: auto !important;
		right: 100% !important;
	}
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary ul.mega-sub-menu.gpl-mm-narrow a.mega-menu-link {
		height: auto !important;
		white-space: normal !important;
	}
	/* Long lists (since 2.17.0): moved up / capped + scrolling (gpl-header.js). */
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary ul.mega-sub-menu.gpl-mm-up {
		top: var(--gpl-mm-top, 0px) !important;
	}
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary ul.mega-sub-menu.gpl-mm-scroll {
		max-height: var(--gpl-mm-max, 70vh) !important;
		overflow-x: hidden !important;
		overflow-y: auto !important;
		overscroll-behavior: contain;
		scrollbar-width: thin;
		scrollbar-color: #b9bbd0 transparent;
	}
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary ul.mega-sub-menu.gpl-mm-scroll::-webkit-scrollbar {
		width: 8px;
	}
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary ul.mega-sub-menu.gpl-mm-scroll::-webkit-scrollbar-thumb {
		background: #b9bbd0;
		border-radius: 8px;
	}
	/* Soft fade at the bottom = "more below"; gone at the end of the list. */
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary ul.mega-sub-menu.gpl-mm-scroll::after {
		content: "";
		display: block;
		position: -webkit-sticky;
		position: sticky;
		bottom: 0;
		height: 32px;
		margin-top: -32px;
		background: linear-gradient( to bottom, rgba( 241, 241, 241, 0 ), #f1f1f1 85% );
		pointer-events: none;
		transition: opacity .15s;
	}
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary ul.mega-sub-menu.gpl-mm-scroll.gpl-mm-end::after {
		opacity: 0;
	}
}

/* Tablet & small laptop: menu on its own line inside the sticky header */
@media screen and (min-width: 768px) and (max-width: 1179px) {
	#masthead.site-header.gpl-header {
		--gplh-row: 52px;
		--gplh-logo: 48px;
	}
	#masthead.gpl-header .gpl-header__row {
		flex-wrap: wrap;
		row-gap: 0;
		min-height: 0;
		padding-top: 10px;
	}
	#masthead.gpl-header #site-navigation {
		flex: 0 0 100%;
		margin-top: 8px;
		border-top: 1px solid #eeeef4 !important;
	}
	/* Menu may wrap to a second line instead of overflowing the screen. */
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary {
		justify-content: center !important;
		flex-wrap: wrap !important;
		row-gap: 0 !important;
		column-gap: clamp(4px, 1vw, 20px) !important;
	}
	#masthead.gpl-header #site-navigation #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link {
		padding: 0 3px !important;
		font-size: clamp(13px, 1.6vw, 15px) !important;
	}
}
/* Below 1024px the theme's .row is full width: give the header side padding. */
@media screen and (min-width: 768px) and (max-width: 1023px) {
	#masthead.gpl-header .gpl-header__row {
		padding-left: 24px !important;
		padding-right: 24px !important;
	}
}

/* ---------- 4. Search box (shared) ---------- */
.gpl-search {
	position: relative;
	line-height: 1.3;
	white-space: normal;
	text-align: left;
}
.gpl-search .gpl-icon {
	display: block;
}
.gpl-search__form {
	position: relative;
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
}
.gpl-search__icon {
	position: absolute;
	top: 50%;
	left: 12px;
	display: flex;
	transform: translateY(-50%);
	pointer-events: none;
}
.gpl-search input[type="search"].gpl-search__input {
	-webkit-appearance: none;
	appearance: none;
	box-sizing: border-box;
	width: 100%;
	min-height: 0;
	margin: 0 !important;
	border-radius: 999px !important;
	box-shadow: none !important;
	font-family: inherit;
	letter-spacing: 0.01em;
	outline: none !important;
	transition: width 0.2s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.gpl-search input[type="search"].gpl-search__input::-webkit-search-cancel-button,
.gpl-search input[type="search"].gpl-search__input::-webkit-search-decoration {
	-webkit-appearance: none;
	display: none;
}
.gpl-search .gpl-search__kbd {
	margin: 0;
	background: transparent !important;
	box-shadow: none;
	line-height: 16px;
}
.gpl-search__kbd {
	position: absolute;
	top: 50%;
	right: 10px;
	min-width: 16px;
	height: 18px;
	padding: 0 4px;
	box-sizing: border-box;
	border: 1px solid rgba(255, 255, 255, 0.6);
	border-radius: 4px;
	color: #ffffff;
	font: 600 11px/16px Arial, Helvetica, sans-serif;
	text-align: center;
	transform: translateY(-50%);
	pointer-events: none;
}
.gpl-search.is-open .gpl-search__kbd,
.gpl-search.has-value .gpl-search__kbd {
	display: none;
}
.gpl-search button.gpl-search__clear {
	position: absolute;
	top: 50%;
	right: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f3e2eb;
	box-shadow: none;
	color: #c0176b;
	cursor: pointer;
	transform: translateY(-50%);
}
.gpl-search button.gpl-search__clear[hidden] {
	display: none;
}
.gpl-search button.gpl-search__clear:hover {
	background: #ebcadb;
}

/* Panel */
.gpl-search__panel {
	box-sizing: border-box;
	background: #ffffff;
	color: #222222;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 14px;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
}
.gpl-search__panel[hidden] {
	display: none !important;
}
.gpl-search__scopes {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 14px 18px 12px;
	border-bottom: 1px solid #eeeef4;
}
.gpl-search__label,
.gpl-search__group {
	color: #55556a;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
.gpl-search__label {
	margin-right: 2px;
}
.gpl-search button.gpl-search__chip {
	display: inline-flex;
	align-items: center;
	height: 28px;
	min-width: 0;
	margin: 0;
	padding: 0 12px;
	border: 1px solid #d6d6e4;
	border-radius: 999px;
	background: #ffffff;
	box-shadow: none;
	color: #2b2767;
	font: 600 13px Arial, Helvetica, sans-serif;
	line-height: 1;
	text-transform: none;
	cursor: pointer;
}
.gpl-search button.gpl-search__chip:hover {
	border-color: #c0176b;
	color: #c0176b;
	background: #ffffff;
}
.gpl-search button.gpl-search__chip[aria-pressed="true"] {
	border-color: #c0176b;
	background: #c0176b;
	color: #ffffff;
}
.gpl-search button.gpl-search__chip:focus-visible {
	outline: 2px solid #0b0b6f;
	outline-offset: 2px;
}
.gpl-search__panel,
.gpl-search__body,
.gpl-search__list {
	min-width: 0;
}
.gpl-search__body {
	max-height: min(60vh, 520px);
	overflow-y: auto;
	overscroll-behavior: contain;
}
.gpl-search__list {
	padding: 6px 8px 0;
}
.gpl-search__group {
	display: block;
	padding: 12px 12px 6px;
}
.gpl-search__group-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-right: 8px;
}
.gpl-search button.gpl-search__link {
	min-width: 0;
	margin: 0;
	padding: 4px 6px;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: #c0176b;
	font: 600 12.5px Arial, Helvetica, sans-serif;
	cursor: pointer;
}
.gpl-search button.gpl-search__link:hover {
	text-decoration: underline;
}
.gpl-search__recent {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 2px 12px 8px;
}
.gpl-search button.gpl-search__recent-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 30px;
	min-width: 0;
	margin: 0;
	padding: 0 12px 0 8px;
	border: 0;
	border-radius: 999px;
	background: #f4f4f9;
	box-shadow: none;
	color: #2b2767;
	font: 500 13px Arial, Helvetica, sans-serif;
	cursor: pointer;
}
.gpl-search button.gpl-search__recent-item:hover {
	background: #fbeef5;
	color: #c0176b;
}
.gpl-search button.gpl-search__recent-item .gpl-search__ico {
	width: auto;
	height: auto;
	background: transparent;
	color: #6b6b80;
}
.gpl-search__note {
	margin: 0;
	padding: 14px 12px 16px;
	color: #55556a;
	font-size: 13.5px;
}
.gpl-search__note--loading {
	color: #6b6b80;
}

/* Options */
/* !important: the theme styles every link in the pink bar
   (".header-right #meta-member a" = inline-block, white, side margins). */
#page .gpl-search a.gpl-search__opt {
	display: flex !important;
	align-items: center;
	gap: 12px;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 9px 12px !important;
	border: 0 !important;
	border-radius: 10px !important;
	background: transparent;
	color: #0b0b6f !important;
	font-weight: 400;
	line-height: 1.3;
	white-space: normal;
	text-decoration: none !important;
	box-shadow: none !important;
}
#page .gpl-search a.gpl-search__opt:hover,
#page .gpl-search a.gpl-search__opt.is-active {
	background: #fbeef5 !important;
	color: #0b0b6f !important;
}
.gpl-search__ico {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: #f4f4f9;
	color: #2b2767;
}
.gpl-search__ico svg {
	display: block;
}
.gpl-search__ico--place { background: #eef6fd; color: #1d5fa0; }
.gpl-search__ico--summary { background: #fbeef5; color: #c0176b; }
.gpl-search__ico--law { background: #f1f0fb; color: #2b2767; }
.gpl-search__ico--bill { background: #eef0fb; color: #0b0b6f; }
.gpl-search__ico--newsletter { background: #f0f7f2; color: #276b3d; }
#page .gpl-search a.gpl-search__opt.is-active .gpl-search__ico,
#page .gpl-search a.gpl-search__opt:hover .gpl-search__ico {
	background: #ffffff;
}
.gpl-search__txt {
	display: flex;
	flex-direction: column;
	gap: 3px;
	flex: 1 1 auto;
	min-width: 0;
}
.gpl-search__title {
	overflow: hidden;
	color: #0b0b6f;
	font-size: 14px;
	line-height: 1.3;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.gpl-search__title mark {
	padding: 0;
	background: transparent;
	color: inherit;
	font-weight: 700;
}
.gpl-search__detail {
	overflow: hidden;
	color: #44445a;
	font-size: 12.5px;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.gpl-search__meta {
	color: #55556a;
	font-size: 12px;
}
.gpl-search__badge {
	flex: 0 0 auto;
	max-width: 120px;
	overflow: hidden;
	padding: 4px 9px;
	border-radius: 999px;
	background: #eef0fb;
	color: #0b0b6f;
	font-size: 11.5px;
	font-weight: 700;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* See all results */
#page .gpl-search a.gpl-search__all {
	position: sticky;
	bottom: 0;
	gap: 8px;
	margin: 8px -8px 0 !important;
	padding: 13px 20px !important;
	border-top: 1px solid #eeeef4 !important;
	border-radius: 0 !important;
	background: #fafafc;
	color: #c0176b !important;
	font-size: 14px;
	font-weight: 700;
}
#page .gpl-search a.gpl-search__all:hover,
#page .gpl-search a.gpl-search__all.is-active {
	background: #fbeef5 !important;
	color: #a3125a !important;
}
.gpl-search__all-text {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
#page .gpl-search a.gpl-search__all .gpl-search__ico {
	width: auto;
	height: auto;
	background: transparent !important;
	color: inherit;
}
.gpl-search__enter {
	margin-left: auto;
	padding: 2px 6px;
	border: 1px solid #d6d6e4;
	border-radius: 4px;
	background: #ffffff;
	color: #55556a;
	font: 600 11px Arial, Helvetica, sans-serif;
}

/* ---------- 5. Search box in the pink bar ---------- */
/*
 * Three states (classes set by gpl-header.js):
 *  - default (no JS / not enough room): field just before "My Account".
 *  - .is-centered: closed field in the exact centre of the pink bar, when it
 *    fits between "Welcome" and the links (width in --gpl-search-w).
 *  - .is-open: while searching – wide field in the centre of the bar, panel
 *    centred under it; "Welcome" and the links are hidden until it closes.
 */
.header-right #meta-member .member-navigation > ul.menu > li.gpl-hsearch-item {
	margin-right: clamp(6px, 1vw, 16px) !important;
}
.header-right #meta-member .member-navigation > ul.menu > li.gpl-hsearch-item.is-centered,
.header-right #meta-member .member-navigation > ul.menu > li.gpl-hsearch-item.is-open {
	position: static !important; /* the box centres on the whole bar */
	width: 0 !important;
	margin: 0 !important;
}
/* no hairline divider right after the search box */
.header-right #meta-member .member-navigation > ul.menu > li.gpl-hsearch-item + li::before,
.header-right #meta-member .member-navigation > ul.menu > li.gpl-hsearch-item::before {
	display: none !important;
}
/* Search icon: navy (#0b0b6f, same as the header band) so it stands out on pink. */
.gpl-search--bar .gpl-search__icon {
	color: #0b0b6f;
}
.gpl-search--bar input[type="search"].gpl-search__input {
	width: 240px;
	height: 32px;
	padding: 0 34px 0 34px !important;
	border: 1px solid rgba(255, 255, 255, 0.55) !important;
	background: rgba(255, 255, 255, 0.14) !important;
	color: #ffffff !important;
	font-size: 13px !important;
	font-weight: 500;
	line-height: 30px;
}
.gpl-search--bar input[type="search"].gpl-search__input::placeholder {
	color: rgba(255, 255, 255, 0.9);
	opacity: 1;
}
.gpl-search--bar input[type="search"].gpl-search__input:hover {
	background: rgba(255, 255, 255, 0.22) !important;
}

/* Centred (closed) and open: the box sits in the middle of the bar. */
.gpl-search--bar.is-centered,
.gpl-search--bar.is-open {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 41;
	width: var(--gpl-search-w, 300px);
	transform: translate(-50%, -50%);
}
.gpl-search--bar.is-open {
	width: min(600px, calc(100vw - 48px));
}
.gpl-search--bar.is-centered input[type="search"].gpl-search__input,
.gpl-search--bar.is-open input[type="search"].gpl-search__input {
	width: 100% !important;
}
.gpl-search--bar.is-open input[type="search"].gpl-search__input {
	height: 36px;
	padding: 0 38px 0 38px !important;
	border-color: #ffffff !important;
	background: #ffffff !important;
	color: #0b0b6f !important;
	font-size: 14px !important;
	line-height: 34px;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35) !important;
}
.gpl-search--bar.is-open input[type="search"].gpl-search__input::placeholder {
	color: #6b6b80;
}
.gpl-search--bar.is-open .gpl-search__icon {
	left: 14px;
	color: #0b0b6f;
}
.gpl-search--bar.is-open button.gpl-search__clear {
	right: 8px;
}

/* While searching: hide "Welcome" and the links so nothing overlaps. */
.header-right #meta-member .meta-member-inner > .user,
.header-right #meta-member .member-navigation > ul.menu > li {
	transition: opacity 0.15s ease, visibility 0.15s ease;
}
.header-right #meta-member.gpl-search-active .meta-member-inner > .user,
.header-right #meta-member.gpl-search-active .member-navigation > ul.menu > li:not(.gpl-hsearch-item) {
	visibility: hidden;
	opacity: 0;
}

/* Panel: centred under the field. */
.gpl-search--bar .gpl-search__panel {
	position: absolute;
	top: calc(100% + 12px);
	left: 50%;
	z-index: 40;
	width: min(680px, calc(100vw - 24px));
	overflow: hidden;
	border-radius: 14px;
	box-shadow: 0 18px 48px rgba(11, 11, 111, 0.28), 0 0 0 1px rgba(11, 11, 111, 0.06);
	transform: translateX(-50%);
}
/* Keyboard focus inside the white panel (the bar's white outline would vanish). */
.header-right #meta-member .gpl-search__panel a:focus-visible,
.header-right #meta-member .gpl-search__panel button:focus-visible {
	outline: 2px solid #0b0b6f;
	outline-offset: 2px;
}

@media screen and (min-width: 1024px) and (max-width: 1199px) {
	.gpl-search--bar input[type="search"].gpl-search__input {
		width: 170px;
	}
	.gpl-search--bar .gpl-search__kbd {
		display: none;
	}
}
/* Little room (.is-compact, set by JS) or tablet: round search button.
   It opens centred like above. */
.gpl-search--bar.is-compact:not(.is-open) {
	width: 32px;
	height: 32px;
}
.gpl-search--bar.is-compact .gpl-search__kbd {
	display: none;
}
.gpl-search--bar.is-compact:not(.is-open) .gpl-search__icon {
	left: 50%;
	transform: translate(-50%, -50%);
}
.gpl-search--bar.is-compact:not(.is-open) input[type="search"].gpl-search__input {
	width: 32px !important;
	padding: 0 !important;
	color: transparent !important;
	cursor: pointer;
}
.gpl-search--bar.is-compact:not(.is-open) input[type="search"].gpl-search__input::placeholder {
	color: transparent;
}
.gpl-search--bar.is-compact:not(.is-open) button.gpl-search__clear {
	display: none;
}
@media screen and (min-width: 768px) and (max-width: 1023px) {
	.gpl-search--bar:not(.is-open) {
		width: 32px;
		height: 32px;
	}
	.gpl-search--bar .gpl-search__kbd {
		display: none;
	}
	.gpl-search--bar:not(.is-open) .gpl-search__icon {
		left: 50%;
		transform: translate(-50%, -50%);
	}
	.gpl-search--bar:not(.is-open) input[type="search"].gpl-search__input {
		width: 32px !important;
		padding: 0 !important;
		color: transparent !important;
		cursor: pointer;
	}
	.gpl-search--bar:not(.is-open) input[type="search"].gpl-search__input::placeholder {
		color: transparent;
	}
	.gpl-search--bar:not(.is-open) button.gpl-search__clear {
		display: none;
	}
}

/* ---------- 5b. Search box in page content (.gpl-search--page, since 2.16.0) ---------- */
.gpl-search--page {
	width: 100%;
}
.gpl-search--page .gpl-search__form {
	height: 56px;
	border: 1.5px solid #cfcfe0;
	border-radius: 14px;
	background: #ffffff;
	box-shadow: 0 4px 14px rgba(43, 39, 103, 0.08);
	overflow: hidden;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.gpl-search--page .gpl-search__form:focus-within {
	border-color: #c0176b;
	box-shadow: 0 0 0 3px rgba(192, 23, 107, 0.15);
}
.gpl-search--page .gpl-search__icon {
	left: 18px;
	color: #0b0b6f;
}
.gpl-search--page input[type="search"].gpl-search__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 100% !important;
	padding: 0 12px 0 48px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: #0b0b6f !important;
	font-size: 16px !important;
}
.gpl-search--page input[type="search"].gpl-search__input::placeholder {
	color: #6b6b80;
	opacity: 1;
}
.gpl-search--page button.gpl-search__clear {
	position: static;
	flex: 0 0 auto;
	margin: 0 10px 0 0;
	transform: none;
}
.gpl-search--page button.gpl-search__submit {
	flex: 0 0 auto;
	height: 100%;
	min-width: 0;
	margin: 0;
	padding: 0 28px;
	border: 0;
	border-radius: 0;
	background: #c0176b;
	box-shadow: none;
	color: #ffffff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.15s ease;
}
.gpl-search--page button.gpl-search__submit:hover {
	background: #a3125a;
}
.gpl-search--page button.gpl-search__submit:focus-visible {
	outline: 2px solid #0b0b6f;
	outline-offset: -4px;
}
/* "Search in" chips stay visible under the field. */
.gpl-search--page .gpl-search__scopes {
	justify-content: center;
	padding: 14px 0 0;
	border-bottom: 0;
}
/* Suggestions open under the chips, full width of the field. */
.gpl-search--page .gpl-search__panel {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 50;
	overflow: hidden;
	border-radius: 14px;
	box-shadow: 0 18px 48px rgba(11, 11, 111, 0.22), 0 0 0 1px rgba(11, 11, 111, 0.06);
}
@media screen and (max-width: 600px) {
	.gpl-search--page .gpl-search__form {
		height: 50px;
	}
	.gpl-search--page button.gpl-search__submit {
		padding: 0 16px;
	}
	.gpl-search--page .gpl-search__scopes .gpl-search__label {
		width: 100%;
		text-align: center;
	}
}

/* ---------- 6. Phones: search button + full-screen sheet ---------- */
#masthead.gpl-header button.gpl-search-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	box-shadow: none;
	color: #c0176b;
	cursor: pointer;
}
#masthead.gpl-header button.gpl-search-toggle:hover {
	background: #fbeef5;
}
#masthead.gpl-header button.gpl-search-toggle:focus-visible {
	outline: 2px solid #c0176b;
	outline-offset: 2px;
}

.gpl-search-sheet {
	position: fixed;
	inset: 0;
	z-index: 2147483000; /* above the admin bar and the floating Translate button */
	overflow-y: auto;
	background: #ffffff;
	overscroll-behavior: contain;
}
.gpl-search-sheet[hidden] {
	display: none !important;
}
html.gpl-search-sheet-open,
html.gpl-search-sheet-open body {
	overflow: hidden;
}
.gpl-search--sheet {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 12px 12px 0 16px;
}
.gpl-search--sheet .gpl-search__form {
	flex: 1 1 0;
	min-width: 0;
}
.gpl-search--sheet .gpl-search__icon {
	left: 14px;
	color: #0b0b6f;
}
.gpl-search--sheet input[type="search"].gpl-search__input {
	height: 44px;
	padding: 0 40px 0 42px !important;
	border: 2px solid #c0176b !important;
	background: #ffffff !important;
	color: #0b0b6f !important;
	font-size: 16px !important;
}
.gpl-search--sheet input[type="search"].gpl-search__input::placeholder {
	color: #6b6b80;
	opacity: 1;
}
.gpl-search--sheet button.gpl-search__clear {
	right: 10px;
}
.gpl-search--sheet button.gpl-search__cancel {
	flex: 0 0 auto;
	height: 44px;
	min-width: 0;
	margin: 0;
	padding: 0 6px;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: #c0176b;
	font: 700 15px Arial, Helvetica, sans-serif;
	cursor: pointer;
}
.gpl-search--sheet .gpl-search__panel {
	flex: 0 0 calc(100% + 28px);
	min-width: 0;
	max-width: calc(100% + 28px);
	margin: 6px -12px 0 -16px;
}
.gpl-search--sheet .gpl-search__scopes {
	padding: 10px 16px 12px;
}
.gpl-search--sheet button.gpl-search__chip {
	height: 34px;
	font-size: 14px;
}
.gpl-search--sheet .gpl-search__body {
	max-height: none;
}
.gpl-search--sheet a.gpl-search__opt {
	min-height: 44px;
}

/* ---------- 7. Phones (< 768px): header row ---------- */
@media screen and (max-width: 767px) {
	#masthead.site-header.gpl-header {
		--gplh-row: 64px;
		--gplh-logo: 40px;
		z-index: 98; /* below the theme's slide-in mobile menu (99/100) */
		padding: 0 12px 0 16px;
	}
	#masthead.gpl-header .gpl-header__row {
		display: flex !important;
		gap: 8px;
	}
	#masthead.gpl-header .gpl-header__tools {
		display: flex;
	}
	#masthead.gpl-header button.gpl-search-toggle {
		display: inline-flex;
	}
	#masthead.gpl-header .mobile-navigation-bar {
		display: block;
		text-align: right;
	}
}
@media screen and (min-width: 768px) {
	#masthead.gpl-header .mobile-navigation-bar {
		display: none !important;
	}
}

/* ---------- 7b. Phone menu (Memberlite ☰) – since 2.18.2 ----------
   Memberlite puts the open menu at the top of the PAGE. With the sticky
   header the ☰ button is also there further down, so the menu opened off
   screen (only its pink background column showed). Keep it on the screen
   instead; a long menu scrolls by itself. Memberlite's own JS still opens
   and closes it (only its position changes here). */
@media screen and (max-width: 767px) {
	#mobile-navigation {
		position: fixed;
		top: 0;
		bottom: 0;
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
	}
	body.admin-bar #mobile-navigation {
		top: 46px;
	}
}
/* No ☰ button from 768px: never leave an open menu behind (phone turned sideways). */
@media screen and (min-width: 768px) {
	#mobile-navigation,
	#mobile-navigation-height-col {
		display: none !important;
	}
}

/* ---------- 7c. WP admin toolbar (logged-in admins only) – since 2.18.2 ----------
   783px+: when its items wrap to a second row (below ~1260px) the toolbar
   grows to that height and pushes the page down instead of covering the
   pink bar (.gpl-ab-tall / --gpl-ab-h set by gpl-header.js).
   600px and below: the toolbar stays at the very top instead of covering
   the logo (--gpl-ab-shift). */
@media screen and (min-width: 783px) {
	html.gpl-ab-tall #wpadminbar {
		height: auto;
		min-height: 32px;
	}
	html.gpl-ab-tall #wpadminbar .quicklinks {
		display: flow-root;
	}
	html.gpl-ab-tall {
		margin-top: var(--gpl-ab-h, 32px) !important;
	}
	html.gpl-ab-tall body.admin-bar #masthead.site-header.gpl-header {
		--gplh-admin: var(--gpl-ab-h, 32px);
	}
}
@media screen and (max-width: 600px) {
	body.admin-bar #wpadminbar {
		top: var(--gpl-ab-shift, 0px);
	}
}

/* ---------- 8. Print: plain, not sticky ---------- */
@media print {
	#masthead.site-header.gpl-header {
		position: static;
		box-shadow: none;
	}
	#masthead.gpl-header .gpl-header__tools,
	.gpl-hsearch-item,
	.gpl-search-sheet {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	#masthead.site-header.gpl-header,
	#masthead.gpl-header *,
	.gpl-search * {
		transition: none !important;
	}
}
