/* ============================================================
   Mobile Search Overlay – Konte Child
   ============================================================ */

/* Hide trigger on desktop (mobile header is already hidden,
   but this guards against accidental display) */
@media (min-width: 900px) {
	.ks-mobile-search-trigger {
		display: none !important;
	}
}

/* Trigger button – same style as other mobile header icons */
.ks-mobile-search-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px 6px;
	color: #fff;
	line-height: 1;
	vertical-align: middle;
}

.ks-mobile-search-trigger .svg-icon {
	font-size: 24px;
	line-height: 1;
	display: flex;
	color: #fff;
}

.ks-mobile-search-trigger .svg-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* ---- Overlay shell ---- */
#ks-mobile-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.22s ease;
}

#ks-mobile-overlay.is-open {
	opacity: 1;
	pointer-events: auto;
}

/* Blurred dark backdrop */
.ks-mso__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 8, 8, 0.75);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

/* Blur the page content behind the overlay */
body.ks-overlay-open #page.site {
	filter: blur(5px);
	transition: filter 0.22s ease;
	pointer-events: none;
}

/* ---- Content panel (slides from top) ---- */
.ks-mso__panel {
	position: relative;
	z-index: 1;
	background: #0a0a0a;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	padding: 0 20px 16px;
	display: flex;
	flex-direction: column;
	max-height: 80vh;
	transform: translateY(-100%);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	/* top padding accounts for sticky topbar + header */
	padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
}

#ks-mobile-overlay.is-open .ks-mso__panel {
	transform: translateY(0);
}

/* ---- Input row ---- */
.ks-mso__bar {
	display: flex;
	align-items: center;
	gap: 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	padding: 10px 0 14px;
}

.ks-mso__bar .svg-icon {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	color: rgba(255, 255, 255, 0.5);
	display: flex;
}

.ks-mso__input {
	flex: 1;
	background: transparent;
	border: none;
	outline: none;
	color: #fff;
	font-size: 1.1rem;
	font-family: inherit;
	line-height: 1.4;
	padding: 4px 0;
	caret-color: #fff;
	min-width: 0;
}

.ks-mso__input::placeholder {
	color: rgba(255, 255, 255, 0.35);
}

.ks-mso__close {
	flex-shrink: 0;
	background: none;
	border: none;
	cursor: pointer;
	color: rgba(255, 255, 255, 0.6);
	padding: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: color 0.15s, background 0.15s;
}

.ks-mso__close:hover {
	color: #fff;
	background: rgba(255, 255, 255, 0.08);
}

.ks-mso__close svg {
	width: 20px;
	height: 20px;
	stroke: currentColor;
	stroke-width: 2;
	fill: none;
	stroke-linecap: round;
}

/* ---- Results area ---- */
.ks-mso__results {
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	flex: 1;
	margin-top: 4px;
}

.ks-mso__results ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ks-mso__results li a {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 0;
	color: #fff;
	text-decoration: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ks-mso__results li a img {
	width: 54px;
	height: 54px;
	object-fit: contain;
	flex-shrink: 0;
	background: rgba(255, 255, 255, 0.04);
	border-radius: 6px;
}

.ks-mso__results .post-title,
.ks-mso__results .product-title {
	font-size: 0.9rem;
	line-height: 1.35;
	color: #fff;
	display: block;
}

.ks-mso__results .price {
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.45);
	display: block;
	margin-top: 3px;
}

.ks-mso__results li.view-more-results {
	margin-top: 6px;
}

.ks-mso__results li.view-more-results a {
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 6px;
	padding: 12px;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	border-bottom: 1px solid rgba(255, 255, 255, 0.2);
	transition: background 0.15s;
}

.ks-mso__results li.view-more-results a:hover {
	background: rgba(255, 255, 255, 0.06);
}

.ks-mso__noresult {
	color: rgba(255, 255, 255, 0.4);
	font-size: 0.9rem;
	padding: 16px 0;
	margin: 0;
}

/* ---- Skeleton loader (dark variant) ---- */
.ks-mso__results .ks-skel {
	display: flex !important;
	align-items: center;
	gap: 14px;
	padding: 12px 0 !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ks-mso__results .ks-skel__img,
.ks-mso__results .ks-skel__text em {
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0.06) 25%,
		rgba(255, 255, 255, 0.14) 50%,
		rgba(255, 255, 255, 0.06) 75%
	);
	background-size: 800px 100%;
	animation: ks-shimmer 1.2s infinite linear;
}

.ks-mso__results .ks-skel__img {
	width: 54px;
	height: 54px;
	flex-shrink: 0;
	border-radius: 6px;
}

.ks-mso__results .ks-skel__text {
	flex: 1;
}

.ks-mso__results .ks-skel__text em {
	display: block;
	height: 10px;
	border-radius: 4px;
	font-style: normal;
	margin-bottom: 7px;
	width: 65%;
}

.ks-mso__results .ks-skel__text em:last-child {
	width: 38%;
	margin-bottom: 0;
}

/* Item reveal animation (shared keyframes with search-fast.js) */
.ks-mso__results .ks-item--hidden {
	opacity: 0;
	transform: translateY(5px);
}

.ks-mso__results .ks-item--visible {
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.18s ease, transform 0.18s ease;
}
