/**
 * G Product Search layout overrides.
 * Beats legacy BodyCommerce style.min.css flex form rules for D5 layout options.
 */

.et_pb_db_products_search .et_pb_module_inner,
.et_pb_db_products_search form {
	width: 100%;
	max-width: 100%;
}

.et_pb_db_products_search:not(.fullwidth-elements) form {
	display: flex !important;
	align-items: stretch !important;
}

.et_pb_db_products_search:not(.fullwidth-elements) .search-field {
	flex-grow: 1 !important;
	min-width: 0;
	box-sizing: border-box;
	margin: 0 !important;
}

.et_pb_db_products_search .search-field:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.et_pb_db_products_search .search-field::placeholder,
.et_pb_db_products_search .search-field::-webkit-input-placeholder,
.et_pb_db_products_search .search-field::-moz-placeholder,
.et_pb_db_products_search .search-field:-ms-input-placeholder {
	opacity: 1;
}

.et_pb_db_products_search.fullwidth-elements form {
	display: flex !important;
	flex-direction: column !important;
	align-items: stretch !important;
}

.et_pb_db_products_search.fullwidth-elements .button,
.et_pb_db_products_search.fullwidth-elements .search-field,
.et_pb_db_products_search.no-button .search-field {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
}

.et_pb_db_products_search.fullwidth-elements .search-field {
	margin-bottom: 0 !important;
}

.et_pb_db_products_search.button-position-left:not(.fullwidth-elements) form {
	flex-direction: row-reverse !important;
}

.et_pb_db_products_search.icon-only-button .button {
	font-size: 0 !important;
	line-height: 1 !important;
}

.et_pb_db_products_search.icon-only-button .button:before,
.et_pb_db_products_search.icon-only-button .button:after {
	font-size: inherit !important;
}

/* Custom search button icons (works even when Divi static CSS skips module styles). */
.et_pb_db_products_search.et_pb_woo_custom_button_icon button.button.et_pb_custom_button_icon[data-icon] {
	position: relative;
}

.et_pb_db_products_search.et_pb_woo_custom_button_icon button.button.et_pb_custom_button_icon[data-icon][data-button-icon-placement="left"]:before {
	content: attr(data-icon) !important;
	opacity: 1 !important;
	display: inline-block !important;
	position: relative !important;
	top: auto !important;
	transform: none !important;
	margin-right: 0.3em !important;
	margin-left: 0 !important;
	vertical-align: middle !important;
	font-family: ETmodules !important;
	font-weight: 400 !important;
	font-size: 16px !important;
	line-height: 1 !important;
	color: var(--de-bc-search-button-icon-color, currentColor) !important;
	speak: none;
	font-style: normal !important;
	text-transform: none !important;
}

.et_pb_db_products_search.et_pb_woo_custom_button_icon button.button.et_pb_custom_button_icon[data-icon][data-button-icon-placement="left"]:after {
	display: none !important;
	content: none !important;
	opacity: 0 !important;
}

.et_pb_db_products_search.et_pb_woo_custom_button_icon button.button.et_pb_custom_button_icon[data-icon][data-button-icon-placement="right"]:after,
.et_pb_db_products_search.et_pb_woo_custom_button_icon button.button.et_pb_custom_button_icon[data-icon]:not([data-button-icon-placement]):after {
	content: attr(data-icon) !important;
	opacity: 1 !important;
	display: inline-block !important;
	position: relative !important;
	top: auto !important;
	transform: none !important;
	margin-left: 0.3em !important;
	vertical-align: middle !important;
	font-family: ETmodules !important;
	font-weight: 400 !important;
	font-size: 16px !important;
	line-height: 1 !important;
	color: var(--de-bc-search-button-icon-color, currentColor) !important;
	speak: none;
	font-style: normal !important;
	text-transform: none !important;
}

.et_pb_db_products_search.et_pb_woo_custom_button_icon button.button.et_pb_custom_button_icon[data-icon][data-button-icon-placement="right"]:before,
.et_pb_db_products_search.et_pb_woo_custom_button_icon button.button.et_pb_custom_button_icon[data-icon]:not([data-button-icon-placement]):before {
	display: none !important;
	content: none !important;
	opacity: 0 !important;
}

.et_pb_db_products_search.icon-only-button .button .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@media (max-width: 980px) {
	.et_pb_db_products_search:not(.fullwidth-elements) .search-field {
		flex-grow: 1 !important;
	}
}

@media (max-width: 767px) {
	.et_pb_db_products_search:not(.fullwidth-elements) form {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
	}

	.et_pb_db_products_search:not(.fullwidth-elements) .search-field,
	.et_pb_db_products_search:not(.fullwidth-elements) .button {
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
	}

	.et_pb_db_products_search.button-position-left:not(.fullwidth-elements) form {
		flex-direction: column !important;
	}

	.et_pb_db_products_search.hide-button-phone .button {
		display: none !important;
	}
}
