/* Header search. The open box's width (.search.active) and the collapsed trigger
	already live in custom.css; EGDS supplies the sheet, field, action-list and
	typeahead rules. What is left is the state the old stack expresses in JSX
	rather than CSS, and the result-row typography its own search.scss carried. */

/* The trigger swaps the "/" key hint for the input while open, matching
	{isOpen ? null : <SlashIcon />} in search-box-desktop.tsx. The id is needed to
	outrank "#page-header .search-shortcut { display: block }", which custom.css
	applies from the large breakpoint up. */
#page-header .search-box-desktop .search.active .search-shortcut {
	display: none;
}

/* EGDS positions the popover from --uitk-popover-sheet-* variables that its own
	JS measures and writes inline. Nothing here runs that JS, so the sheet is
	pinned over the trigger directly — the placement those variables resolve to on
	the live site, where the sheet's box is identical to the typeahead's. The two
	grow variables are the values the live DOM carries; without them the open
	animation scales from an undefined origin. */
.search-box-desktop .search .uitk-typeahead {
	position: relative;
}

.search-box-desktop .search .uitk-popover-sheet {
	--uitk-popover-sheet-grow-x: 0px;
	--uitk-popover-sheet-grow-y: 0px;
	inline-size: 100%;
	inset-block-start: 0;
	inset-inline-start: 0;
	position: absolute;
	z-index: 100;
}

/* EGDS gives the clear button display:flex from a class, and an author rule
	outranks the UA stylesheet's [hidden] whatever its specificity, so the button
	stays visible on an empty box without this. The old stack renders it only
	while the field has a value (hasClearButton={searchTerm.length > 0}). */
.search-box-desktop .search .uitk-clear-button[hidden] {
	display: none;
}

/* EGDS sizes this input from typeahead__input__font_size, which is 28px in the
	brand theme. The live site carries the same token value and overrides the
	input and its placeholder down to 16px, so the override comes across too. */
.uitk-typeahead-menu .uitk-typeahead-input-wrapper .uitk-typeahead-input,
.uitk-typeahead-menu .uitk-typeahead-input-wrapper .uitk-typeahead-input::placeholder {
	font-size: var(--font__size__400);
}

/* The breadcrumb line, the result title and the intro all render in the same
	muted grey on the live site, which overrides EGDS's own darker
	typeahead__list_item__sub_text__text_color. No semantic token carries that
	grey — the secondary text token is the dark navy EGDS already applies — so
	this uses the palette entry the live colour resolves to. */
.uitk-typeahead-menu .search-result-location,
.uitk-typeahead-menu .uitk-typeahead-result-item.has-subtext .is-subText {
	color: var(--color__neutral__600);
	font-size: var(--font__size__300);
}

.uitk-typeahead-menu .search-result-location,
.uitk-typeahead-menu .search-result-title {
	font-weight: var(--font__weight__500);
}
