/*
 * The site header's search box - its dropdown (2026-11-20, live 2026-11-23).
 * ----------------------------------------------------------------------------
 * Drawn by scripts/site-search.js under every .hx-search. Scoped under
 * `.override .hx` like styles/site-header.css, so the site's own sheets cannot
 * reach in.
 * Colour comes from the bar's own tokens: --hx-acc is the theme's button
 * colour (a white label seller's too), used for the few things that should
 * read as "go": the See All row.
 *
 * The look follows the Soft Pill box's "expensive but comfortable" brief (owner,
 * 2026-11-20): white, generous, soft long shadows, thin line icons, one quiet
 * grey for the row under the pointer, and the lots on a pale shelf of their
 * own so the eye can tell words from things at a glance.
 */

.override .hx .hx-search { position: relative; }

/* ---------------------------------------------------------------- panel --- */
.override .hx .hx-ac {
	--ac-ink: #101317;
	--ac-ink-2: #3D444E;
	--ac-mut: #80868E;
	--ac-line: #EEF0F2;
	--ac-wash: #F2F3F5;
	--ac-shelf: #F7F8FA;
	--ac-go: color-mix(in srgb, var(--hx-acc, #00a65a) 74%, #000);
	position: absolute;
	top: calc(100% + 10px);
	left: 0;
	z-index: 30;
	width: max(100%, 680px);
	max-height: min(660px, calc(100vh - var(--ac-top, 140px) - 18px));
	max-height: min(660px, calc(100dvh - var(--ac-top, 140px) - 18px));
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 8px;
	border-radius: 22px;
	background: #fff;
	color: var(--ac-ink);
	box-shadow: 0 0 0 1px rgba(16, 19, 23, .06), 0 2px 6px rgba(16, 19, 23, .05), 0 30px 60px -20px rgba(16, 19, 23, .32);
	font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 15px;
	line-height: 1.35;
	text-align: left;
	opacity: 0;
	transform: translateY(-6px);
	transform-origin: 50% 0;
	transition: opacity .14s ease, transform .18s cubic-bezier(.2, .8, .2, 1);
	container-type: inline-size;
	scrollbar-width: thin;
}
.override .hx .hx-ac[hidden] { display: none; }
.override .hx .hx-ac.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.override .hx .hx-ac { transition: opacity .1s linear; transform: none; }
}

/* The box sits above the page's other bits while its panel is open, so the two read as one piece. */
.override .hx .hx-search.is-ac-open { z-index: 2; }

/* A slow answer: a thin sweep along the top edge. Most answers come before it can show. */
.override .hx .hx-ac.is-busy::before {
	content: "";
	position: sticky;
	top: -8px;
	display: block;
	height: 2px;
	margin: -8px 14px 6px;
	border-radius: 2px;
	background: linear-gradient(90deg, transparent, var(--hx-acc, #00a65a), transparent) 0 0 / 40% 100% no-repeat;
	animation: hxac-sweep 1s linear infinite;
}
@keyframes hxac-sweep { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* ------------------------------------------------------------- columns --- */
.override .hx .hx-ac__cols {
	display: grid;
	grid-template-columns: minmax(0, .92fr) minmax(0, 1.28fr);
	gap: 8px;
	align-items: start;
}
.override .hx .hx-ac__col--l,
.override .hx .hx-ac__one--lots {
	padding: 0 6px 6px;
	border-radius: 16px;
	background: var(--ac-shelf);
}
@container (max-width: 620px) {
	.override .hx .hx-ac__cols { grid-template-columns: minmax(0, 1fr); }
}

/* -------------------------------------------------------------- headings --- */
.override .hx .hx-ac__h {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 38px;
	padding: 10px 12px 4px;
	color: var(--ac-mut);
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
}
.override .hx .hx-ac__n {
	letter-spacing: 0;
	text-transform: none;
	font-size: 12.5px;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}
.override .hx .hx-ac__clear {
	margin: -6px -6px -6px 0;
	padding: 6px 8px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--ac-go);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
}
.override .hx .hx-ac__clear:hover { background: var(--ac-wash); }

/* ------------------------------------------------------------------ rows --- */
.override .hx .hx-ac__row {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 0 6px 0 12px;
	border-radius: 12px;
	color: var(--ac-ink-2);
	font-size: 15.5px;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.override .hx .hx-ac__row.is-active { background: var(--ac-wash); }
.override .hx .hx-ac__ico {
	flex: 0 0 auto;
	display: inline-flex;
	color: #9AA0A6;
	transition: color .12s ease;
}
.override .hx .hx-ac__ico svg,
.override .hx .hx-ac__fill svg,
.override .hx .hx-ac__rm svg,
.override .hx .hx-ac__go svg,
.override .hx .hx-ac__img svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.override .hx .hx-ac__row.is-active .hx-ac__ico { color: var(--ac-ink); }
.override .hx .hx-ac__t {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.override .hx .hx-ac__t b { color: var(--ac-ink); font-weight: 650; }
.override .hx .hx-ac__row--recent .hx-ac__t { color: var(--ac-ink); }
.override .hx .hx-ac__row--fix .hx-ac__ico { color: var(--ac-go); }

/* The row's own small button: put the phrase in the box to keep typing, or forget a search. */
.override .hx .hx-ac__fill,
.override .hx .hx-ac__rm {
	flex: 0 0 auto;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #9AA0A6;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	cursor: pointer;
	transition: opacity .12s ease, background-color .12s ease, color .12s ease;
}
.override .hx .hx-ac__rm svg { width: 16px; height: 16px; }
.override .hx .hx-ac__row:hover .hx-ac__fill,
.override .hx .hx-ac__row.is-active .hx-ac__fill,
.override .hx .hx-ac__row:hover .hx-ac__rm,
.override .hx .hx-ac__row.is-active .hx-ac__rm { opacity: 1; }
.override .hx .hx-ac__fill:hover,
.override .hx .hx-ac__rm:hover { background: #E4E6E9; color: var(--ac-ink); }
@media (hover: none) {
	.override .hx .hx-ac__fill,
	.override .hx .hx-ac__rm { opacity: 1; }
}

/* ----------------------------------------------------------------- chips --- */
.override .hx .hx-ac a.hx-ac__chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 36px;
	padding: 0 15px 0 12px;
	border-radius: 999px;
	background: #fff;
	box-shadow: inset 0 0 0 1px #E3E5E8;
	color: var(--ac-ink);
	font-size: 14.5px;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .12s ease, box-shadow .12s ease;
}
.override .hx .hx-ac a.hx-ac__chip:hover,
.override .hx .hx-ac a.hx-ac__chip.is-active { background: var(--ac-wash); box-shadow: inset 0 0 0 1px #D3D6DA; color: var(--ac-ink); text-decoration: none; }
.override .hx .hx-ac a.hx-ac__chip--sm { height: 30px; padding: 0 12px; font-size: 13.5px; }
.override .hx .hx-ac__rel {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 6px 0 2px;
	padding: 10px 12px 8px;
	border-top: 1px solid var(--ac-line);
	color: var(--ac-mut);
	font-size: 13px;
}
.override .hx .hx-ac__rel > .hx-ac__ico { color: var(--hx-acc, #00a65a); }
.override .hx .hx-ac__rel > .hx-ac__ico svg { width: 16px; height: 16px; }

/* ------------------------------------------------------------------ lots --- */
.override .hx .hx-ac a.hx-ac__lot {
	display: grid;
	grid-template-columns: 58px minmax(0, 1fr) auto;
	align-items: center;
	gap: 13px;
	padding: 8px 12px 8px 8px;
	border-radius: 14px;
	color: var(--ac-ink);
	text-decoration: none;
	transition: background-color .12s ease, box-shadow .12s ease;
	-webkit-tap-highlight-color: transparent;
}
.override .hx .hx-ac a.hx-ac__lot.is-active {
	background: #fff;
	box-shadow: 0 1px 2px rgba(16, 19, 23, .06), 0 10px 24px -12px rgba(16, 19, 23, .28);
	color: var(--ac-ink);
	text-decoration: none;
}
.override .hx .hx-ac__img {
	position: relative;
	display: block;
	width: 58px;
	height: 58px;
	overflow: hidden;
	border-radius: 12px;
	background: #E9EBEE;
	box-shadow: inset 0 0 0 1px rgba(16, 19, 23, .04);
}
.override .hx .hx-ac__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.override .hx .hx-ac__img svg { position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; color: #A9AFB6; stroke-width: 1.5; display: none; }
.override .hx .hx-ac__img.is-none svg { display: block; }
.override .hx .hx-ac__lt { display: block; min-width: 0; }
.override .hx .hx-ac__title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 14.5px;
	font-weight: 500;
	line-height: 1.3;
}
.override .hx .hx-ac__title mark { padding: 0; background: none; color: inherit; font-weight: 700; }
.override .hx .hx-ac__meta {
	display: block;
	margin-top: 3px;
	overflow: hidden;
	color: var(--ac-mut);
	font-size: 12.5px;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.override .hx .hx-ac__meta i { font-style: normal; padding: 0 2px; }
.override .hx .hx-ac__price { text-align: right; white-space: nowrap; }
.override .hx .hx-ac__price b { display: block; font-size: 15.5px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.override .hx .hx-ac__price i { display: block; margin-top: 2px; color: var(--ac-mut); font-size: 11.5px; font-style: normal; }

/* -------------------------------------------------------------- see all --- */
.override .hx .hx-ac a.hx-ac__all {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 46px;
	margin-top: 4px;
	padding: 0 10px 0 14px;
	border-radius: 12px;
	color: var(--ac-go);
	font-size: 14.5px;
	font-weight: 600;
	text-decoration: none;
}
.override .hx .hx-ac a.hx-ac__all b { font-weight: 800; }
.override .hx .hx-ac a.hx-ac__all:hover,
.override .hx .hx-ac a.hx-ac__all.is-active {
	background: color-mix(in srgb, var(--hx-acc, #00a65a) 10%, #fff);
	color: var(--ac-go);
	text-decoration: none;
}
.override .hx .hx-ac__go {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	transition: transform .15s ease;
}
.override .hx .hx-ac__go svg { stroke-width: 2; }
.override .hx .hx-ac a.hx-ac__all:hover .hx-ac__go,
.override .hx .hx-ac a.hx-ac__all.is-active .hx-ac__go { transform: translateX(3px); }

/* ------------------------------------------------------------- nothing --- */
.override .hx .hx-ac__none { padding: 16px 14px 8px; }
.override .hx .hx-ac__none b { display: block; font-size: 15.5px; font-weight: 650; color: var(--ac-ink); }
.override .hx .hx-ac__none span { display: block; margin-top: 4px; color: #6A7078; font-size: 14px; }
.override .hx .hx-ac__hint { margin: 0; padding: 14px; color: #6A7078; font-size: 14px; }

/* ------------------------------------------------------------- the keys --- */
.override .hx .hx-ac__keys {
	display: flex;
	justify-content: flex-end;
	gap: 16px;
	margin-top: 6px;
	padding: 9px 12px 3px;
	border-top: 1px solid var(--ac-line);
	color: #9AA0A6;
	font-size: 11.5px;
}
.override .hx .hx-ac__keys kbd {
	display: inline-block;
	min-width: 20px;
	margin-right: 3px;
	padding: 1px 5px;
	border-radius: 5px;
	background: var(--ac-wash);
	box-shadow: inset 0 -1px 0 #DCDFE3;
	color: #5B626B;
	font: inherit;
	font-size: 11px;
	text-align: center;
}

/* --------------------------------------------------- tablet and phone --- */
/* The box sits in a row of its own: the panel runs across the screen, ten pixels in from
   each side (site-search.js measures --ac-l / --ac-r from the box), and no further down than the
   screen goes, scrolling inside itself. */
@media (max-width: 1200px) {
	.override .hx .hx-row--compact .hx-ac {
		left: var(--ac-l, 0);
		right: var(--ac-r, 0);
		width: auto;
		top: calc(100% + 8px);
		padding: 6px;
		border-radius: 18px;
	}
	.override .hx .hx-ac__row { min-height: 48px; font-size: 16px; }
	.override .hx .hx-ac a.hx-ac__lot { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 11px; }
	.override .hx .hx-ac__img { width: 52px; height: 52px; }
	.override .hx .hx-ac__keys { display: none; }
}
@media (max-width: 420px) {
	.override .hx .hx-ac a.hx-ac__lot { grid-template-columns: 48px minmax(0, 1fr); }
	.override .hx .hx-ac__img { width: 48px; height: 48px; }
	.override .hx .hx-ac__price { grid-column: 2; text-align: left; display: flex; align-items: baseline; gap: 6px; margin-top: -4px; }
	.override .hx .hx-ac__price i { margin: 0; }
}
