/**
 * Search results.
 *
 * ⚠️ NO FIGMA FRAME. Assembled from vocabulary the site already owns so it does
 * not read as a different product: the error-page hero wash and pill field, the
 * glass-bordered card from the hubs, the standard chip and the blue eyebrow.
 * Swap it out when a frame exists; nothing else depends on these classes.
 */

body.search {
	background: var(--xc-rich-black);
	color: var(--xc-off-white);
	font-family: var(--xc-body);
	-webkit-font-smoothing: antialiased;
}

.srch-page {
	background: var(--xc-rich-black);
	color: var(--xc-off-white);
	overflow-x: clip;
	max-width: 100%;
}

.srch-page .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ---------- Hero ---------- */

.srch-hero {
	position: relative;
	overflow: hidden;
	padding-block: 72px 40px;
	background: var(--xc-rich-black);
}

/* Same wash as the error hero, half the height — this page has a job to get on
   with, so the glow is an echo rather than the main event. */
.srch-hero::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 0;
	width: 1004px;
	height: 620px;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	background: radial-gradient(
		closest-side,
		rgba(26, 156, 252, .12) 0%,
		rgba(26, 156, 252, 0) 65%
	);
	pointer-events: none;
}

.srch-hero__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	text-align: center;
}

.srch-hero__eyebrow {
	margin: 0;
	font-size: 14px;
	line-height: 1;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--xc-bright-blue);
}

.srch-hero__title {
	margin: 0;
	max-width: 900px;
	font-family: var(--xc-display);
	font-weight: 800;
	font-size: 44px;
	line-height: 1.05;
	color: var(--xc-off-white);
	/* A long query must wrap, not stretch the page. */
	overflow-wrap: anywhere;
}

.srch-hero__term { color: var(--xc-bright-blue); }

.srch-hero__count {
	margin: 0;
	font-size: 14px;
	line-height: 1.25;
	color: var(--xc-slate);
}

/* Same pill as the 404's field — one search control on the site, not two. */
.srch-form {
	display: flex;
	align-items: center;
	gap: 8px;
	box-sizing: border-box;
	width: 100%;
	max-width: 640px;
	margin-top: 8px;
	padding: 11px 11px 11px 21px;
	border: 1px solid rgba(255, 255, 255, .1);
	border-radius: var(--xc-pill);
	background: rgba(249, 253, 255, .05);
}

.srch-form:focus-within {
	border-color: var(--xc-bright-blue);
	box-shadow: 0 0 0 1px rgba(26, 156, 252, .35);
}

.srch-form__field {
	flex: 1 1 auto;
	min-width: 0;
	padding: 0;
	border: 0;
	background: none;
	font-family: var(--xc-body);
	font-size: 16px;
	line-height: 1.25;
	color: var(--xc-off-white);
	text-align: left;
}

/* The pill carries the focus ring; an outline here would draw a rectangle
   inside it. */
.srch-form__field:focus,
.srch-form__field:focus-visible { outline: none; }

.srch-form__field::placeholder {
	color: var(--xc-soft-white);
	opacity: 1;
}

/* The clear (x) button is styled once, for every search field on the site, in
   base.css. A `filter: invert(1)` here would flip that off-white back to black. */

.srch-form__submit {
	flex: 0 0 auto;
	padding: 11px 22px;
	border: 0;
	border-radius: var(--xc-pill);
	background: var(--xc-true-blue);
	font-family: var(--xc-display);
	font-weight: 700;
	font-size: 16px;
	line-height: 1;
	color: var(--xc-white);
	cursor: pointer;
	transition: background-color .18s ease;
}

.srch-form__submit:hover { background: var(--xc-primary-hover); }

/* ---------- Results ---------- */

.srch-results { padding-block: 8px 64px; }

.srch-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
	width: 100%;
	max-width: 820px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.srch-item {
	position: relative;
	box-sizing: border-box;
	padding: 20px 24px;
	border-radius: 16px;
	background: rgba(255, 255, 255, .02);
	transition: background-color .18s ease;
}

.srch-item:hover { background: rgba(255, 255, 255, .045); }

.srch-item__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px 10px;
	margin: 0 0 8px;
}

