/**
 * The product search dropdown.
 *
 * Used on the shop front and all through the staff dashboard, so it
 * takes its colours from whichever of the two it lands in rather than
 * carrying its own.
 */

.km-ls__panel {
	position: fixed;
	z-index: 99999;
	max-height: 380px;
	overflow-x: hidden;
	overflow-y: auto;
	background: #fff;
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	border-radius: 10px;
	box-shadow: 0 18px 40px rgba( 0, 0, 0, 0.18 );
	color: #11202b;
	text-align: left;
}

.km-ls__item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 12px;
	cursor: pointer;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.06 );
}

.km-ls__item:last-child {
	border-bottom: 0;
}

.km-ls__item.is-active,
.km-ls__item:hover {
	background: #f3f6f8;
}

.km-ls__img {
	width: 36px;
	height: 36px;
	object-fit: cover;
	border-radius: 6px;
	flex: 0 0 auto;
	background: #eef2f4;
}

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

.km-ls__name {
	font-size: 14px;
	line-height: 1.32;
	color: #11202b;
	overflow-wrap: break-word;
}

.km-ls__name mark {
	background: transparent;
	color: inherit;
	font-weight: 700;
}

.km-ls__meta {
	font-size: 12px;
	color: #6a7a86;
	overflow-wrap: break-word;
}

.km-ls__price {
	font-size: 13px;
	font-weight: 700;
	white-space: nowrap;
	color: #11202b;
	flex: 0 0 auto;
}

.km-ls__note {
	padding: 12px;
	font-size: 13px;
	color: #6a7a86;
}

@media ( max-width: 640px ) {
	.km-ls__panel {
		max-height: 60vh;
	}

	.km-ls__img {
		width: 30px;
		height: 30px;
	}
}

/* The register keeps its own inline list — it adds a line to the sale
   rather than filling a box — but it is the same panel, drawn the same
   way, so the two read as one thing.
   
   The dashboard lays out lists inside a step as a flex row, which sized
   these rows to their text and left the price stranded mid-panel, so the
   layout is stated here rather than inherited. */
.km-results {
	display: block;
	padding: 0;
	list-style: none;
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	border-radius: 10px;
	box-shadow: 0 18px 40px rgba( 0, 0, 0, 0.18 );
	overflow-x: hidden;
	overflow-y: auto;
}

.km-results .km-ls__item,
.km-results .km-ls__note {
	width: 100%;
	box-sizing: border-box;
	list-style: none;
}

/* =========================================================
   Recent searches
   The same panel the product suggestions use, so there is
   one dropdown and one set of arrow keys to learn.
   ========================================================= */

.km-ls__head{
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:12px;
	padding:10px 14px 6px;
	font-family:"IBM Plex Mono",monospace;
	font-size:.68rem;
	letter-spacing:.09em;
	text-transform:uppercase;
	color:#6B7685;
}
.km-ls__clear{
	border:0;
	background:none;
	padding:4px 2px;
	font:inherit;
	color:#8A6218;
	cursor:pointer;
	text-transform:uppercase;
}
.km-ls__clear:hover{ text-decoration:underline; }

.km-ls__item--recent{ align-items:center; gap:10px; }

.km-ls__clock{
	flex:0 0 auto;
	display:inline-flex;
	width:16px; height:16px;
	color:#8B95A3;
}
.km-ls__clock svg{ width:100%; height:100%; }

.km-ls__term{
	flex:1 1 auto;
	min-width:0;
	overflow:hidden;
	text-overflow:ellipsis;
	white-space:nowrap;
}

.km-ls__x{
	flex:0 0 auto;
	width:28px; height:28px;
	border:0;
	border-radius:999px;
	background:none;
	color:#8B95A3;
	font-size:1.1rem;
	line-height:1;
	cursor:pointer;
}
.km-ls__x:hover{ background:rgba(14,26,43,.08); color:#0E1A2B; }
.km-ls__x:focus-visible{ outline:2px solid #C6902E; outline-offset:1px; }
