// Import variables and mixins
@import "../abstracts/abstracts";

/* Fibo Search */

.header-search--form {
	.dgwt-wcas-search-wrapp {
		width: 100%;
	}
	.dgwt-wcas-sf-wrapp {
		background-color: transparent;
		padding: 0;
		border-radius: 0;

		input[type="search"].dgwt-wcas-search-input {
			@include font-size(14);
			font-family: inherit;
			color: #1d2128;
			border-width: var(--mt-input__border-width);
			border-style: solid;
			border-color: #dadfe3;
			border-radius: var(--mt-border__radius);
			outline: none;
			transition: 0.4s;
			font-weight: 500;
			height: var(--mt-size__header-item);
			box-shadow: 0px 2px 6px 0px var(--mt-input__box-shadow);
			background-color: var(--mt-input__background-color);

			&::placeholder {
				font-style: normal;
				font-weight: 500;
				color: #7c818b;
			}

		}

		.motta-svg-icon--search {
			@include font-size(20);
		}

		.dgwt-wcas-close path {
			fill: #1d2128;
		}
	}

	.dgwt-wcas-style-pirx  {
		.dgwt-wcas-sf-wrapp {
			button.dgwt-wcas-search-submit {
				top: 8px;
				left: auto;
				right: 15px;

				svg {
					width: 16px;
					height: 16px;
				}
			}

			input[type="search"].dgwt-wcas-search-input {
				background-color: var(--mt-input__background-color);
				box-shadow: 0px 2px 6px 0px var(--mt-input__box-shadow);
				border-radius: var(--mt-border__radius);
				padding-left: 24px;
			}
		}

	}

	&.motta-skin--raised {
		.dgwt-wcas-style-pirx  {
			.dgwt-wcas-sf-wrapp {
				button.dgwt-wcas-search-submit {
					top: 13px;
				}
			}
		}
	}

	.dgwt-wcas-style-solaris {
		.dgwt-wcas-sf-wrapp {
			display: flex;
			align-content: center;
			input[type="search"].dgwt-wcas-search-input {
				padding: 12px 22px;
			}
			button.dgwt-wcas-search-submit {
				position: static;
				font-size: 14px;
				font-size: .875rem;
				border-radius: var(--mt-border__radius);
				background-color: var(--mt-color__primary);
				color: var(--mt-color__primary--light);
				box-shadow: 0 2px 6px 0 var(--mt-color__primary--box-shadow);
				padding: 0;
				min-width: var(--mt-size__header-item);
				font-weight: 500;
				display: inline-flex;
				align-items: center;
				justify-content: center;
				transition: .4s;
				border: none;
				cursor: pointer;
				line-height: var(--mt-size__header-item);
				height: var(--mt-size__header-item);
				margin-left: 12px;

				&::before {
					display: none;
				}

				&:hover,
				&:active,
				&:focus {
					opacity: 1;
					background-color: var(--mt-color__primary--dark);
					box-shadow: 0px 4px 8px 0px var(--mt-color__primary--box-shadow);
				}
			}

			.dgwt-wcas-preloader {
				right: 80px !important;
			}

			.dgwt-wcas-ico-magnifier {
				position: static;
			}
		}
	}

	.dgwt-wcas-close:hover {
		opacity: 1;
	}

}

.dgwt-wcas-suggestions-wrapp {
	box-shadow: 0 4px 8px 0 rgba(0,0,0,.16);
	border: none;
	transform: translateY(10px);
	scroll-behavior: smooth;
	scrollbar-color: $color__dark rgba($color__gray, 0.3);
	scrollbar-width: thin;

	&::-webkit-scrollbar {
		width: 2px;
	}

	&::-webkit-scrollbar-track {
		background-color: rgba($color__gray, 0.3);
	}

	&::-webkit-scrollbar-thumb {
		background-color: $color__dark;
	}
}

.dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline .dgwt-wcas-st {
	@include font-size(14);
	font-weight: 600;
	color: #1d2128;
	padding-bottom: 10px;
	border-color: #dadfe3;
}