.srch-item__chip {
	display: inline-flex;
	align-items: center;
	padding: 5px 11px;
	border: 1px solid rgba(26, 156, 252, .35);
	border-radius: var(--xc-pill);
	background: rgba(26, 156, 252, .1);
	font-family: var(--xc-display);
	font-weight: 700;
	font-size: 12px;
	line-height: 1;
	letter-spacing: .3px;
	color: var(--xc-bright-blue);
	white-space: nowrap;
}

.srch-item__path {
	font-size: 12px;
	line-height: 1.25;
	color: var(--xc-slate);
	overflow-wrap: anywhere;
}

.srch-item__title {
	margin: 0;
	font-family: var(--xc-display);
	font-weight: 700;
	font-size: 20px;
	line-height: 1.2;
	color: var(--xc-off-white);
}

.srch-item__title a {
	color: inherit;
	text-decoration: none;
}

/* The whole card is the click target, but there is still exactly ONE link per
   result and its accessible name is the title — the pattern the careers cards
   use. */
.srch-item__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.srch-item__title a:hover { color: var(--xc-bright-blue); }

.srch-item:focus-within {
	outline: 2px solid var(--xc-bright-blue);
	outline-offset: 2px;
}

.srch-item__title a:focus-visible { outline: none; }

.srch-item__excerpt {
	margin: 8px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--xc-nav-ink);
}

/* ---------- Pagination ---------- */

.srch-pager {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px 12px;
	max-width: 820px;
	margin: 32px auto 0;
}

.srch-pager__pages {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.srch-pager__step,
.srch-pager__page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 38px;
	height: 38px;
	padding: 0 14px;
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: var(--xc-pill);
	background: rgba(255, 255, 255, .02);
	font-family: var(--xc-display);
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
	color: var(--xc-nav-ink);
	text-decoration: none;
	transition: border-color .18s ease, color .18s ease;
}

.srch-pager__page { padding: 0 10px; }

a.srch-pager__step:hover,
a.srch-pager__page:hover {
	border-color: rgba(255, 255, 255, .24);
	color: var(--xc-off-white);
}

.srch-pager__page.is-current {
	border-color: transparent;
	background: var(--xc-true-blue);
	color: var(--xc-white);
}

.srch-pager__step.is-off {
	opacity: .35;
	cursor: default;
}

/* ---------- Empty state ---------- */

.srch-empty {
	box-sizing: border-box;
	max-width: 640px;
	margin: 0 auto;
	padding: 32px 28px 28px;
	border-radius: 16px;
	background: rgba(255, 255, 255, .02);
	text-align: center;
}

.srch-empty__title {
	margin: 0;
	font-family: var(--xc-display);
	font-weight: 800;
	font-size: 24px;
	line-height: 1.1;
	color: var(--xc-off-white);
}

.srch-empty__body {
	margin: 10px 0 0;
	font-size: 14px;
	line-height: 1.4;
	color: var(--xc-nav-ink);
}

.srch-empty__pills {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.srch-empty__pills a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 11px 17px;
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: var(--xc-pill);
	background: rgba(255, 255, 255, .02);
	font-family: var(--xc-display);
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
	color: var(--xc-nav-ink);
	text-decoration: none;
	transition: border-color .18s ease, color .18s ease;
}

.srch-empty__pills a:hover {
	border-color: rgba(255, 255, 255, .24);
	color: var(--xc-off-white);
}

.srch-empty__fine {
	margin: 20px 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: var(--xc-slate);
}

.srch-empty__fine a {
	color: var(--xc-bright-blue);
	text-decoration: none;
}

.srch-empty__fine a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
	.srch-hero { padding-block: 48px 32px; }
	.srch-hero__title { font-size: 34px; }
}

@media (max-width: 640px) {
	.srch-hero { padding-block: 36px 24px; }

	.srch-hero::before {
		width: 806px;
		height: 460px;
	}

	.srch-hero__eyebrow { font-size: 13px; }
	.srch-hero__title { font-size: 24px; }

	.srch-form { padding: 7px 7px 7px 17px; }
	.srch-form__submit { padding: 10px 18px; }

	.srch-results { padding-block: 4px 48px; }

	.srch-item { padding: 18px 18px; }
	.srch-item__title { font-size: 18px; }

	.srch-empty { padding: 28px 20px 24px; }
}

@media (prefers-reduced-motion: reduce) {
	.srch-item,
	.srch-form__submit,
	.srch-pager__step,
	.srch-pager__page,
	.srch-empty__pills a { transition: none; }
}
