/* Catalog search autocomplete — header + mobile overlay */

.kz-catalog-search__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin-inline-end: 0.35rem;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: #1f2a37;
	cursor: pointer;
}

.kz-catalog-search__toggle:hover,
.kz-catalog-search__toggle:focus-visible {
	background: rgba(31, 42, 55, 0.08);
	outline: none;
}

.kz-catalog-search[hidden] {
	display: none !important;
}

.kz-catalog-search {
	position: fixed;
	inset: 0;
	z-index: 10050;
}

.kz-catalog-search__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(18, 28, 40, 0.45);
}

.kz-catalog-search__panel {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: min(640px, 100%);
	max-height: min(80vh, 640px);
	margin: 12vh auto 0;
	padding: 0.85rem 0.85rem 1rem;
	border-radius: 16px;
	background: #fffdf9;
	box-shadow: 0 18px 50px rgba(18, 28, 40, 0.28);
}

.kz-catalog-search__bar {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.kz-catalog-search__input {
	flex: 1 1 auto;
	min-height: 48px;
	padding: 0.65rem 0.9rem;
	border: 2px solid #c9d4e3;
	border-radius: 12px;
	font: inherit;
	font-size: 1.05rem;
	color: #1f2a37;
	background: #fff;
}

.kz-catalog-search__input:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.kz-catalog-search__close {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 12px;
	background: #eef3f9;
	color: #1f2a37;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.kz-catalog-search__status {
	min-height: 1.25rem;
	margin: 0.55rem 0.15rem 0;
	font-size: 0.92rem;
	color: #5b6b7c;
}

.kz-catalog-search__list {
	list-style: none;
	margin: 0.35rem 0 0;
	padding: 0;
	overflow: auto;
	max-height: min(52vh, 420px);
}

.kz-catalog-search__group {
	padding: 0.55rem 0.65rem 0.2rem;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #6b7c8f;
}

.kz-catalog-search__item {
	margin: 0;
	border-radius: 10px;
}

.kz-catalog-search__item.is-active,
.kz-catalog-search__item:hover {
	background: #e8f1ff;
}

.kz-catalog-search__link {
	display: flex;
	flex-direction: column;
	gap: 0.1rem;
	padding: 0.65rem 0.75rem;
	text-decoration: none;
	color: inherit;
}

.kz-catalog-search__label {
	font-weight: 700;
	font-size: 1rem;
	color: #152033;
}

.kz-catalog-search__label mark {
	background: #ffe08a;
	color: inherit;
	padding: 0 0.1em;
	border-radius: 2px;
}

.kz-catalog-search__sub {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 0.45rem;
	font-size: 0.82rem;
	color: #5b6b7c;
}

.kz-catalog-search__chip {
	display: inline-block;
}

html.kz-catalog-search-open {
	overflow: hidden;
}

@media (max-width: 782px) {
	.kz-catalog-search__panel {
		width: 100%;
		max-height: 100%;
		height: 100%;
		margin: 0;
		border-radius: 0;
		padding: 0.75rem 0.75rem 1.25rem;
	}

	.kz-catalog-search__list {
		max-height: none;
		flex: 1 1 auto;
	}

	.kz-catalog-search__toggle {
		display: none;
	}
}
