/* Hidden items (separate attributes so category & product filters never interfere) */
[data-wclf-hide-cat],
[data-wclf-hide-prod] {
	display: none !important;
}

.wclf-wrap {
	--wclf-bg: #f8f8f8;
	--wclf-text: #3f4349;
	--wclf-icon: #4a4e55;
	--wclf-placeholder: #5f636a;
	--wclf-radius: 999px; /* fully rounded pill */
	--wclf-height: 52px;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	margin: 0 0 24px;
}

.wclf-wrap *,
.wclf-wrap *::before,
.wclf-wrap *::after {
	box-sizing: border-box;
}

/* The pill itself: icon + input + clear button sit side by side (no overlap possible) */
.wclf-wrap .wclf-field {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	height: var(--wclf-height);
	margin: 0;
	padding: 0 12px 0 18px;
	background: var(--wclf-bg);
	border: 0;
	border-radius: var(--wclf-radius);
	box-shadow: none;
	transition: box-shadow .2s ease;
}

.wclf-wrap .wclf-field:focus-within {
	box-shadow: 0 0 0 2px rgba(0, 0, 0, .12);
}

.wclf-wrap .wclf-icon {
	position: static !important;
	flex: 0 0 24px;
	width: 24px !important;
	height: 24px !important;
	margin: 0 !important;
	transform: none !important;
	color: var(--wclf-icon);
	pointer-events: none;
}

/* Input is transparent so theme/Elementor input styles can't create padding, borders or overlap */
.wclf-wrap .wclf-input {
	flex: 1 1 auto;
	display: block;
	width: 100%;
	min-width: 0;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	font-size: 16px; /* prevents iOS zoom on focus */
	line-height: 1.2;
	color: var(--wclf-text);
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	outline: none !important;
	-webkit-appearance: none;
	appearance: none;
}

.wclf-wrap .wclf-input::placeholder {
	color: var(--wclf-placeholder);
	opacity: 1;
}

.wclf-wrap .wclf-input::-webkit-search-decoration,
.wclf-wrap .wclf-input::-webkit-search-cancel-button {
	-webkit-appearance: none;
	display: none;
}

.wclf-wrap .wclf-clear {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	font-size: 22px;
	line-height: 1;
	color: #667085;
	background: transparent;
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	cursor: pointer;
}

.wclf-wrap .wclf-clear[hidden],
.wclf-wrap .wclf-empty[hidden] {
	display: none !important;
}

.wclf-wrap .wclf-clear:hover,
.wclf-wrap .wclf-clear:focus-visible {
	color: #101828;
	background: #ececec;
}

.wclf-wrap .wclf-empty {
	margin: 12px 0 0;
	padding-inline: 18px;
	font-size: 14px;
	color: #667085;
}

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

@media (max-width: 767px) {
	.wclf-wrap { --wclf-height: 48px; }
}

.wclf-wrap .wclf-debug {
	margin: 12px 0 0;
	padding: 10px 12px;
	font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	white-space: pre-wrap;
	word-break: break-word;
	color: #7a2e0e;
	background: #fff4ed;
	border: 1px dashed #f79009;
	border-radius: 8px;
}
