/* ============================================================
   Milau — live search results panel
   ============================================================ */

/* The form is the anchor for the panel: the results hang off the
   bottom of the search row instead of floating free on the page. */
.milau-search__form {
	position: relative;
}

.milau-search__results {
	position: absolute;
	top: 100%;
	/* The form's own 28px padding, so the sheet lines up with the
	   search field rather than with the edges of the header. */
	left: 28px;
	right: 28px;
	z-index: 5;

	background: var(--milau-panel);
	border: 1px solid var(--milau-line);
	border-radius: var( --milau-radius );
	box-shadow: 0 22px 48px -28px rgba(0,0,0,.26);

	font-family: var(--milau-sans);
	text-align: left;

	max-height: 60vh;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.milau-search__results[hidden] { display: none; }

/* ------------------------------------------------------- states */
/* One quiet line where the list is not — searching, nothing found,
   or the request failed. */
.milau-search__status {
	margin: 0;
	padding: 18px 20px;
	font-size: 11px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--milau-muted);
}

/* Chrome draws its own clear button inside a search field, in the
   browser's accent colour — the only blue left in this row, and a
   second ✗ beside the theme's own close button. The theme strips
   native chrome everywhere else, so it goes here too. */
.milau-search__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
}

/* --------------------------------------------------------- rows */
.milau-search__row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 20px;
	border-top: 1px solid var(--milau-line);
	color: var(--milau-ink);
	transition: background .15s ease, color .15s ease;
}

.milau-search__row:first-child { border-top: 0; }

/* The active row is not a black bar — the shop does not shout. It is the
   softest tint of ink, with a hairline of ink at its edge, the way a card
   lifts rather than flips. */
.milau-search__row:hover {
	background: rgba( 26, 26, 26, .04 );
}

.milau-search__row.is-active {
	background: rgba( 26, 26, 26, .07 );
	box-shadow: inset 2px 0 0 var( --milau-ink );
}

.milau-search__row:focus-visible {
	outline: 1px solid var(--milau-ink);
	outline-offset: -1px;
}

/* ----------------------------------------------------- thumbnail */
.milau-search__thumb {
	width: 56px;
	height: 56px;
	flex: none;
	display: block;
	overflow: hidden;
	background: var(--milau-soft);
	border-radius: var( --milau-radius );
}

.milau-search__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---------------------------------------------------------- text */
.milau-search__body {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.milau-search__title {
	font-size: 14px;
	line-height: 1.35;
	letter-spacing: .01em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: color .25s ease;
}

.milau-search__row:hover .milau-search__title,
.milau-search__row.is-active .milau-search__title {
	color: var(--milau-accent);
}

.milau-search__meta {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.milau-search__price {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .02em;
}

/* The price it came down from, struck through — the card shows it the
   same way. */
.milau-search__old {
	font-size: 13px;
	font-weight: 400;
	color: var(--milau-muted);
	text-decoration: line-through;
}

/* The discount as the shop's own black chip — the same mark the cards
   carry on the picture. */
.milau-search__chip {
	display: inline-block;
	padding: 3px 8px;
	background: var(--milau-ink);
	color: #fff;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: .14em;
	line-height: 1.4;
	border-radius: var( --milau-radius );
}

/* The category is a small tracked label, the way the rest of the
   theme labels things. */
.milau-search__cat {
	font-size: 10px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--milau-muted);
}

/* ------------------------------------------------------ see all */
.milau-search__row--all {
	justify-content: space-between;
	font-size: 11px;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--milau-muted);
}

.milau-search__row--all::after {
	content: "\2192";
	letter-spacing: 0;
}

.milau-search__row--all:hover,
.milau-search__row--all.is-active {
	color: #fff;
}

/* ----------------------------------------------------- responsive */
/* On a phone the sheet runs the full width of the screen, so a long
   product name has the whole width to itself. */
@media (max-width: 640px) {
	.milau-search__results {
		left: 0;
		right: 0;
		max-height: 70vh;
	}

	.milau-search__row {
		padding: 12px 16px;
	}

	.milau-search__status {
		padding: 16px;
	}
}