.dgwt-wcas-st {
	@include font-size(14);
    color: #1d2128;
}

.dgwt-wcas-sd {
	@include font-size(13);
	color: #7c818b;
	line-height: 1.2
}

.dgwt-wcas-st-breadcrumbs {
	@include font-size(13);
	color: #7c818b;
	opacity: 1;
}

.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax:hover,
.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax.dgwt-wcas-suggestion-selected {
	text-decoration: none;
}

.dgwt-wcas-si {
	width: 100px;

	img {
		border: none;
	}
}

.dgwt-wcas-suggestion-history-search {
	.dgwt-wcas-si {
		width:auto;
	}
}

.dgwt-wcas-content-wrapp {
	padding-left: 20px;
}

.dgwt-wcas-sp {
	@include font-size(14);
	font-weight: 500;
	color: #1d2128;
	line-height: 1.2;

	del {
		@include font-size(13);
		font-weight: 500;
   	 	color: #7c818b;
		opacity: 1;
	}

	ins {
		color: #ff311c;
		background-color: transparent;
	}
}

.dgwt-wcas-sp {
	padding-left: 15px;
}

.dgwt-wcas-suggestion.dgwt-wcas-suggestion-more {
	@include font-size(14);
	font-weight: 500;
	color: #1d2128;
	text-decoration: underline;
	text-transform: capitalize;
	margin-bottom: 10px;
}

.dgwt-wcas-suggestion {
	padding: 10px 15px;
	background-color: transparent;

	.dgwt-wcas-st-title {
		border-bottom: 1px solid transparent;
		transition: 0.3s;
		display: inline;
	}
}

.dgwt-wcas-suggestion-selected {
	.dgwt-wcas-st-title {
		border-color: #1d2128;
	}
}

.dgwt-wcas-is-details {
	.dgwt-wcas-suggestions-wrapp {
		box-shadow: -5px 4px 8px 0px rgba(0,0,0,.16);
	}

	.dgwt-wcas-details-wrapp {
		box-shadow: 0px 4px 8px 0px rgba(0,0,0,.16);
		border: none;
		transform: translateY(10px);
		border-left: 1px solid #eee;
	}

	.dgwt-wcas-si {
		width: 40px;
	}

	.dgwt-wcas-content-wrapp {
		padding-left: 10px;
	}
}

.dgwt-wcas-details-main-image {
	margin-bottom: 15px;
}

.dgwt-wcas-details-product-sku {
	padding-top: 5px;
	font-weight: 500;
   	color: #7c818b;
}

a.dgwt-wcas-details-post-title, a.dgwt-wcas-details-product-title {
	@include font-size(18);
	padding-top: 10px;
	font-weight: 500;
	border-bottom: 1px solid transparent;
	transition: 0.3s;
	display: inline;

	&:hover {
		text-decoration: none;
		border-color: #1d2128;
	}
}

