/* Webmate Smart Search: live search box. Restyle through the --wmss-* variables. */
.wmss {
	--wmss-text: #1f2933;
	--wmss-muted: #5f6b7a;
	--wmss-border: #c5ced8;
	--wmss-line: #e3e8ee;
	--wmss-accent: #1559a0;
	--wmss-hover: #f3f6f9;
	--wmss-bg: #fff;
	--wmss-radius: 10px;
	--wmss-height: 48px;
	--wmss-font-size: 16px;
	--wmss-z: 1000;
	position: relative;
	width: 100%;
	color: var(--wmss-text);
}

.wmss__sr,
.wmss__submit {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

.wmss__svg {
	display: block;
	flex: 0 0 auto;
}

.wmss__open,
.wmss__back {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	color: var(--wmss-text);
	text-decoration: none;
}

.wmss__form {
	position: relative;
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0;
}

.wmss__icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--wmss-muted);
	pointer-events: none;
	line-height: 0;
}

.wmss .wmss__input {
	box-sizing: border-box;
	width: 100%;
	height: var(--wmss-height);
	margin: 0;
	padding: 0 44px 0 44px;
	border: 1px solid var(--wmss-border);
	border-radius: var(--wmss-radius);
	background: var(--wmss-bg);
	box-shadow: none;
	color: var(--wmss-text);
	font: inherit;
	font-size: var(--wmss-font-size);
	line-height: normal;
	-webkit-appearance: none;
	appearance: none;
}

.wmss .wmss__input::-webkit-search-cancel-button,
.wmss .wmss__input::-webkit-search-decoration {
	-webkit-appearance: none;
	display: none;
}

.wmss .wmss__input:focus {
	border-color: var(--wmss-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wmss-accent) 18%, transparent);
	outline: none;
}

.wmss__form > .wmss__icon + .wmss__input {
	flex: 1 1 auto;
}

.wmss .wmss__clear {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--wmss-muted);
	cursor: pointer;
}

.wmss .wmss__clear[hidden] {
	display: none;
}

.wmss .wmss__clear:hover {
	background: var(--wmss-hover);
	color: var(--wmss-text);
}

.wmss__spinner {
	position: absolute;
	right: 48px;
	top: 50%;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	border: 2px solid var(--wmss-line);
	border-top-color: var(--wmss-accent);
	border-radius: 50%;
	opacity: 0;
	pointer-events: none;
}

.wmss.is-loading .wmss__spinner {
	opacity: 1;
	animation: wmss-spin 0.7s linear infinite;
}

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

/* Dropdown */
.wmss__list {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: var(--wmss-z);
	max-height: min(70vh, 560px);
	overflow: auto;
	overscroll-behavior: contain;
	padding: 6px 0;
	background: var(--wmss-bg);
	border: 1px solid var(--wmss-line);
	border-radius: var(--wmss-radius);
	box-shadow: 0 14px 34px rgba(14, 35, 56, 0.16);
	text-align: left;
}

.wmss__list[hidden] {
	display: none;
}

.wmss .wmss__option {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 14px;
	color: var(--wmss-text);
	text-decoration: none;
	line-height: 1.3;
}

.wmss .wmss__option[aria-selected="true"],
.wmss .wmss__option:hover {
	background: var(--wmss-hover);
	color: var(--wmss-text);
}

.wmss__img {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	object-fit: contain;
	border-radius: 6px;
	background: #fff;
}

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

.wmss__name {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 15px;
}

.wmss__sku {
	color: var(--wmss-muted);
	font-size: 12px;
}

.wmss__price {
	flex: 0 0 auto;
	font-weight: 700;
	font-size: 15px;
	white-space: nowrap;
	text-align: right;
}

/* Themes often hide prices inside the header (mini-cart subtotal), sometimes with !important. */
.wmss .wmss__price span.woocommerce-Price-amount.amount,
.wmss .wmss__price bdi {
	display: inline !important;
}

.wmss__price del {
	display: block;
	color: var(--wmss-muted);
	font-weight: 400;
	font-size: 13px;
}

.wmss__price ins {
	text-decoration: none;
}

.wmss__head {
	margin-top: 4px;
	padding: 10px 14px 4px;
	border-top: 1px solid var(--wmss-line);
	color: var(--wmss-muted);
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.wmss .wmss__cat {
	padding-top: 6px;
	padding-bottom: 6px;
	font-size: 15px;
}

.wmss .wmss__all {
	justify-content: center;
	margin-top: 4px;
	padding: 12px 14px;
	border-top: 1px solid var(--wmss-line);
	color: var(--wmss-accent);
	font-weight: 700;
}

.wmss__empty {
	padding: 14px;
	color: var(--wmss-muted);
}

/* Full-screen panel (the breakpoint rules are printed with the box) */
html.wmss-lock,
html.wmss-lock body {
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.wmss.is-loading .wmss__spinner {
		animation-duration: 2s;
	}
}
