/* B2B search enhancement - staging theme only */
.b2b-search-wrapper {
	position: relative;
}

.b2b-search-form {
	display: flex;
	width: 100%;
	align-items: stretch;
}

.b2b-search-form .wpo-search-inner {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
}

.b2b-search-form .input-search {
	width: 100%;
	height: 54px;
	padding: 0 48px 0 18px;
	border: 1px solid #d9e0e5;
	border-right: 0;
	border-radius: 9px 0 0 9px;
	background: #fff;
	color: #1f2933;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
	outline: none;
	box-shadow: none;
	transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.b2b-search-form .input-search::placeholder {
	color: #7b8794;
	opacity: 1;
}

.b2b-search-form .input-search:focus {
	border-color: #1fb455;
	box-shadow: 0 0 0 3px rgba(31, 180, 85, .11);
}

.b2b-search-form .btn-search {
	height: 54px;
	min-width: 170px;
	padding: 0 16px;
	border-radius: 0 9px 9px 0;
	display: grid;
	grid-template-columns: 24px minmax(72px, 1fr) 24px;
	column-gap: 8px;
	align-items: center;
	justify-items: center;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: .01em;
	white-space: nowrap;
	transition: filter .18s ease, transform .18s ease, box-shadow .18s ease;
}

.b2b-search-form .btn-search::after {
	content: '';
	display: block;
	width: 24px;
	height: 1px;
}

.b2b-search-form .btn-search:hover {
	filter: brightness(.96);
}

.b2b-search-form .btn-search:active {
	transform: translateY(1px);
}

.b2b-search-form .btn-search .svg.search {
	display: block;
	position: static;
	width: 21px;
	height: 21px;
	margin: 0;
	transform: none;
}

.b2b-search-label {
	display: block;
	position: static;
	margin: 0;
	padding: 0;
	line-height: 1.2;
	transform: none;
	text-align: center;
}

.b2b-search-clear {
	position: absolute;
	right: 10px;
	top: 50%;
	z-index: 3;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #6b7280;
	font-size: 22px;
	font-weight: 300;
	line-height: 28px;
	text-align: center;
	transform: translateY(-50%);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transition: color .15s ease, background-color .15s ease, opacity .15s ease;
}

.b2b-search-clear.is-visible {
	opacity: 1;
	visibility: visible;
}

.b2b-search-clear:hover,
.b2b-search-clear:focus {
	background: #f1f4f6;
	color: #20262d;
	outline: none;
}

.b2b-search-wrapper .ajaxSearchResults {
	margin-top: 7px;
	border: 1px solid #e1e6ea;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 14px 34px rgba(31, 41, 51, .12);
	overflow: hidden;
	z-index: 60;
}

.b2b-search-wrapper.b2b-history-open .ajaxSearchResults {
	display: none !important;
}

.b2b-search-wrapper .resultsContent {
	max-height: 430px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.b2b-search-wrapper .item-ult {
	position: relative;
	transition: background-color .15s ease;
}

.b2b-search-wrapper .item-ult:hover {
	background: #f8faf9;
}

.b2b-search-wrapper .item-ult .thumbs img {
	object-fit: contain;
	background: #fff;
}

.b2b-search-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 9px;
	margin-top: 4px;
	font-size: 12px;
	line-height: 1.35;
	color: #69737d;
}

.b2b-search-sku {
	font-weight: 600;
	color: #3d4852;
}

.b2b-search-vendor::before {
	content: '•';
	margin-right: 8px;
	color: #a8b0b7;
}

.b2b-search-wrapper .dataEmpty {
	margin: 0;
	padding: 18px;
	color: #53606c;
	font-size: 14px;
	line-height: 1.55;
}

.b2b-search-wrapper .resultsMore a {
	font-weight: 600;
}

.b2b-search-wrapper.is-searching .btn-search {
	cursor: progress;
}

/* Recent searches */
.b2b-search-history-panel {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 7px);
	z-index: 80;
	padding: 14px 16px 12px;
	border: 1px solid #e1e6ea;
	border-radius: 10px;
	background: #fff;
	box-shadow: 0 14px 34px rgba(31, 41, 51, .12);
}

.b2b-search-history-panel.is-visible {
	display: block;
}

.b2b-search-history__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.b2b-search-history__title {
	margin: 0;
	color: #27313a;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
}

.b2b-search-history__clear {
	padding: 3px 0;
	border: 0;
	background: transparent;
	color: #66717c;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.4;
	cursor: pointer;
}

.b2b-search-history__clear:hover,
.b2b-search-history__clear:focus {
	color: #1fb455;
	outline: none;
}

.b2b-search-history__list {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.b2b-search-history__item {
	margin: 0;
	padding: 0;
}

.b2b-search-history__button {
	display: inline-flex;
	align-items: center;
	max-width: 100%;
	min-height: 34px;
	padding: 7px 11px;
	border: 1px solid #dfe5e9;
	border-radius: 999px;
	background: #f8faf9;
	color: #34404a;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.b2b-search-history__button::before {
	content: '↻';
	margin-right: 6px;
	color: #8a949d;
	font-size: 13px;
	line-height: 1;
}

.b2b-search-history__button:hover,
.b2b-search-history__button:focus {
	border-color: #a9d9b9;
	background: #f2fbf5;
	color: #16763a;
	outline: none;
}

.b2b-search-history__button span {
	display: block;
	max-width: 250px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

@media (max-width: 991px) {
	.b2b-search-form .input-search {
		height: 48px;
		padding-left: 15px;
		font-size: 15px;
	}

	.b2b-search-form .btn-search {
		height: 48px;
		min-width: 54px;
		padding: 0 14px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.b2b-search-form .btn-search::after {
		display: none;
	}

	.b2b-search-form .btn-search .svg.search {
		position: static;
		transform: none;
	}

	.b2b-search-label {
		display: none;
	}

	.b2b-search-wrapper .ajaxSearchResults,
	.b2b-search-history-panel {
		margin-top: 5px;
		border-radius: 8px;
	}

	.b2b-search-wrapper .resultsContent {
		max-height: 56vh;
	}

	.b2b-search-history-panel {
		top: calc(100% + 5px);
		padding: 12px 13px 10px;
	}

	.b2b-search-history__button span {
		max-width: 190px;
	}
}

@media (max-width: 575px) {
	.b2b-search-form .input-search {
		font-size: 14px;
	}

	.b2b-search-history__list {
		display: block;
	}

	.b2b-search-history__item + .b2b-search-history__item {
		margin-top: 4px;
	}

	.b2b-search-history__button {
		width: 100%;
		border-radius: 8px;
		background: #fff;
	}

	.b2b-search-history__button span {
		max-width: calc(100vw - 105px);
	}
}
