/* Suggestions are anchored to the existing form and never resize the header. */
form[data-faradoran-live-search] {
	position: relative;
}

.faradoran-live-search {
	position: absolute;
	z-index: var(--faradoran-theme-z-header-dropdown);
	inset-block-start: calc(100% + var(--faradoran-theme-space-1));
	inset-inline: 0;
	max-block-size: min(20rem, var(--faradoran-live-search-available, 45vh));
	overflow: auto;
	overscroll-behavior: contain;
	padding: var(--faradoran-theme-space-1);
	border: 1px solid var(--faradoran-theme-color-border);
	border-radius: var(--faradoran-theme-radius-md);
	background: var(--faradoran-theme-color-white);
	color: var(--faradoran-theme-color-text);
	box-shadow: var(--faradoran-theme-shadow-md);
	text-align: start;
}

.faradoran-live-search[hidden],
.faradoran-live-search__message[hidden] {
	display: none;
}

.faradoran-live-search__message,
.faradoran-live-search__option {
	padding: var(--faradoran-theme-space-2);
	font-size: var(--faradoran-theme-font-size-sm);
	overflow-wrap: anywhere;
}

.faradoran-live-search__message {
	color: var(--faradoran-theme-color-text-muted);
}

.faradoran-live-search__option {
	display: flex;
	align-items: center;
	gap: var(--faradoran-theme-space-2);
	min-block-size: 44px;
	border-radius: var(--faradoran-theme-radius-sm);
	color: inherit;
	text-decoration: none;
}

.faradoran-live-search__option:hover,
.faradoran-live-search__option:focus-visible,
.faradoran-live-search__option[aria-selected="true"] {
	outline: 1px solid currentColor;
	outline-offset: -1px;
	background: var(--faradoran-theme-color-surface);
	color: var(--faradoran-theme-color-text);
}

.faradoran-live-search__option bdi {
	min-inline-size: 0;
}

.faradoran-live-search__option--all {
	border-block-start: 1px solid var(--faradoran-theme-color-border);
}

.faradoran-live-search__thumbnail {
	flex: 0 0 var(--faradoran-theme-space-10);
	block-size: var(--faradoran-theme-space-10);
	overflow: hidden;
	border-radius: var(--faradoran-theme-radius-sm);
	background: var(--faradoran-theme-color-surface);
}

.faradoran-live-search__thumbnail img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
}

.faradoran-mobile-product-search__inner:has(.faradoran-live-search:not([hidden])) .faradoran-mobile-product-search__helper {
	visibility: hidden;
}

.faradoran-mobile-panel__search [data-faradoran-live-search] {
	flex-wrap: wrap;
}

.faradoran-mobile-panel__search .faradoran-live-search {
	position: static;
	flex: 0 0 100%;
}

.faradoran-live-search-fallback {
	display: none;
}

@media (max-width: 63.99rem) {
	html:not(.faradoran-js) .faradoran-live-search-fallback {
		display: block;
	}

	html:not(.faradoran-js) .faradoran-site-header:has(.faradoran-live-search-fallback) .faradoran-header-action--search-toggle {
		display: none;
	}
}
