/**
 * Product Search — structural layout only.
 * Colors, typography, spacing, borders, radius, etc. are all set in Elementor.
 */

.zestify-product-search {
	display: flex;
	align-items: center;
	position: relative;
	box-sizing: border-box;
	width: 100%;
	margin: 0;
}

.zestify-product-search__category {
	position: relative;
	flex-shrink: 0;
	height: 100%;
	display: flex;
	align-items: center;
}

.zestify-product-search__category-toggle {
	display: inline-flex;
	align-items: center;
	height: 100%;
	appearance: none;
	background: none;
	border: none;
	cursor: pointer;
	line-height: 1;
	color: inherit;
}

.zestify-product-search__category-label {
	display: inline-block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.zestify-product-search__chevron {
	display: inline-flex;
	align-items: center;
	line-height: 1;
	transition: transform 0.2s ease;
}

.zestify-product-search__category.is-open .zestify-product-search__chevron {
	transform: rotate(180deg);
}

.zestify-product-search__divider {
	flex-shrink: 0;
	display: block;
	align-self: center;
}

.zestify-product-search__search-icon {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	line-height: 1;
	pointer-events: none;
}

.zestify-product-search__input {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	background: transparent;
	border: none;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
}

.zestify-product-search__input::-webkit-search-decoration,
.zestify-product-search__input::-webkit-search-cancel-button,
.zestify-product-search__input::-webkit-search-results-button,
.zestify-product-search__input::-webkit-search-results-decoration {
	display: none;
	-webkit-appearance: none;
}

.zestify-product-search__clear {
	display: none;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	appearance: none;
	background: none;
	border: none;
	cursor: pointer;
	line-height: 1;
	padding: 0;
	color: inherit;
}

.zestify-product-search.has-value .zestify-product-search__clear,
.zestify-product-search__clear:not([hidden]) {
	display: inline-flex;
}

.zestify-product-search__clear[hidden] {
	display: none !important;
}

.zestify-product-search__dropdown {
	position: absolute;
	inset-inline-start: 0;
	z-index: 50;
	list-style: none;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	box-sizing: border-box;
}

.zestify-product-search__dropdown[hidden] {
	display: none;
}

.zestify-product-search__option {
	display: block;
	width: 100%;
	appearance: none;
	background: none;
	border: none;
	cursor: pointer;
	text-align: start;
	box-sizing: border-box;
	color: inherit;
}

/*
 * Header search on small devices: same look as the desktop search (category dropdown,
 * divider, icon, input, clear button). The mobile widget shares the desktop widget's element ID
 * (#lg-header-search-wrapper), so the header snippet's phone rules (which hide the category
 * and turn the box into a pill) apply to it; these rules override them under 768px.
 */
@media (max-width: 767px) {
	body #lg-header-search-wrapper .zestify-product-search {
		display: flex !important;
		align-items: center !important;
		width: 100% !important;
		height: 44px !important;
		padding: 0 14px !important;
		gap: 0 !important;
		overflow: visible !important;
		box-sizing: border-box !important;
		background: #fff !important;
		border: 1px solid #e5e0de !important;
		border-radius: 0 !important;
		box-shadow: none !important;
	}

	body #lg-header-search-wrapper .zestify-product-search__category {
		position: relative !important;
		display: flex !important;
		flex: 0 0 auto !important;
		align-items: center !important;
		height: 100% !important;
	}

	body #lg-header-search-wrapper .zestify-product-search__category-toggle {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		gap: 8px !important;
		height: 100% !important;
		min-width: 0 !important;
		padding: 0 10px 0 0 !important;
		border: 0 !important;
		background: transparent !important;
		color: #555 !important;
		font-size: 13px !important;
		font-weight: 500 !important;
		box-shadow: none !important;
	}

	body #lg-header-search-wrapper .zestify-product-search__chevron svg {
		width: 11px !important;
		height: 11px !important;
		fill: #aaa !important;
	}

	body #lg-header-search-wrapper .zestify-product-search__divider {
		display: block !important;
		flex: 0 0 1px !important;
		width: 1px !important;
		height: 26px !important;
		margin: 0 12px 0 0 !important;
		background: #e8e3e1 !important;
	}

	body #lg-header-search-wrapper .zestify-product-search__search-icon {
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		flex: 0 0 auto !important;
		margin: 0 10px 0 0 !important;
	}

	body #lg-header-search-wrapper .zestify-product-search__search-icon svg,
	body #lg-header-search-wrapper .zestify-product-search__search-icon img {
		width: 18px !important;
		height: 18px !important;
		fill: #aaa !important;
	}

	body #lg-header-search-wrapper .zestify-product-search__input {
		flex: 1 1 auto !important;
		width: 0 !important;
		min-width: 0 !important;
		height: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		outline: none !important;
		background: transparent !important;
		box-shadow: none !important;
		color: #555 !important;
		font-size: 14px !important;
		font-weight: 400 !important;
	}

	body #lg-header-search-wrapper .zestify-product-search__input::placeholder {
		color: #aaa !important;
		opacity: 1 !important;
	}

	body #lg-header-search-wrapper .zestify-product-search__clear {
		flex: 0 0 auto !important;
		width: 28px !important;
		height: 28px !important;
		margin-left: 6px !important;
		font-size: 13px !important;
		color: #777 !important;
	}

	body #lg-header-search-wrapper .zestify-product-search__clear svg {
		width: 13px !important;
		height: 13px !important;
		fill: currentColor !important;
	}

	/* Category dropdown opens under the search box, above the rest of the header. */
	body #lg-header-search-wrapper .zestify-product-search__dropdown {
		position: absolute !important;
		top: 100% !important;
		inset-inline-start: 0 !important;
		z-index: 9999 !important;
		min-width: 200px !important;
		max-height: 320px !important;
		overflow-y: auto !important;
		margin: 0 !important;
		padding: 6px !important;
		background: #fff !important;
		border: 1px solid #e5e0de !important;
		box-shadow: 0 8px 24px rgba(0, 0, 0, .10) !important;
	}

	body #lg-header-search-wrapper .zestify-product-search__dropdown[hidden] {
		display: none !important;
	}

	body #lg-header-search-wrapper .zestify-product-search__option {
		display: block !important;
		width: 100% !important;
		padding: 10px 12px !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: transparent !important;
		color: #555 !important;
		text-align: start !important;
		font-size: 14px !important;
		box-shadow: none !important;
	}

	body #lg-header-search-wrapper .zestify-product-search__option:hover,
	body #lg-header-search-wrapper .zestify-product-search__option.is-active {
		background: #f5f3f2 !important;
		color: #333 !important;
	}

	body #lg-header-search-wrapper .zestify-product-search button:focus {
		outline: none !important;
		box-shadow: none !important;
	}
}
