/**
 * Prestaworks AB.
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the End User License Agreement(EULA)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * https://license.prestaworks.se/license.html
 *
 * @author    Prestaworks AB <info@prestaworks.se>
 * @copyright Copyright Prestaworks AB (https://www.prestaworks.se/)
 * @license   https://license.prestaworks.se/license.html
 */

.pwsearchbar {
	position: relative;
}



 /**
 * Results container
 */
.pwsearchbar-results,
.pwsearchbar-results:empty {
	opacity: 0;
	pointer-events: none;
}
.pwsearchbar:focus-within .pwsearchbar-results:not(:empty) {
	opacity: 1;
	pointer-events: auto;
}
.pwsearchbar-results {
	background-color: #ffffff;
	border-top: 1px solid #f0f0f0;
	box-shadow: 0 1px 1px rgba(0,0,0,0.05), 
							0 2px 2px rgba(0,0,0,0.05), 
							0 4px 4px rgba(0,0,0,0.05), 
							0 8px 8px rgba(0,0,0,0.05);
	display: flex;
	flex-direction: column;
	max-height: var(--results-max-height, 75vh);
	overflow: hidden;
	width: 100%;

	position: absolute;
	top: 100%;
	left: 0;
	z-index: 1;
}



/**
 * Found products
 */
.pwsearchbar-results-products {
	flex: 1;
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
	overflow-x: hidden;
	overflow-y: auto;
}
.pwsearchbar-results-product {
	font-size: 87.5%;
	padding: 0 0.5rem;
	position: relative;
}
	.pwsearchbar-results-product a {
		align-items: center;
		color: inherit;
		display: flex;
		flex-wrap: nowrap;
		gap: 1rem;
		justify-content: flex-start;
		padding: 0.5rem;
		text-decoration: none;
	}
		.pwsearchbar-results-product a:focus {
			outline: 0;
		}
		.pwsearchbar-results-product a:focus,
		.pwsearchbar-results-product a:hover {
			background-color: #f6f6f6;
		}
	.pwsearchbar-results-product .prices {
		display: flex;
		gap: 0.75em;
	}
	.pwsearchbar-results-product-image {
		flex: 0 0 4rem;
		height: 4rem;
		width: 4rem;
	}
	.pwsearchbar-results-product-info {
		flex: 1;
	}



/**
 * "Showing X out of Y products found. View all products
 */
.pwsearchbar-results-summary {
	align-items: center;
	border-top: 1px solid #eee;
	display: flex;
	flex: 0;
	flex-direction: column;
	justify-content: center;
	font-size: 87.5%;
	padding: 1rem;
	position: relative;
	text-align: center;
}
	@media (min-width: 576px) {
	.pwsearchbar-results-summary {
		align-items: center;
		flex-direction: row;
		justify-content: space-between;
		text-align: left;
	} }
	.pwsearchbar-results-summary:focus-within,
	.pwsearchbar-results-summary:has(a:hover) {
		background-color: #f6f6f6;
		border-color: transparent;
	}
	.pwsearchbar-results-summary a:after {
		content: '';
		display: block;
		height: 100%;
		width: 100%;

		position: absolute;
		top: 0;
		left: 0;
		z-index: 1;
	}



/**
 * No results found
 */
.pwsearchbar-results-empty {
	align-items: center;
	display: flex;
	font-size: 87.5%;
	gap: 1em;
	justify-content: center;
	padding: 1rem;
	text-align: left;
}
	.pwsearchbar-results-empty svg {
		background-color: #d9edf7;
		border-radius: 100%;
		color: #31708f;
		display: block;
		flex: 0 0 3rem;
		height: 3rem;
		padding: 0.75rem;
		width: 3rem;
	}







.pwsearchbar-form {
	position: relative;
}
.pwsearchbar-submit {
	background-color: transparent !important;
	border-width: 0;
	color: var(--bs-btn-bg) !important;
	display: block;
	padding-top: 0;
	padding-bottom: 0;

	position: absolute;
	top: 0;
	bottom: 0;
	right: 0;
}
.pwsearchbar {
	align-items: center;
	display: flex;
	flex-wrap: nowrap;
}
.pwsearchbar.d-none {
	display: none !important;
}
.pwsearchbar-form {
	flex: 1;
}
@media (min-width: 992px) {
	#_desktop_search {
		min-width: 512px;
		position: absolute;
		right: calc(40px + 0.75rem);
		top: calc(50% - 20px);
		z-index: 10;
	}
	.pwsearchbar .form-control {
		height: 40px;
		padding-top: 0;
		padding-bottom: 0;
		padding-right: 40px;
	}
	.pwsearchbar .pwsearchbar-submit {
		align-items: center;
		display: flex;
		justify-content: center;
		height: 40px;
		width: 40px;
		padding: 0;
	}
}
.mobile-header-trigger--searchclose {
	background-color: white;
}