/**
 * מכון נדב — "חיפוש מהיר" מעל קרוסלת ערכות (assets/mn-carousel-search.js).
 *
 * Only inside a carousel widget, so nothing here reaches any other grid.
 */

/* A kit the typed words do not match. */
.mn-carousel-yes ul.products > li.product.mn-csearch-out {
	display: none !important;
}

.mn-carousel-yes .mn-csearch {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 0 0 12px;
}

.mn-carousel-yes .mn-csearch__box {
	position: relative;
	flex: 0 1 380px;
	min-width: 0;
}

.mn-carousel-yes .mn-csearch__box > svg {
	position: absolute;
	top: 50%;
	inset-inline-start: 14px;
	width: 18px;
	height: 18px;
	color: #8b949f;
	transform: translateY( -50% );
	pointer-events: none;
}

/* The theme hides every input (`input { display: none }`) and sizes fields
   content-box, which would push the padding outside the box — past the clear
   button and off a phone's screen: every property here is stated. */
.mn-carousel-yes .mn-csearch__input {
	display: block !important;
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	height: 46px !important;
	margin: 0 !important;
	padding: 0 42px !important;
	border: 1px solid #ddd6cb !important;
	border-radius: 10px !important;
	background: #fff !important;
	box-shadow: 0 1px 2px rgba( 23, 32, 43, 0.05 ) !important;
	font: inherit;
	font-size: 15px !important;
	line-height: 46px !important;
	color: #17202b !important;
	text-align: start;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mn-carousel-yes .mn-csearch__input::placeholder {
	color: #9aa3ad;
}

.mn-carousel-yes .mn-csearch__input:focus {
	outline: none;
	border-color: var( --mn-primary ) !important;
	box-shadow: 0 0 0 3px var( --mn-primary-a20 ) !important;
}

.mn-carousel-yes .mn-csearch__input::-webkit-search-cancel-button {
	display: none;
}

.mn-carousel-yes .mn-csearch__clear {
	position: absolute;
	top: 50%;
	inset-inline-end: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f1ece4;
	color: #5c6570;
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
	transform: translateY( -50% );
}

.mn-carousel-yes .mn-csearch__clear:hover {
	background: var( --mn-primary-tint-strong );
	color: #17202b;
}

.mn-carousel-yes .mn-csearch__clear[hidden] {
	display: none;
}

/* How many kits: a quiet chip beside the field, warm while a search narrows. */
.mn-carousel-yes .mn-csearch__count {
	display: inline-flex;
	align-items: center;
	margin: 0 !important;
	padding: 5px 12px;
	border-radius: 999px;
	background: #f3eee7;
	color: #5c6570;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.mn-carousel-yes .mn-csearch__count.is-filtering {
	background: var( --mn-primary-tint-strong );
	color: var( --mn-primary-text );
}

.mn-carousel-yes .mn-csearch__count[hidden] {
	display: none;
}

/* The words that matched, in each title still shown. */
.mn-carousel-yes .woocommerce-loop-product__title mark {
	padding: 0 1px;
	border-radius: 2px;
	background: var( --mn-primary-mark );
	color: inherit;
}

.mn-carousel-yes .mn-csearch__empty {
	margin: 4px 0 18px;
	padding: 22px 16px;
	border: 1px dashed #e3ddd3;
	border-radius: 10px;
	background: #fbf9f6;
	text-align: center;
	color: #4a5563;
	font-size: 15px;
}

.mn-carousel-yes .mn-csearch__empty[hidden] {
	display: none;
}

.mn-carousel-yes .mn-csearch__empty p {
	margin: 0 0 6px !important;
	text-align: center !important; /* the theme aligns every <p> to the start */
}

.mn-carousel-yes .mn-csearch__empty button {
	padding: 0;
	border: 0;
	background: none;
	color: var( --mn-primary-text-soft );
	font: inherit;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* A phone: the whole width, and 16px so it does not zoom in on focus. */
@media ( max-width: 767px ) {
	.mn-carousel-yes .mn-csearch__box {
		flex-basis: 100%;
	}

	.mn-carousel-yes .mn-csearch__input {
		font-size: 16px !important;
	}
}
