/* NewLife Shop — search field, dropdown and mobile overlay (all pages). */

:root {
	--nls-s-accent: #1d8bb2;
	--nls-s-ink: #146a89;
	--nls-s-ink: color-mix(in srgb, var(--nls-s-accent) 72%, #000);
	--nls-s-soft: #eef7fa;
	--nls-s-soft: color-mix(in srgb, var(--nls-s-accent) 8%, #fff);
	--nls-s-text: #1c2024;
	--nls-s-muted: #5f6770;
	--nls-s-line: #dde1e6;
}

.nls-s-form {
	position: relative;
	display: flex;
	align-items: stretch;
	width: 100%;
	max-width: 520px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.4;
}

.nls-s-form *,
.nls-s-overlay * {
	box-sizing: border-box;
}

.nls-s-label {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.nls-s-form .nls-s-input,
.nls-s-overlay .nls-s-input {
	flex: 1;
	min-width: 0;
	height: 46px;
	margin: 0;
	padding: 10px 48px 10px 18px;
	border: 1px solid #b9c0c8;
	border-radius: 999px;
	background: #fff;
	color: var(--nls-s-text);
	font-size: 16px;
	font-family: inherit;
	line-height: 1.4;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}

.nls-s-form .nls-s-input::placeholder,
.nls-s-overlay .nls-s-input::placeholder {
	color: #7a828b;
	opacity: 1;
}

.nls-s-form .nls-s-input:focus,
.nls-s-overlay .nls-s-input:focus {
	outline: none;
	border-color: var(--nls-s-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--nls-s-accent) 22%, transparent);
}

.nls-s-form .nls-s-input::-webkit-search-cancel-button {
	cursor: pointer;
}

.nls-s-submit {
	position: absolute;
	top: 3px;
	right: 3px;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: var(--nls-s-accent);
	color: #fff;
	cursor: pointer;
	padding: 0;
}

.nls-s-submit:hover {
	filter: brightness(.92);
}

.nls-s-submit:focus-visible {
	outline: 3px solid var(--nls-s-ink);
	outline-offset: 2px;
}

/* Dropdown */
.nls-s-panel {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 100000;
	width: min(600px, 92vw);
	max-height: min(72vh, 640px);
	overflow-y: auto;
	padding: 8px;
	border: 1px solid var(--nls-s-line);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 18px 40px rgba(20, 30, 40, .18), 0 2px 8px rgba(20, 30, 40, .08);
	text-align: left;
	color: var(--nls-s-text);
	font-size: 15px;
}

.nls-s-panel[hidden] {
	display: none !important;
}

.nls-s-sec {
	padding: 6px 4px;
}

.nls-s-sec + .nls-s-sec {
	border-top: 1px solid var(--nls-s-line);
}

.nls-s-h {
	margin: 4px 8px 6px;
	padding: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--nls-s-muted);
}

.nls-s-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 4px;
}

.nls-s-panel a.nls-s-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border: 1px solid var(--nls-s-line);
	border-radius: 999px;
	background: #fff;
	color: var(--nls-s-text);
	font-size: 14px;
	text-decoration: none;
	line-height: 1.3;
}

.nls-s-panel a.nls-s-chip:hover,
.nls-s-panel a.nls-s-chip.is-active {
	border-color: var(--nls-s-accent);
	background: var(--nls-s-soft);
}

.nls-s-kind {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: var(--nls-s-ink);
}

.nls-s-count {
	font-size: 12px;
	color: var(--nls-s-muted);
}

.nls-s-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nls-s-list li {
	list-style: none;
	margin: 0;
	padding: 0;
}

.nls-s-list li::before {
	display: none;
}

.nls-s-panel a.nls-s-item {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	padding: 8px;
	border-radius: 8px;
	color: var(--nls-s-text);
	text-decoration: none;
}

.nls-s-panel a.nls-s-item:hover,
.nls-s-panel a.nls-s-item.is-active {
	background: var(--nls-s-soft);
}

.nls-s-thumb {
	width: 40px;
	height: 54px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	background: #f3f4f6;
	overflow: hidden;
}

.nls-s-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	margin: 0;
}

.nls-s-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.nls-s-title {
	font-weight: 600;
	font-size: 15px;
	line-height: 1.3;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.nls-s-author {
	font-size: 13px;
	color: var(--nls-s-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nls-s-panel mark,
.nls-sr mark {
	background: transparent;
	color: inherit;
	font-weight: 800;
	padding: 0;
}

.nls-s-price {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	font-weight: 700;
	font-size: 14px;
	white-space: nowrap;
}

.nls-s-price del {
	font-weight: 400;
	font-size: 12px;
	color: var(--nls-s-muted);
}

.nls-s-price ins {
	text-decoration: none;
	color: #b3261e;
}

.nls-s-oos {
	font-size: 11px;
	font-weight: 700;
	color: #b3261e;
}

.nls-s-panel a.nls-s-all {
	display: block;
	margin: 4px;
	padding: 12px;
	border-radius: 8px;
	background: var(--nls-s-soft);
	color: var(--nls-s-ink);
	font-weight: 700;
	text-align: center;
	text-decoration: none;
}

.nls-s-panel a.nls-s-all:hover,
.nls-s-panel a.nls-s-all.is-active {
	background: color-mix(in srgb, var(--nls-s-accent) 16%, #fff);
}

.nls-s-all span {
	font-weight: 400;
}

.nls-s-empty,
.nls-s-loading {
	margin: 0;
	padding: 14px 12px;
	color: var(--nls-s-muted);
}

.nls-s-empty p {
	margin: 0 0 6px;
	padding: 0;
}

.nls-s-empty strong {
	color: var(--nls-s-text);
}

.nls-s-panel a {
	outline: none;
}

.nls-s-panel a:focus-visible {
	box-shadow: 0 0 0 2px var(--nls-s-accent);
}

/* Dropdown attached to <body> and positioned under the field by JS. */
.nls-s-panel--float {
	position: fixed;
	top: 0;
	left: 0;
	right: auto;
	z-index: 2147482000;
	box-sizing: border-box;
}

.nls-s-panel--float * {
	box-sizing: border-box;
}

/* Full-screen overlay (phones, and the menu magnifier) */
.nls-s-overlay {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	flex-direction: column;
	background: #fff;
	color: var(--nls-s-text);
	font-size: 16px;
}

.nls-s-overlay[hidden] {
	display: none !important;
}

.nls-s-overlay-bar {
	position: relative;
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 10px 12px;
	padding-top: calc(10px + env(safe-area-inset-top));
	border-bottom: 1px solid var(--nls-s-line);
}

.nls-s-overlay .nls-s-input {
	padding-right: 18px;
}

.nls-s-back {
	flex: none;
	width: 44px;
	height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--nls-s-text);
	cursor: pointer;
	padding: 0;
}

.nls-s-back:hover {
	background: #f3f4f6;
}

.nls-s-panel--overlay {
	position: static;
	flex: 1;
	width: auto;
	max-height: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	padding: 8px 8px calc(16px + env(safe-area-inset-bottom));
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

html.nls-s-lock,
html.nls-s-lock body {
	overflow: hidden;
}

@media (max-width: 767px) {
	.nls-s-panel a.nls-s-item {
		grid-template-columns: 44px minmax(0, 1fr) auto;
		padding: 10px 8px;
	}

	.nls-s-thumb {
		width: 44px;
		height: 60px;
	}
}
