/* Scored search (ported from Kilnford) - only enqueued on ?debug=search */

/* Autocomplete Search Results - dropdown under the header search bar */

.creato_search {
	position: relative;
}

.creato-search-results {
	display: none;
	position: absolute;
	top: calc(100% + 5px);
	left: 0;
	right: 0;
	z-index: 9999;
	max-height: 60vh;
	overflow-y: auto;
	padding: 0 20px;
	background: #fff;
	border-radius: 5px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
	text-align: left;
}

.creato-search-results.active {
	display: block;
}

.creato-search-result {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 12px 0;
	border-bottom: 1px solid rgba(74, 74, 74, 0.15);
	color: #4A4A4A;
	text-decoration: none;
	-o-transition: .5s;
	-ms-transition: .5s;
	-moz-transition: .5s;
	-webkit-transition: .5s;
	transition: .5s;
}

.creato-search-result:hover {
	color: #6EAE72;
}

.creato-search-result-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.creato-search-result-title {
	font-weight: 600;
	font-size: 16px;
}

.creato-search-result-type {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	opacity: 0.6;
}

.creato-search-result-price {
	font-size: 15px;
	font-weight: 600;
	color: #4A4A4A;
}

.creato-search-result-price del {
	opacity: 0.5;
	font-weight: 400;
	margin-right: 5px;
}

.creato-search-result-price ins {
	text-decoration: none;
}

.creato-search-result-image {
	flex: 0 0 60px;
	width: 60px;
	height: 60px;
	overflow: hidden;
	border-radius: 5px;
}

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

.creato-search-results-empty {
	padding: 15px 0;
}

.creato-search-results-all {
	display: block;
	padding: 15px 0;
	font-weight: 600;
	color: #DA3B1E;
	text-decoration: none;
}

.creato-search-results-all:hover {
	color: #4A4A4A;
}

/* Search Results Page */

.v2-search-results-switches {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 20px 50px;
	margin: 40px 0;
	padding: 0;
}

.v2-search-results-switches li {
	list-style: none;
	display: inline-block;
	cursor: pointer;
}

.v2-search-results-switches li span {
	display: flex;
	align-items: center;
	gap: 5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1.25px;
	color: #4A4A4A;
	position: relative;
}

.v2-search-results-switches li span::before {
	content: "";
	position: absolute;
	bottom: -5px;
	left: 0;
	height: 2px;
	background: #6EAE72;
	width: 0;
	-o-transition: .8s;
	-ms-transition: .8s;
	-moz-transition: .8s;
	-webkit-transition: .8s;
	transition: .8s;
}

.v2-search-results-switches li.active span::before,
.v2-search-results-switches li:hover span::before {
	width: 100%;
}

/* Results use the same .creato-search-result styling as the header autocomplete */
.search-results-list {
	max-width: 1000px;
	margin: 0 auto;
	border-top: 1px solid rgba(74, 74, 74, 0.15);
}

.v2-search-results-empty {
	text-align: center;
	font-size: 20px;
	margin: 30px 0;
	font-weight: 500;
}

.v2-search-results-tab {
	display: none;
}

.v2-search-results-tab.active {
	display: block;
}

.page-content.search-results h1 {
	text-align: center;
}

@media only screen and (max-width: 768px) {

	.v2-search-results-switches {
		display: grid;
		gap: 0;
		justify-content: unset;
	}

	.v2-search-results-switches li {
		padding: 15px 0;
		border-bottom: 1px solid rgba(0, 0, 0, 0.2);
		-o-transition: .8s;
		-ms-transition: .8s;
		-moz-transition: .8s;
		-webkit-transition: .8s;
		transition: .8s;
	}

	.v2-search-results-switches li span::before {
		content: unset;
	}

	.v2-search-results-switches li.active {
		padding-left: 20px;
	}

	.v2-search-results-switches li.active span::before {
		content: "";
		bottom: unset;
		left: -20px;
		top: 50%;
		width: 4px;
		height: 4px;
		transform: translateY(-50%);
	}

}
