/* Happy Product Category Search */
.hpcs-wrapper {
	position: relative;
	width: 100%;
	max-width: 760px;
	font-family: inherit;
}

.hpcs-form {
	position: relative;
	display: flex;
	align-items: stretch;
	width: 100%;
	height: 54px;
	margin: 0;
	padding: 0;
	background: #fff;
	border: 1px solid #d8deea;
	border-radius: 9px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(20, 35, 70, .05);
	transition: border-color .2s ease, box-shadow .2s ease;
}

.hpcs-form:focus-within {
	border-color: #1f2b50;
	box-shadow: 0 0 0 3px rgba(31, 43, 80, .08);
}

.hpcs-category-wrap {
	flex: 0 0 190px;
	min-width: 0;
	border-right: 1px solid #e4e8ef;
	background: #fff;
}

.hpcs-category {
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 38px 0 17px !important;
	border: 0 !important;
	border-radius: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
	background-color: transparent !important;
	color: #1d2947;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
}

.hpcs-input-wrap {
	flex: 1 1 auto;
	min-width: 0;
	background: #fff;
}

.hpcs-input {
	display: block;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	padding: 0 18px !important;
	border: 0 !important;
	border-radius: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	color: #18213d;
	font: inherit;
	font-size: 15px;
}

.hpcs-input::placeholder {
	color: #98a2b3;
	opacity: 1;
}

.hpcs-button {
	flex: 0 0 58px;
	width: 58px;
	min-width: 58px;
	height: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-left: 1px solid rgba(255,255,255,.15) !important;
	border-radius: 0 !important;
	background: #1f2b50 !important;
	color: #fff !important;
	cursor: pointer;
	transition: background .2s ease, transform .1s ease;
}

.hpcs-button:hover,
.hpcs-button:focus {
	background: #131d3b !important;
	color: #fff !important;
}

.hpcs-button:active {
	transform: scale(.98);
}

.hpcs-button svg {
	display: block;
}

.hpcs-spinner {
	display: none;
	position: absolute;
	right: 68px;
	top: 50%;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	border: 2px solid rgba(31, 43, 80, .18);
	border-top-color: #1f2b50;
	border-radius: 50%;
	animation: hpcs-spin .7s linear infinite;
	pointer-events: none;
}

.hpcs-wrapper.is-loading .hpcs-spinner {
	display: block;
}

@keyframes hpcs-spin {
	to { transform: rotate(360deg); }
}

.hpcs-results {
	display: none;
	position: absolute;
	z-index: 999999;
	top: calc(100% + 7px);
	left: 0;
	right: 0;
	max-height: 430px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid #e2e7ef;
	border-radius: 9px;
	box-shadow: 0 14px 40px rgba(19, 31, 63, .14);
}

.hpcs-results.is-open {
	display: block;
}

.hpcs-results-list {
	padding: 6px;
}

.hpcs-result-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px;
	border-radius: 7px;
	color: inherit !important;
	text-decoration: none !important;
	transition: background .16s ease;
}

.hpcs-result-item:hover,
.hpcs-result-item:focus {
	background: #f6f8fb;
}

.hpcs-result-image {
	flex: 0 0 58px;
	width: 58px;
	height: 58px;
	border-radius: 7px;
	overflow: hidden;
	background: #f5f6f8;
}

.hpcs-result-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hpcs-result-content {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.35;
}

.hpcs-result-title {
	color: #18213d;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hpcs-result-category {
	margin-top: 2px;
	color: #7c879b;
	font-size: 12px;
}

.hpcs-result-price {
	margin-top: 3px;
	color: #1f2b50;
	font-size: 13px;
	font-weight: 600;
}

.hpcs-empty {
	padding: 18px;
	color: #687386;
	font-size: 14px;
	text-align: center;
}

@media (max-width: 640px) {
	.hpcs-form {
		height: 48px;
	}

	.hpcs-category-wrap {
		flex-basis: 125px;
	}

	.hpcs-category {
		padding-left: 11px !important;
		padding-right: 26px !important;
		font-size: 12px;
	}

	.hpcs-input {
		padding: 0 11px !important;
		font-size: 13px;
	}

	.hpcs-button {
		flex-basis: 48px;
		width: 48px;
		min-width: 48px;
	}

	.hpcs-spinner {
		right: 57px;
	}

	.hpcs-result-image {
		flex-basis: 50px;
		width: 50px;
		height: 50px;
	}
}
