/* iWebsite AJAX Product Search — frontend styles */

.searchform_box {
	position: fixed;
	top: 60px;
	left: 0;
	width: 0;
	display: inline-block;
	background-color: #fff;
	transition: width 1s;
	text-align: center;
	z-index: 999;
}

.admin-bar .searchform_box {
	top: 92px;
}

.fixed-header .searchform_box {
	top: 60px;
}

.fullscreen-searchform-active .searchform_box {
	width: 100%;
}

.searchform_box .call-search-menu {
	height: 30px;
	position: relative;
	display: inline-block;
	vertical-align: middle;
}

.searchform_box .call-search-menu:hover {
	cursor: pointer;
}

.searchform_box .call-search-menu svg {
	opacity: 1;
	transition: opacity 1s;
}

.fullscreen-searchform-active .searchform_box .call-search-menu svg {
	opacity: 0;
}

.searchform_box .call-search-menu svg path,
.call-search-menu svg path {
	fill: #777;
}

.searchform_box .call-search-menu:hover svg path,
.call-search-menu:hover svg path {
	fill: #F5D123;
}

.searchform_box .call-search-menu:before,
.searchform_box .call-search-menu:after {
	content: '';
	display: block;
	max-width: 1200px;
	width: 70%;
	height: 1px;
	position: absolute;
	top: 50%;
	background-color: #333;
	opacity: 0;
	transition: transform 1s, opacity 1s;
}

.fullscreen-searchform-active .searchform_box .call-search-menu:before,
.fullscreen-searchform-active .searchform_box .call-search-menu:after {
	opacity: 1;
}

.fullscreen-searchform-active .searchform_box .call-search-menu:before {
	transform: rotate(45deg);
}

.fullscreen-searchform-active .searchform_box .call-search-menu:after {
	transform: rotate(-45deg);
}

.fullscreen-searchform-active .searchform_box .call-search-menu:hover:before,
.fullscreen-searchform-active .searchform_box .call-search-menu:hover:after {
	background-color: #f00;
}

.searchform_wrap {
	display: inline-block;
	vertical-align: middle;
	max-width: 1340px;
	width: 100%;
}

.search-form-container {
	padding: 30px 0;
}

.searchform_wrap .search-form {
	position: relative;
}

.searchform_wrap .search-form-container form {
	position: unset;
}

.searchform_wrap .search-form-container form label.search-label {
	width: 100%;
}

.searchform_wrap .search-input {
	border-radius: 100px;
	border-color: #C4C4C4;
	padding-right: 60px;
}

.searchform_wrap div.search-form-container form.searchform button.search-button {
	position: absolute;
	top: 8px;
	right: 20px;
	left: auto;
	padding: 0;
	line-height: 1;
	background-color: transparent;
	border: none;
}

/* form close button */
.searchform_wrap div.search-form-container form.searchform button.close-search {
	width: 20px;
	height: 20px;
	line-height: 20px;
	margin-top: -20px;
	position: absolute;
	top: 50%;
	left: -40px;
	right: auto;
	background-color: transparent;
	padding: 0;
	border-radius: 0;
	border: none;
}

.searchform_wrap div.search-form-container form.searchform button.close-search svg {
	width: 20px;
	height: 20px;
}

.searchform_wrap div.search-form-container form.searchform button.close-search:hover {
	cursor: pointer;
}

.searchform_wrap div.search-form-container form.searchform button.close-search:before,
.searchform_wrap div.search-form-container form.searchform button.close-search:after {
	background-color: #333;
}

.searchform_wrap div.search-form-container form.searchform button.close-search:hover:before,
.searchform_wrap div.search-form-container form.searchform button.close-search:hover:after {
	background-color: #F5D123;
}

/* Search results — hidden until server returns a payload */
.searchform_wrap .search-form-container .search-result {
	display: none;
	width: 100%;
	max-height: calc( 100vh - 160px );
	position: absolute;
	top: 100%;
	left: 0;
	right: auto;
	background: #f5f3ee;
	border-top: 1px solid #e7e2d6;
	box-shadow: 0 12px 24px -12px rgba( 0, 0, 0, 0.12 );
	overflow-x: hidden;
	overflow-y: auto;
	padding: 8px 16px 16px;
}

