/* LAFU Search: results panel, voice and camera buttons, the [lafu_search] box.
   Everything is prefixed. Colours come from the theme (set by search.js). */

.lafu-sp {
	position: fixed;
	z-index: 2147483000;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	max-height: 70vh;
	margin: 0;
	padding: 0;
	overflow: hidden;
	background: var(--lafu-sp-bg, #fff);
	color: var(--lafu-sp-fg, #1a1a1a);
	border: 1px solid var(--lafu-sp-line, rgba(0, 0, 0, .12));
	border-radius: var(--lafu-sp-r, 12px);
	box-shadow: 0 2px 6px rgba(0, 0, 0, .06), 0 20px 44px -18px rgba(0, 0, 0, .32);
	font-size: 15px;
	line-height: 1.4;
	letter-spacing: normal;
	text-align: start;
	text-transform: none;
}

.lafu-sp[hidden],
.lafu-sp__body:empty,
.lafu-sp__note:empty,
.lafu-sp__bar {
	display: none;
}

.lafu-sp *,
.lafu-sp *::before,
.lafu-sp *::after {
	box-sizing: border-box;
}

.lafu-sp__body {
	flex: 1 1 auto;
	min-height: 0;
	padding: 6px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.lafu-sp__group + .lafu-sp__group {
	margin-top: 4px;
	padding-top: 4px;
	border-top: 1px solid var(--lafu-sp-line);
}

.lafu-sp__head {
	padding: 10px 10px 4px;
	color: var(--lafu-sp-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.lafu-sp .lafu-sp__opt {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 8px 10px;
	border: 0;
	border-radius: calc(var(--lafu-sp-r, 12px) * .6);
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	text-decoration: none;
	cursor: pointer;
}

.lafu-sp .lafu-sp__opt:hover,
.lafu-sp .lafu-sp__opt[aria-selected="true"] {
	background: var(--lafu-sp-hover, rgba(0, 0, 0, .05));
}

.lafu-sp .lafu-sp__opt[aria-selected="true"] {
	outline: 2px solid var(--lafu-sp-accent, currentColor);
	outline-offset: -2px;
}

.lafu-sp .lafu-sp__opt img,
.lafu-sp__ph {
	flex: none;
	width: 52px;
	max-width: none;
	height: 52px;
	margin: 0;
	border-radius: calc(var(--lafu-sp-r, 12px) * .5);
	background: var(--lafu-sp-hover, #f3f3f3);
	object-fit: contain;
}

.lafu-sp__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.lafu-sp__title {
	display: -webkit-box;
	overflow: hidden;
	font-weight: 500;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.lafu-sp__title mark {
	padding: 0;
	background: none;
	color: inherit;
	font-weight: 700;
}

.lafu-sp__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	font-size: 13px;
}

.lafu-sp__price {
	font-weight: 600;
}

.lafu-sp__price del,
.lafu-sp__excerpt {
	color: var(--lafu-sp-muted);
	font-weight: 400;
}

.lafu-sp__excerpt {
	overflow: hidden;
	font-size: 13px;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.lafu-sp__badge {
	padding: 1px 8px;
	border: 1px solid var(--lafu-sp-line);
	border-radius: 99px;
	color: var(--lafu-sp-muted);
	font-size: 12px;
	line-height: 1.5;
}

.lafu-sp__badge--sale {
	border-color: #b42318;
	background: #b42318;
	color: #fff;
}

.lafu-sp__opt--q svg {
	flex: none;
	color: var(--lafu-sp-muted);
}

.lafu-sp .lafu-sp__opt--term {
	justify-content: space-between;
}

.lafu-sp__foot {
	position: sticky;
	bottom: -6px;
	margin: 6px -6px -6px;
	padding: 6px;
	border-top: 1px solid var(--lafu-sp-line);
	background: var(--lafu-sp-bg, #fff);
}

.lafu-sp .lafu-sp__opt--all {
	justify-content: center;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--lafu-sp-accent, currentColor);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.lafu-sp__note {
	padding: 16px 16px 6px;
}

.lafu-sp__note p {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 10px;
}

.lafu-sp__note .lafu-sp__none {
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

.lafu-sp__none span {
	color: var(--lafu-sp-muted);
}

.lafu-sp__note .lafu-sp__understood {
	margin: 0;
	padding-bottom: 4px;
	font-size: .875em;
	color: var(--lafu-sp-muted);
}

.lafu-sp__busy::before {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	border: 2px solid var(--lafu-sp-line);
	border-top-color: var(--lafu-sp-accent, currentColor);
	border-radius: 50%;
	animation: lafu-sp-spin .8s linear infinite;
}

.lafu-sp__photo {
	font-weight: 600;
}

.lafu-sp__photo img {
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: calc(var(--lafu-sp-r, 12px) * .5);
	object-fit: cover;
}

.lafu-sp__status {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Phones: a full-screen sheet with its own search box. */
.lafu-sp.is-sheet {
	inset: 0;
	width: auto;
	height: 100%;
	max-height: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.is-sheet .lafu-sp__bar {
	display: flex;
	flex: none;
	align-items: center;
	gap: 6px;
	padding: 10px 12px;
	border-bottom: 1px solid var(--lafu-sp-line);
}

.lafu-sp .lafu-sp__close {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	box-shadow: none;
	color: inherit;
	cursor: pointer;
}

.lafu-sp .lafu-sp__input {
	flex: 1;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--lafu-sp-line);
	border-radius: 999px;
	background: var(--lafu-sp-hover, #f5f5f5);
	box-shadow: none;
	color: inherit;
	font: inherit;
	font-size: 16px;
}

.lafu-sp .lafu-sp__close:focus-visible,
.lafu-sp .lafu-sp__input:focus-visible {
	outline: 2px solid var(--lafu-sp-accent, currentColor);
	outline-offset: 2px;
}

html.lafu-sp-lock,
html.lafu-sp-lock body {
	overflow: hidden;
}

/* Nothing typed and nothing to suggest: one plain line. */
.lafu-sp .lafu-sp__hint {
	margin: 0;
	padding: 16px;
	color: var(--lafu-sp-muted, inherit);
	font-size: 14px;
}

/* The browser listens in one language at a time: pick it while it listens (shops with several languages). */
.lafu-sp .lafu-sp__langs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
}

.lafu-sp .lafu-sp__listening {
	flex: 1 1 100%;
	color: var(--lafu-sp-fg, inherit);
	font-size: 14px;
}

.lafu-sp .lafu-sp__lang {
	min-height: 44px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--lafu-sp-line, currentColor);
	border-radius: 999px;
	background: none;
	box-shadow: none;
	color: var(--lafu-sp-fg, inherit);
	font: inherit;
	font-size: 14px;
	text-transform: none;
	cursor: pointer;
}

.lafu-sp .lafu-sp__lang[aria-pressed="true"] {
	border-color: var(--lafu-sp-accent, currentColor);
	background: var(--lafu-sp-accent, currentColor);
	color: var(--lafu-sp-bg, #fff);
}

.lafu-sp .lafu-sp__lang:focus-visible {
	outline: 2px solid var(--lafu-sp-accent, currentColor);
	outline-offset: 2px;
}

/* Optional search icon in the theme's phone header (setting "Search icon in the phone header"). */
.lafu-hdr {
	display: none;
}

@media (max-width: 640px) {
	.lafu-hdr {
		display: inline-flex;
		align-items: center;
	}

	.lafu-hdr .lafu-hdr__btn {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: none;
		box-shadow: none;
		color: inherit;
		cursor: pointer;
	}
}

/* A search box we took over: the theme's own live result lists stay shut (one dropdown only). */
.lafu-took .wd-dropdown-results,
.lafu-took .live-search-results,
.lafu-took .autocomplete-suggestions,
.lafu-took .wd-search-results-wrapper,
.lafu-took .wd-search-history,
.lafu-took ~ .wd-search-results-wrapper,
.lafu-took ~ .wd-search-history,
.lafu-took ~ .wd-dropdown-results {
	display: none !important;
}

/* Microphone and camera, inside the theme's own search box. */
.lafu-si {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 3;
	display: inline-flex;
	gap: 2px;
	margin: 0;
	padding: 0;
	line-height: 0;
}

.lafu-si > .lafu-si__btn.lafu-si__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--lafu-si, 32px);
	min-width: 0;
	height: var(--lafu-si, 32px);
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font-size: inherit;
	line-height: 1;
	text-indent: 0;
	text-transform: none !important;
	letter-spacing: normal !important;
	opacity: .75;
	cursor: pointer;
	transition: opacity .15s, background-color .15s;
}

.lafu-si > .lafu-si__btn.lafu-si__btn:hover,
.lafu-si > .lafu-si__btn.lafu-si__btn:focus-visible {
	background: rgba(127, 127, 127, .16);
	opacity: 1;
}

.lafu-si > .lafu-si__btn.lafu-si__btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 1px;
}

.lafu-si > .lafu-si__btn.lafu-si__btn.is-on {
	background: #b42318;
	color: #fff;
	opacity: 1;
	animation: lafu-si-pulse 1.4s ease-out infinite;
}

.lafu-si .lafu-si__i {
	display: block;
	flex: none;
	width: var(--lafu-ic, 20px);
	height: var(--lafu-ic, 20px);
	max-width: none;
	margin: 0;
	object-fit: contain;
	pointer-events: none;
}

/* Beside the theme's form instead: round icon buttons the height of the box, in the header row. */
.lafu-si.lafu-si--out {
	position: static;
	flex: none;
	align-items: center;
	flex-wrap: wrap;
	max-width: 100%;
	margin-block: 0;
	margin-inline: 6px 0;
	vertical-align: middle;
}

.lafu-si--out > .lafu-si__btn.lafu-si__btn {
	box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .35);
}

/* A short word beside the picture when the box is wide enough (or always, by choice). */
.lafu-si__t {
	display: none;
	text-transform: none !important;
	letter-spacing: normal !important;
	font-weight: 400;
}

.lafu-si--t > .lafu-si__btn.lafu-si__btn {
	width: auto;
	padding-inline: 8px 10px;
	gap: 5px;
	border-radius: 99px;
	font-size: 13px;
	white-space: nowrap;
	box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .35);
}

.lafu-si--t .lafu-si__t {
	display: inline;
}

@keyframes lafu-si-pulse {
	0% { box-shadow: 0 0 0 0 rgba(180, 35, 24, .45); }
	100% { box-shadow: 0 0 0 10px rgba(180, 35, 24, 0); }
}

@keyframes lafu-sp-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.lafu-si > .lafu-si__btn.is-on,
	.lafu-sp__busy::before {
		animation: none;
	}
}

/* [lafu_search] box. "inherit" keeps the theme's look (low specificity), "lafu" is our own. */
.lafu-search-form {
	display: flex;
	align-items: stretch;
	gap: 8px;
	width: var(--lafu-sf-width, 100%);
	max-width: 100%;
	margin: 0;
}

.lafu-search-form__field {
	position: relative;
	display: flex;
	flex: 1;
	align-items: center;
	min-width: 0;
}

:where(.lafu-search-form) .lafu-search-form__input {
	width: 100%;
	min-width: 0;
}

.lafu-search-form .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.lafu-search-form--lafu .lafu-search-form__input {
	height: 48px;
	margin: 0;
	padding: 0 16px 0 46px;
	padding-inline: 46px 16px;
	border: 1px solid #c9c5d6;
	border-radius: 999px;
	background: #fff;
	box-shadow: none;
	color: #1a1a1a;
	font: inherit;
	font-size: 16px;
}

/* Our own box keeps its colours on every theme, also when focused: a theme's field can be see-through on a dark overlay. */
.lafu-search-form--lafu .lafu-search-form__input,
.lafu-search-form--lafu .lafu-search-form__input:hover,
.lafu-search-form--lafu .lafu-search-form__input:focus {
	background: #fff !important;
	color: #1a1a1a !important;
}

.lafu-search-form--lafu .lafu-search-form__input:focus {
	border-color: #5b4bf5;
	outline: 2px solid #5b4bf5;
	outline-offset: 1px;
}

.lafu-search-form__icon {
	position: absolute;
	inset-inline-start: 16px;
	color: #5b5b5b;
	pointer-events: none;
}

.lafu-search-form--lafu .lafu-search-form__button {
	flex: none;
	height: 48px;
	margin: 0;
	padding: 0 22px;
	border: 0;
	border-radius: 999px;
	background: #1a1a1a;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.lafu-search-form--lafu .lafu-search-form__button,
.lafu-search-form--lafu .lafu-search-form__button:focus {
	background: #1a1a1a !important;
	color: #fff !important;
}

.lafu-search-form--lafu .lafu-search-form__button:hover,
.lafu-search-form--lafu .lafu-search-form__button:focus-visible {
	background: #3b2fd0 !important;
}

.lafu-search-form--lafu .lafu-search-form__button:focus-visible {
	outline: 2px solid #3b2fd0;
	outline-offset: 2px;
}
