/**
 * AMP Product Search - base styles.
 *
 * Distilled from FiboSearch free 1.25.0 assets/css/style.css: only the rules
 * that styled the components this module renders (search form + suggestions
 * dropdown). Class names are kept identical to FiboSearch so the amp-revised
 * theme overrides (custom-style.css / responsive-style.css) continue to apply
 * on top of these rules exactly as they did before the swap - including
 * hiding the bar under 1200px.
 */

/* ---------- Search form ---------- */

.dgwt-wcas-search-wrapp {
	position: relative;
	line-height: 100%;
	display: block;
	color: #444;
	min-width: 230px;
	width: 100%;
	text-align: left;
	margin: 0 auto;
	box-sizing: border-box;
}

.dgwt-wcas-search-wrapp *,
.dgwt-wcas-suggestions-wrapp * {
	box-sizing: border-box;
}

.dgwt-wcas-search-form {
	margin: 0;
	padding: 0;
	width: 100%;
}

.dgwt-wcas-sf-wrapp {
	position: relative;
}

input[type="search"].dgwt-wcas-search-input {
	transition: none;
	box-shadow: none;
	margin: 0;
	-webkit-appearance: textfield;
	text-align: left;
}

[type="search"].dgwt-wcas-search-input::-ms-clear {
	display: none;
}

[type="search"].dgwt-wcas-search-input::-webkit-search-decoration,
[type="search"].dgwt-wcas-search-input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
	width: 100%;
	height: 40px;
	font-size: 14px;
	line-height: 100%;
	padding: 10px 15px;
	margin: 0;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 3px;
	-webkit-appearance: none;
	box-sizing: border-box;
}

body.dgwt-wcas-open .dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input {
	border-radius: 3px 3px 0 0;
}

.dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input:focus {
	outline: 0;
	background: #fff;
	box-shadow: 0 0 9px 1px rgba(0, 0, 0, 0.06);
	transition: all 150ms ease-in;
}

.dgwt-wcas-sf-wrapp input[type="search"].dgwt-wcas-search-input::placeholder {
	color: #999;
	font-weight: normal;
	font-style: italic;
	line-height: normal;
}

/* ---------- Submit button ---------- */

button.dgwt-wcas-search-submit {
	position: relative;
}

.dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
	overflow: visible;
	position: absolute;
	border: 0;
	margin: 0;
	cursor: pointer;
	height: 40px;
	min-width: 50px;
	width: auto;
	line-height: 100%;
	min-height: 100%;
	right: 0;
	left: auto;
	top: 0;
	bottom: auto;
	padding: 0 15px;
	color: #fff;
	transition: all 250ms ease-in-out;
	text-transform: uppercase;
	background-color: #333;
	border-radius: 0 2px 2px 0;
	text-shadow: 0 -1px 0 rgba(0, 0, 0, .3);
	box-shadow: none;
	-webkit-appearance: none;
}

.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:hover,
.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:active,
.dgwt-wcas-sf-wrapp .dgwt-wcas-search-submit:focus {
	opacity: 0.7;
	outline: 0;
}

.dgwt-wcas-ico-magnifier {
	bottom: 0;
	left: 0;
	margin: auto;
	position: absolute;
	right: 0;
	top: 0;
	height: 65%;
	display: block;
}

.dgwt-wcas-has-submit .dgwt-wcas-search-submit svg path {
	fill: #fff;
}

/* ---------- Loading spinner ---------- */

.dgwt-wcas-preloader {
	display: none;
	position: absolute;
	top: 50%;
	right: 58px;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	border: 2px solid rgba(0, 0, 0, 0.12);
	border-top-color: rgba(0, 0, 0, 0.45);
	border-radius: 50%;
	animation: amp-ps-spin 0.7s infinite linear;
}

.amp-ps-loading .dgwt-wcas-preloader {
	display: block;
}

@keyframes amp-ps-spin {
	100% { transform: rotate(360deg); }
}

/* ---------- Suggestions dropdown ---------- */

.dgwt-wcas-suggestions-wrapp {
	background: #fff none repeat scroll 0 0;
	border: 1px solid #ddd;
	border-top: none;
	padding: 0;
	margin: 0;
	box-sizing: border-box;
	overflow-y: auto;
}

.dgwt-wcas-suggestions-wrapp a:focus {
	outline: none;
}

.dgwt-wcas-suggestion {
	cursor: pointer;
	font-size: 12px;
	line-height: 110%;
	text-align: left;
	padding: 7px 10px;
	position: relative;
	border-bottom: 1px solid #dfdfdf;
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	color: inherit;
	text-decoration: none;
}

.dgwt-wcas-suggestion-selected {
	background-color: #eeeeee;
}

.dgwt-wcas-suggestion-nores {
	font-size: 15px;
	line-height: 157%;
	padding: 15px;
	width: 100%;
	color: #444;
}

.dgwt-wcas-has-img .dgwt-wcas-suggestion.dgwt-wcas-suggestion-product {
	padding-top: 8px;
	padding-bottom: 8px;
	min-height: 60px;
}

.dgwt-wcas-st {
	display: block;
	color: #444;
	font-size: 15px;
	width: 100%;
	line-height: 110%;
}

.dgwt-wcas-st > span {
	display: inline-block;
	vertical-align: middle;
}

.dgwt-wcas-si {
	width: 50px;
	display: block;
	height: 100%;
	flex-shrink: 0;
}

.dgwt-wcas-si img {
	background: #fff none repeat scroll 0 0;
	border: 1px solid #e8e8e8;
	border-radius: 3px;
	display: block;
	margin: auto;
	padding: 2px;
	height: auto;
	width: auto;
	max-height: 56px;
	max-width: 100%;
}

.dgwt-wcas-content-wrapp {
	display: flex;
	height: 100%;
	width: 100%;
	justify-content: space-between;
	align-items: center;
	padding-left: 10px;
}

.dgwt-wcas-sp {
	color: #555;
	font-size: 14px;
	line-height: 120%;
	text-align: right;
	padding-left: 10px;
	white-space: nowrap;
}

.dgwt-wcas-sp del {
	opacity: 0.5;
	font-size: 12px;
}

/* Group headlines ("Categories" / "Products") */

.dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline {
	pointer-events: none;
	display: block;
	font-weight: 500;
	white-space: nowrap;
}

.dgwt-wcas-has-headings .dgwt-wcas-suggestion-headline .dgwt-wcas-st {
	border-bottom: 1px solid #ddd;
	padding-bottom: 3px;
	text-transform: uppercase;
	margin-top: 16px;
	font-size: 12px;
}

.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-headline,
.dgwt-wcas-has-headings .dgwt-wcas-suggestion.dgwt-wcas-suggestion-tax {
	border-bottom: none;
}

.dgwt-wcas-has-headings .dgwt-wcas-suggestion-tax .dgwt-wcas-st {
	padding: 0;
}

.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 {
	background: transparent;
	text-decoration: underline;
}

/* "See all products..." row */

.dgwt-wcas-suggestion.dgwt-wcas-suggestion-more {
	min-height: 30px;
	text-transform: uppercase;
}

.dgwt-wcas-suggestion.dgwt-wcas-suggestion-more .dgwt-wcas-st-more {
	padding: 0 10px;
	text-align: center;
	width: 100%;
}
