/* ==========================================================================
   POC Site Search — mobile-first, full-screen centered lightbox + header trigger
   Brand: orange #faab48, navy #283443
   Scoped under .poc-* so it can't collide with theme styles.
   ========================================================================== */

:root {
	--poc-orange: #faab48;
	--poc-navy: #283443;
	--poc-ink: #283443;
	--poc-muted: #5b6675;
	--poc-line: #e7e9ee;
	--poc-bg: #ffffff;
}

/* --------------------------------------------------------------------------
   Trigger (header magnifier)
   Desktop (>=1280): a menu item between Contact and the language picker.
   Mobile/tablet (<1280): a top-bar icon left of the burger.
   The nav is white-text on this site, so the icon is white to match.
   -------------------------------------------------------------------------- */
.poc-search-li { display: flex; align-items: center; }

.poc-search-trigger {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;            /* full 44px tap target on touch */
	height: 44px;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	color: #fff;            /* matches the white nav links */
	cursor: pointer;
	border-radius: 50%;
	line-height: 0;
	transition: color .15s ease, transform .15s ease;
}
.poc-search-trigger:hover,
.poc-search-trigger:focus-visible { color: var(--poc-orange); }
.poc-search-trigger:focus-visible { outline: 2px solid var(--poc-orange); outline-offset: 2px; }
.poc-search-trigger:active { transform: scale(.92); }
.poc-search-trigger svg { width: 22px; height: 22px; pointer-events: none; }

/* Safety: if a light (non white-text) header is ever used, go dark to stay visible. */
.navigation:not(.white-logo-white-text) .poc-search-trigger { color: var(--poc-navy); }

/* Mobile trigger sits with the burger at the top-right; theme breaks at 1280. */
.poc-search-trigger--mob {
	display: none;
	margin-left: auto;
	margin-right: 6px;
	z-index: 1003;
}
@media (max-width: 1279px) {
	.poc-search-li { display: none; }              /* hide desktop menu-item version */
	.poc-search-trigger--mob { display: inline-flex; }
}

/* --------------------------------------------------------------------------
   Full-screen, centered overlay. Backdrop is translucent so the page behind
   stays faintly visible.
   -------------------------------------------------------------------------- */
.poc-search[hidden] { display: none; }

.poc-search {
	position: fixed;
	inset: 0;
	z-index: 100000;        /* above sticky header */
	display: flex;
	align-items: center;     /* vertical centre */
	justify-content: center; /* horizontal centre */
	padding: 24px;
}

.poc-search__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(40, 52, 67, .98);   /* dark enough to focus the UI; page still faintly visible */
	opacity: 0;
	transition: opacity .2s ease;
}
.poc-search.is-open .poc-search__backdrop { opacity: 1; }

/* Centred content column. Transparent on purpose so the backdrop frames it. */
.poc-search__panel {
	position: relative;
	width: 100%;
	max-width: 680px;
	max-height: 86vh;
	display: flex;
	flex-direction: column;
	transform: translateY(-10px);
	opacity: 0;
	transition: transform .22s ease, opacity .22s ease;
}
.poc-search.is-open .poc-search__panel { transform: translateY(0); opacity: 1; }

/* --------------------------------------------------------------------------
   Search bar — transparent, white text, sits over the see-through backdrop
   -------------------------------------------------------------------------- */
.poc-search__bar {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 4px 4px 16px;
	border-bottom: 2px solid rgba(255, 255, 255, .45);
	flex: 0 0 auto;
}
.poc-search__icon {
	display: inline-flex;
	color: var(--poc-orange);
	flex: 0 0 auto;
}
/* High specificity + !important to beat the theme's global input[type=search]
   rule, which forces a border, padding and a 32px bottom margin. */
.poc-search .poc-search__input {
	-webkit-appearance: none;
	appearance: none;
	flex: 1 1 auto;
	min-width: 0;
	height: auto;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: #fff;
	font-size: 20px;        /* >=16px so iOS never zooms on focus */
	line-height: 1.3;
	padding: 6px 2px !important;
	margin: 0 !important;   /* kill the theme's 0 0 32px margin */
	font-family: inherit;
}
.poc-search__input::placeholder { color: rgba(255, 255, 255, .72); opacity: 1; }
.poc-search__input:focus { outline: none; }
.poc-search__input::-webkit-search-decoration,
.poc-search__input::-webkit-search-cancel-button { -webkit-appearance: none; }

.poc-search__close {
	-webkit-appearance: none;
	appearance: none;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	border-radius: 50%;
	line-height: 0;
}
.poc-search__close:hover { color: var(--poc-orange); }
.poc-search__close:focus-visible { outline: 2px solid var(--poc-orange); outline-offset: 2px; }

/* --------------------------------------------------------------------------
   Results — white card ONLY when there are matches, so the empty/typing state
   keeps the page visible behind. Hint / loading / empty are white text.
   -------------------------------------------------------------------------- */
.poc-search__results {
	margin-top: 16px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior: contain;
	flex: 1 1 auto;
	min-height: 0;
}
.poc-search__results.poc-has-card {
	background: var(--poc-bg);
	border-radius: 14px;
	box-shadow: 0 22px 60px rgba(40, 52, 67, .4);
	overflow: hidden;
	overflow-y: auto;
}

.poc-search__hint,
.poc-search__empty,
.poc-search__loading {
	padding: 18px 6px;
	color: #fff;
	font-size: 15px;
}
.poc-search__loading { display: flex; align-items: center; gap: 10px; }
.poc-search__empty strong { color: #fff; }

.poc-search__item {
	display: block;
	padding: 14px 18px;
	border-bottom: 1px solid var(--poc-line);
	color: var(--poc-ink);
	text-decoration: none;
	min-height: 44px;
}
.poc-search__item:last-of-type { border-bottom: 0; }
.poc-search__item:hover,
.poc-search__item:focus,
.poc-search__item.is-active { background: #fbf6ef; outline: none; }

.poc-search__badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #8a5a12;
	background: rgba(250, 171, 72, .18);
	padding: 2px 8px;
	border-radius: 999px;
	margin-bottom: 6px;
}
.poc-search__title {
	display: block;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--poc-navy);
}
.poc-search__excerpt {
	display: block;
	margin-top: 3px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--poc-muted);
}
mark.poc-search__mark { background: rgba(250, 171, 72, .35); color: inherit; padding: 0 1px; border-radius: 2px; }

.poc-search__all {
	display: block;
	text-align: center;
	padding: 16px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: var(--poc-navy);
	text-decoration: none;
	background: #f7f8fa;
	border-top: 1px solid var(--poc-line);
}
.poc-search__all:hover { color: var(--poc-orange); }

.poc-search__spinner {
	width: 18px; height: 18px; flex: 0 0 auto;
	border: 2px solid rgba(255, 255, 255, .35);
	border-top-color: var(--poc-orange);
	border-radius: 50%;
	animation: poc-spin .7s linear infinite;
}
@keyframes poc-spin { to { transform: rotate(360deg); } }

/* lock background scroll when open */
body.poc-search-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   Larger type on bigger screens
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
	.poc-search__input { font-size: 24px; }
	.poc-search__results.poc-has-card { max-height: 64vh; }
}

@media (prefers-reduced-motion: reduce) {
	.poc-search__backdrop,
	.poc-search__panel { transition: none; }
	.poc-search__spinner { animation: none; }
}
