/* Instant search dropdown + recommended-search chips. Design tokens
   (--faqn-*) can be overridden per site in the child theme. */

.faqn-search__form {
	position: relative;
}

.faqn-search__results {
	position: absolute;
	z-index: 30;
	inset-inline: 0;
	top: 100%;
	margin: .25rem 0 0;
	padding: .25rem;
	list-style: none;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: .5rem;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
	max-height: 70vh;
	overflow-y: auto;
	/* Left-align dropdown text regardless of a centered ancestor (e.g. a
	   centered header search). Items use flex, so this only affects the
	   group labels and the empty state. */
	text-align: left;
}

.faqn-search__group {
	padding: .5rem .75rem .25rem;
	font-size: .75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	text-align: left;
	opacity: .6;
}

.faqn-search__item a {
	display: flex;
	align-items: center;
	gap: .6rem;
	padding: .5rem .75rem;
	min-height: 44px; /* tap target */
	border-radius: .375rem;
	color: var(--faqn-grey-dark, #3d3d3d); /* dark grey categories/results */
	text-decoration: none;
}

/* Company results (the "Results" group) read as the primary hit — bold. */
.faqn-search__item--name a {
	font-weight: 700;
}

.faqn-search__item a:hover,
.faqn-search__item a.is-active {
	background: var(--faqn-chip-bg-hover, rgba(0, 0, 0, .06));
}

.faqn-search__item img {
	flex: none;
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: .375rem;
}

.faqn-search__item.is-premium a {
	background: var(--faqn-premium-bg, rgba(232, 163, 61, .12));
}

.faqn-search__subtitle {
	font-style: normal;
	font-size: .8125rem;
	font-weight: 400; /* stay light even inside a bold result name */
	opacity: .6; /* grey against the dark-grey text */
}

.faqn-search__count {
	font-size: .8125rem;
	opacity: .6;
}

.faqn-search__empty {
	padding: .75rem;
	opacity: .7;
}

/* Recommended searches under the bar. */

.faqn-search__recommended {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	margin-top: .75rem;
}

.faqn-search__recommended-label {
	font-size: .8125rem;
	font-weight: 600;
	opacity: .7;
	margin-inline-end: .25rem;
}

.faqn-search__chip {
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: .3rem .9rem;
	border: 1px solid var(--faqn-chip-border, rgba(0, 0, 0, .2));
	border-radius: 999px;
	background: var(--faqn-chip-bg, #ffffff);
	color: inherit;
	font: inherit;
	font-size: .9375rem;
	cursor: pointer;
}

.faqn-search__chip:hover {
	border-color: var(--faqn-chip-active-bg, #1e293b);
}