.ajax-product-search-loading .searchform_wrap .search-form-container .search-result,
.ajax-product-search-loaded .searchform_wrap .search-form-container .search-result {
	display: block;
}

.searchform_wrap .search-form-container .result {
	max-width: 1300px;
	margin: 0 auto;
	background: #fff;
	border-radius: 6px;
	padding: 12px;
	box-shadow: 0 2px 12px rgba( 0, 0, 0, 0.06 );
}

/* Hide popular-searches block while results panel is up — was leaking through above the panel */
.ajax-product-search-loading .search-popular_container,
.ajax-product-search-loaded .search-popular_container {
	display: none;
}

.searchform_wrap .search-form-container .result .no-result-block {
	text-align: center;
	margin: 0 0 12px;
	padding: 8px 16px 12px;
}

.searchform_wrap .search-form-container .result .no-result {
	margin: 0 auto;
	display: block;
	font-size: 1rem;
}

.searchform_wrap .search-form-container .result a.btn.back {
	min-width: 120px;
	margin: 0 auto;
}

.searchform_wrap .search-form-container .result .search-suggested-title {
	margin: 0 0 16px;
	padding: 0;
	font-size: 1.1rem;
	font-weight: 500;
	text-align: center;
	color: #333;
}

.searchform_wrap .search-form-container .search-products {
	width: 100%;
}

.searchform_wrap .search-form-container .search-products ul.products {
	margin: 0;
	padding: 0;
	list-style: none;
}

.searchform_wrap .search-form-container .search-products ul.products::after {
	content: "";
	display: block;
	clear: both;
}

.searchform_wrap .search-form-container .search-products ul.products li.product {
	width: 23.425%;
	margin: 0 2.1% 25px 0;
	overflow: hidden;
	float: right;
}

.searchform_wrap .search-form-container .search-products ul.products li.product.first {
	margin: 0 0 25px 0;
}

.searchform_wrap .search-form-container .search-products ul.products li.product .product-grid-image-container {
	position: relative;
	overflow: hidden;
}

.searchform_wrap .search-form-container .search-products ul.products li.product .woocommerce-loop-product__title {
	font-size: 1rem;
	text-align: center;
	font-weight: 400;
	padding: 10px 0 15px;
}

.searchform_wrap .search-form-container .search-products ul.products li.product img {
	max-width: 100%;
	height: auto;
}

/* Preloader */
.searchform_wrap .search-preloader {
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .5s, visibility .5s;
}

.ajax-product-search-loading .searchform_wrap .search-preloader {
	opacity: 1;
	visibility: visible;
}

.searchform_wrap .search-preloader .container-preloader {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

/* Popular searches */
.search-popular_container {
	position: absolute;
	top: 0;
	width: 100%;
	margin-right: auto;
	opacity: 1;
	visibility: visible;
	transition: opacity .5s, visibility .5s;
}

.ajax-product-search-loading .search-popular_container,
.ajax-product-search-loaded .search-popular_container {
	opacity: 0;
	visibility: hidden;
}

.search-popular {
	max-width: 70%;
	width: 1300px;
	margin-left: auto;
	margin-right: auto;
	opacity: 1;
	transition: opacity .5s;
}

.search-popular_title {
	margin-bottom: 0;
	text-align: initial;
	color: #777;
	line-height: 50px;
}

.search-popular_list {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: initial;
}

.search-popular_element {
	line-height: 1.5;
	padding-top: 5px;
	padding-bottom: 5px;
	padding-left: 10px;
	transition: color .3s;
}

.search-popular_element:hover {
	color: #777;
	cursor: pointer;
}

/* Fix icons and mobile */
.search-form-container .title-meta-container .title {
	white-space: normal;
}

.explain-field {
	font-size: 70%;
	padding: 5px 60px 0 0;
	text-align: right;
}

@media only screen and (max-width: 1024px) {
	.searchform_box {
		line-height: unset;
		top: 98px;
	}

	.searchform_wrap .search-form-container .search-products ul.products li.product {
		width: 31.5%;
		margin: 0 2.75% 20px 0;
	}
}

@media only screen and (max-width: 782px) {
	.searchform_wrap .search-form-container .result .no-result {
		margin: 50px auto 20px;
	}

	.searchform_wrap .search-form-container .search-products ul.products li.product {
		width: 48%;
		margin: 0 4% 20px 0;
	}
}
