/* ECD Live Search — results panel under the header search input.
   Colours come from the site's design-system variables (--ecd-*), all AA on white:
   ink #0f1c14 (18.5:1), ink-faint #5c6b56 (5.6:1), green-600 #0e5a30 (8.4:1). */

.ecd-ls-host {
	position: relative;
}

/* While results are showing, lift Breakdance's centred search bar towards the top so the panel has room. */
.search-form__lightbox.ecd-ls-open {
	align-items: flex-start !important;
	padding-top: 12vh !important;
}

.ecd-ls {
	position: absolute;
	z-index: 30;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	max-height: min(70vh, 640px);
	overflow-y: auto;
	background: var(--ecd-white, #fff);
	color: var(--ecd-ink, #0f1c14);
	border: 1px solid var(--ecd-sand-200, #e2d9c1);
	border-radius: 6px;
	box-shadow: 0 18px 40px rgba(8, 26, 18, 0.28);
	font-family: inherit;
	font-size: 0.95rem;
	line-height: 1.35;
	text-align: left;
	padding: 6px;
}

.ecd-ls[hidden] {
	display: none;
}

.ecd-ls__group + .ecd-ls__group {
	border-top: 1px solid var(--ecd-sand-100, #ede7d6);
	margin-top: 4px;
	padding-top: 4px;
}

.ecd-ls__label {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ecd-ink-soft, #3a4a35);
	padding: 8px 10px 4px;
}

.ecd-ls__item,
.ecd-ls__cat,
.ecd-ls__more {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 8px 10px;
	border-radius: 4px;
	color: var(--ecd-ink, #0f1c14);
	text-decoration: none;
}

.ecd-ls__item:hover,
.ecd-ls__item:focus,
.ecd-ls__cat:hover,
.ecd-ls__cat:focus,
.ecd-ls__more:hover,
.ecd-ls__more:focus,
.ecd-ls [role="option"].is-active {
	background: var(--ecd-green-100, #d8e7dc);
	outline: none;
}

.ecd-ls__thumb {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border-radius: 4px;
	background: var(--ecd-sand-50, #f6f3ea);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ecd-ls__thumb img {
	width: 48px;
	height: 48px;
	object-fit: contain;
	display: block;
}

.ecd-ls__body {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ecd-ls__name,
.ecd-ls__cat-name {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ecd-ls__meta {
	font-size: 0.8rem;
	color: var(--ecd-ink-faint, #5c6b56);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ecd-ls__price {
	flex: 0 0 auto;
	font-weight: 700;
	white-space: nowrap;
	color: var(--ecd-green-700, #0d4f2b);
}

.ecd-ls__cat {
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	background: var(--ecd-green-50, #eef4ef);
	margin-bottom: 4px;
}

.ecd-ls__cat-name::before {
	content: "→ ";
	color: var(--ecd-green-600, #0e5a30);
}

.ecd-ls__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 2px 10px 8px;
}

.ecd-ls__chip {
	font: inherit;
	font-size: 0.85rem;
	font-weight: 600;
	min-height: 36px;
	padding: 6px 12px;
	border-radius: 999px;
	border: 1px solid var(--ecd-green-600, #0e5a30);
	background: var(--ecd-white, #fff);
	color: var(--ecd-green-700, #0d4f2b);
	cursor: pointer;
}

.ecd-ls__chip:hover,
.ecd-ls__chip:focus-visible {
	background: var(--ecd-green-600, #0e5a30);
	color: #fff;
	outline: none;
}

.ecd-ls__chip-n {
	font-weight: 400;
	opacity: 0.85;
}

.ecd-ls__more {
	justify-content: center;
	font-weight: 600;
	color: var(--ecd-green-700, #0d4f2b);
	border-top: 1px solid var(--ecd-sand-100, #ede7d6);
	margin-top: 4px;
	border-radius: 0 0 4px 4px;
}

.ecd-ls__empty {
	padding: 14px 12px;
	color: var(--ecd-ink-faint, #5c6b56);
}

.ecd-ls-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@media (max-width: 640px) {
	.ecd-ls {
		max-height: 60vh;
		font-size: 0.9rem;
	}
	.ecd-ls__price {
		display: none;
	}
}