.dgwt-wcas-pd-rating {
	margin-top: 5px;
	display: flex;
	align-items: center;
	.max-rating span {
		&:before {
			content: '';
			background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkIj4KICAgICAgICA8c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iI2RhZGZlMyIvPgogICAgICAgIDxzdG9wIG9mZnNldD0iNTAlIiBzdG9wLWNvbG9yPSIjZGFkZmUzIi8+CiAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICA8L2RlZnM+CiAgICA8cGF0aCBmaWxsPSJ1cmwoI2dyYWQpIiBkPSJNMjAuMzg4LDEwLjkxOEwzMiwxMi4xMThsLTguNzM1LDcuNzQ5TDI1LjkxNCwzMS40bC05Ljg5My02LjA4OEw2LjEyNywzMS40bDIuNjk1LTExLjUzM0wwLDEyLjExOAogIGwxMS41NDctMS4yTDE2LjAyNiwwLjZMMjAuMzg4LDEwLjkxOHoiLz4KICA8L3N2Zz4=");
			width: 10px;
			height: 10px;
			background-size: 10px;
			display: block;
		}
	}

	.user-rating span {
		&:before {
			content: '';
			background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAzMiAzMiI+CiAgICA8ZGVmcz4KICAgICAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkIj4KICAgICAgICA8c3RvcCBvZmZzZXQ9IjUwJSIgc3RvcC1jb2xvcj0iI2ZmYTEzMiIvPgogICAgICAgIDxzdG9wIG9mZnNldD0iNTAlIiBzdG9wLWNvbG9yPSIjZmZhMTMyIi8+CiAgICAgIDwvbGluZWFyR3JhZGllbnQ+CiAgICA8L2RlZnM+CiAgICA8cGF0aCBmaWxsPSJ1cmwoI2dyYWQpIiBkPSJNMjAuMzg4LDEwLjkxOEwzMiwxMi4xMThsLTguNzM1LDcuNzQ5TDI1LjkxNCwzMS40bC05Ljg5My02LjA4OEw2LjEyNywzMS40bDIuNjk1LTExLjUzM0wwLDEyLjExOAogIGwxMS41NDctMS4yTDE2LjAyNiwwLjZMMjAuMzg4LDEwLjkxOHoiLz4KICA8L3N2Zz4=");
			width: 10px;
			height: 10px;
			background-size: 10px;
			display: block;
		}
	}

	.dgwt-wcas-pd-review {
		@include font-size(12);
		font-weight: 500;
   		color: #7c818b;
		transform: translateY(1px);
	}

}

.dgwt-wcas-pd-price {
	del {
		@include font-size(14);
		font-weight: 500;
   	 	color: #7c818b;
		opacity: 1;
	}

	ins {
		@include font-size(16);
		color: #ff311c;
		background-color: transparent;
		font-weight: 500;
	}
}

.dgwt-wcas-details-wrapp .dgwt-wcas-pd-addtc-form {
	.quantity {
		margin-right: 15px;
		border: none;
		.motta-qty-button {
			padding: 0;
		}
	}

	.button {
		line-height: 44px;
		padding: 0 15px;
		min-width: auto;
		width: 100%;
	}

	.add_to_cart_inline {
		width: 100%;
	}
}

.dgwt-wcas-tpd-image {
	min-width: 70px;
}

.dgwt-wcas-tpd-rest-title {
	@include font-size(13);
	margin: 0;
}

.dgwt-wcas-tpd-price {
	margin-top: 5px;
}

a.dgwt-wcas-details-more-products {
	@include font-size(14);
	color: #1d2128;
	text-decoration: underline;
}

body:not(.dgwt-wcas-open-pre-suggestions) .dgwt-wcas-search-focused:not(.dgwt-wcas-search-filled) .header-search__trending {
    opacity: 1;
    visibility: visible;
    pointer-events: initial;
    z-index: 101;
}

.header-mobile-contents {
	.header-search--form.motta-skin--raised .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
		top: 8px;
	}
}

.dgwt-wcas-overlay-mobile-on .dgwt-wcas-suggestions-wrapp {
	box-shadow: none;
}

.js-dgwt-wcas-overlay-mobile {
	.dgwt-wcas-search-form .header-search__trending {
		width: calc( 100vw - 15px );
		left: auto;
		right: 10px;
	}

	.dgwt-wcas-search-wrapp {
		min-width: auto;
	}

	input[type="search"].dgwt-wcas-search-input {
		&::placeholder {
			@include font-size(16);
			font-style: normal;
			font-weight: 500;
			color: #7c818b;
		}

	}
}

.dgwt-wcas-om-bar button.dgwt-wcas-om-return {
	background-color: transparent;
	color: #1d2128;

	svg {
		fill: #1d2128;
	}
}

.dgwt-wcas-search-wrapp-mobile .dgwt-wcas-search-form input[type="search"].dgwt-wcas-search-input {
	box-shadow: none;
}

.fibo-search-modal {
	display: none;
}