/*
 * ECC Shop Filters
 *
 * The dropdown look itself comes from the existing "Eclipse Custom HUSKY
 * Dropdown" rules in Appearance > Customize > Additional CSS. This file only
 * adds what is new: the locked state, hidden options and the sort dropdown.
 */

/* Options that do not apply to the brand or model chosen above. */
.eclipse-dropdown-options li.ecc-sf-hidden {
	display: none;
}

/* A dropdown that is waiting for the one above it. */
.eclipse-custom-dropdown.ecc-sf-is-disabled .eclipse-dropdown-button,
.eclipse-custom-dropdown.ecc-sf-is-disabled .eclipse-dropdown-button:hover,
.eclipse-custom-dropdown.ecc-sf-is-disabled .eclipse-dropdown-button:focus {
	color: #8a8f94;
	cursor: not-allowed;
	opacity: 0.65;
}

.eclipse-dropdown-options li:focus-visible {
	outline: 2px solid #046c63;
	outline-offset: -2px;
}

/* Sort dropdown: right of the "Parts list" heading, lined up with its base. */
.ecc-sf-sort-row {
	flex-wrap: wrap;
	row-gap: 12px;
}

.ecc-sf-sort-row--own {
	display: flex;
	justify-content: flex-end;
	margin-bottom: 20px;
}

.ecc-sf-sort {
	flex: 0 0 auto;
	width: 240px;
	max-width: 100%;
	margin-left: auto;
	align-self: flex-end;
}

.ecc-sf-sort .eclipse-dropdown-options {
	left: auto;
	right: 0;
}

@media (max-width: 600px) {
	.ecc-sf-sort {
		width: 100%;
	}
}

/*
 * Buttons under the filters.
 * Find Parts comes first and stays green. Reset sits beside it, 12px away:
 * light grey with green text, dark grey with white text on hover.
 */
body .shop-category-filters .woof_submit_search_form_container,
body .woof .woof_submit_search_form_container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	/* HUSKY's own stylesheet pushes the two buttons to opposite edges. */
	justify-content: flex-start;
	gap: 12px;
	overflow: visible;
}

body .shop-category-filters button.woof_submit_search_form,
body .woof button.woof_submit_search_form {
	order: 1;
	float: none;
	margin: 0;
}

body .shop-category-filters button.woof_reset_search_form,
body .woof button.woof_reset_search_form {
	order: 2;
	float: none;
	margin: 0;
	background-color: var(--e-global-color-aa7264e, #edeef0);
	color: var(--e-global-color-primary, #046c63);
	fill: var(--e-global-color-primary, #046c63);
	border: 0;
	transition: background-color 0.2s ease, color 0.2s ease;
}

body .shop-category-filters button.woof_reset_search_form:hover,
body .shop-category-filters button.woof_reset_search_form:focus,
body .woof button.woof_reset_search_form:hover,
body .woof button.woof_reset_search_form:focus {
	background-color: var(--e-global-color-5cd2d980, #54595f);
	color: #fff;
	fill: #fff;
}

/* Loading graphic: a pixel mechanic at his microscope. */
.ecc-sf-loader {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.72);
}

.ecc-sf-loader.is-on {
	display: flex;
}

/* A circle, 92% opaque so a little of the page shows through. */
.ecc-sf-loader__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 200px;
	height: 200px;
	padding: 6px 0 0;
	background: rgba(255, 255, 255, 0.92);
	border-radius: 50%;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
	text-align: center;
}

.ecc-sf-loader__art img {
	display: block;
	width: 120px;
	height: 96px;
	margin: 0 auto;
}

.ecc-sf-loader__text {
	margin-top: 6px;
	color: var(--e-global-color-primary, #046c63);
	font-family: "Work Sans", Helvetica, Arial, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}
