/* Eyebrow Institution - Mobile Filter Drawer 1.2.0
 * Everything visible lives inside the max-width:767px query; above it the
 * sidebar renders exactly as the theme draws it. */

.ei-filter-bar,
.ei-drawer-parts,
.ei-drawer-head,
.ei-drawer-active,
.ei-drawer-foot,
.ei-drawer-backdrop,
.ei-count,
.ei-drawer-only:not(.ei-drawer),
body button.ei-filter-fab,
#secondary button.ei-acc {
	display: none;
}

@media (min-width: 768px) {
	.ei-drawer-only {
		display: none !important;
	}
}

@media (max-width: 767px) {
	:root {
		--ei-ink: #1a1a1a;
		--ei-muted: #7d7467;
		--ei-accent: #b6713e;
		--ei-cream: #fcf7ee;
		--ei-sand: #ecdec1;
		--ei-line: rgba(0, 0, 0, .09);
		--ei-font-head: 'Outfit', sans-serif;
		--ei-font-body: 'Lato', sans-serif;
	}

	/* ---------- toolbar: [Filters] [Sort] ---------- */

	.ei-filter-bar {
		display: flex;
		gap: 10px;
		align-items: stretch;
		margin: 0 0 22px;
	}

	.ei-filter-bar .ei-filter-btn,
	.ei-filter-bar .ei-filter-btn:hover,
	.ei-filter-bar .ei-filter-btn:focus,
	.ei-filter-bar .ei-filter-btn:active {
		flex: 0 0 auto;
		min-width: 0;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		gap: 8px;
		height: 48px;
		margin: 0;
		padding: 0 20px;
		border: 1px solid var(--ei-ink);
		border-radius: 999px;
		background: #fff;
		color: var(--ei-ink);
		box-shadow: none;
		font: 600 15px/1 var(--ei-font-head);
		letter-spacing: .02em;
		text-transform: none;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}

	/* the theme sizes every svg at 1em */
	.ei-filter-btn svg,
	.ei-filter-fab svg {
		flex: none;
		width: 18px !important;
		height: 18px !important;
	}

	#secondary.ei-drawer .ei-drawer-close svg {
		width: 20px !important;
		height: 20px !important;
	}

	#secondary.ei-drawer .ei-acc svg {
		width: 16px !important;
		height: 16px !important;
	}

	#secondary.ei-drawer .ei-active-chip svg {
		flex: none;
		width: 12px !important;
		height: 12px !important;
	}

	.ei-filter-bar .ei-filter-btn:focus-visible,
	.ei-filter-fab:focus-visible,
	#secondary.ei-drawer :focus-visible {
		outline: 2px solid var(--ei-accent);
		outline-offset: 2px;
	}

	.ei-filter-badge:not([hidden]) {
		display: inline-grid;
		place-items: center;
		min-width: 20px;
		height: 20px;
		padding: 0 6px;
		border-radius: 999px;
		background: var(--ei-accent);
		color: #fff;
		font: 700 12px/1 var(--ei-font-body);
	}

	/* the theme's sort dropdown, moved in next to the button */
	.ei-filter-bar .woocommerce-ordering {
		flex: 1 1 0;
		min-width: 0;
		margin: 0;
		float: none;
	}

	.ei-filter-bar .woocommerce-ordering .select2-container {
		width: 100% !important;
		display: block;
	}

	/* the theme sets these with !important, so match it */
	.ei-filter-bar .woocommerce-ordering .select2-container .select2-selection--single {
		display: flex !important;
		align-items: center;
		height: 48px !important;
		margin: 0 !important;
		padding: 0 38px 0 18px !important;
		border: 1px solid var(--ei-ink) !important;
		border-radius: 999px !important;
		background: #fff !important;
	}

	.ei-filter-bar .woocommerce-ordering .select2-container .select2-selection__rendered {
		padding: 0 !important;
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
		font: 500 14px/1.2 var(--ei-font-body) !important;
		letter-spacing: 0;
		text-transform: none;
		color: var(--ei-ink) !important;
	}

	.ei-filter-bar .woocommerce-ordering .select2-container .select2-selection__arrow {
		top: 50% !important;
		right: 16px !important;
		width: 12px !important;
		height: 12px !important;
		transform: translateY(-50%) !important;
	}

	.ei-sort-origin {
		display: none !important;
	}

	/* ---------- floating button once the toolbar has scrolled away ---------- */

	/* body + element prefix: the theme styles button[type="button"] */
	body button.ei-filter-fab,
	body button.ei-filter-fab:hover,
	body button.ei-filter-fab:focus,
	body button.ei-filter-fab:active {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		position: fixed;
		left: 50%;
		bottom: calc(18px + env(safe-area-inset-bottom, 0px));
		z-index: 9990;
		height: 48px;
		margin: 0;
		padding: 0 22px;
		border: 0;
		border-radius: 999px;
		background: var(--ei-ink);
		color: #fff;
		box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
		font: 600 15px/1 var(--ei-font-head);
		letter-spacing: .02em;
		text-transform: none;
		cursor: pointer;
		opacity: 0;
		pointer-events: none;
		transform: translate(-50%, 140%);
		transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .2s ease;
		-webkit-tap-highlight-color: transparent;
	}

	body button.ei-filter-fab.is-visible {
		opacity: 1;
		pointer-events: auto;
		transform: translate(-50%, 0);
	}

	body.ei-filters-open button.ei-filter-fab {
		opacity: 0;
		pointer-events: none;
	}

	/* ---------- the drawer ---------- */

	html.ei-filters-open,
	body.ei-filters-open {
		overflow: hidden;
	}

	#secondary.ei-drawer {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		z-index: 100000;
		display: flex;
		flex-direction: column;
		width: min(88vw, 390px);
		max-width: none;
		margin: 0;
		padding: 0;
		float: none;
		background: var(--ei-cream);
		color: var(--ei-ink);
		overflow-y: auto;
		overscroll-behavior: contain;
		-webkit-overflow-scrolling: touch;
		box-shadow: 0 0 40px rgba(0, 0, 0, .25);
		transform: translateX(-104%);
		visibility: hidden;
		transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .32s;
	}

	body.ei-filters-open #secondary.ei-drawer {
		transform: none;
		visibility: visible;
		transition: transform .32s cubic-bezier(.2, .8, .2, 1), visibility 0s;
	}

	#secondary.ei-drawer.is-dragging {
		transition: none;
	}

	.ei-drawer-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 99999;
		background: rgba(20, 16, 12, .45);
		opacity: 0;
		pointer-events: none;
		transition: opacity .32s ease;
	}

	body.ei-filters-open .ei-drawer-backdrop {
		opacity: 1;
		pointer-events: auto;
	}

	/* the language flag and back-to-top float above everything; park them */
	body.ei-filters-open #trp-floater-ls,
	body.ei-filters-open #back-to-top {
		opacity: 0 !important;
		pointer-events: none !important;
	}

	/* header */
	#secondary.ei-drawer .ei-drawer-head {
		position: sticky;
		top: 0;
		z-index: 3;
		display: flex;
		flex: none;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 12px 12px 12px 22px;
		background: var(--ei-cream);
		border-bottom: 1px solid var(--ei-line);
	}

	#secondary.ei-drawer .ei-drawer-title {
		margin: 0;
		padding: 0;
		background: none;
		font: 600 22px/1.2 var(--ei-font-head);
		letter-spacing: 0;
		text-transform: none;
		color: #000;
	}

	#secondary.ei-drawer .ei-drawer-title::before,
	#secondary.ei-drawer .ei-drawer-title::after {
		display: none;
	}

	#secondary.ei-drawer .ei-drawer-close,
	#secondary.ei-drawer .ei-drawer-close:hover,
	#secondary.ei-drawer .ei-drawer-close:focus,
	#secondary.ei-drawer .ei-drawer-close:active {
		display: grid;
		place-items: center;
		flex: none;
		width: 44px;
		height: 44px;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: rgba(0, 0, 0, .06);
		color: var(--ei-ink);
		box-shadow: none;
		cursor: pointer;
	}

	/* "Selected: Treatments x" */
	#secondary.ei-drawer .ei-drawer-active:not([hidden]) {
		display: flex;
		flex: none;
		flex-wrap: wrap;
		align-items: center;
		gap: 8px 12px;
		padding: 16px 22px;
		border-bottom: 1px solid var(--ei-line);
	}

	#secondary.ei-drawer .ei-drawer-active-label {
		font: 600 11px/1.2 var(--ei-font-head);
		letter-spacing: .14em;
		text-transform: uppercase;
		color: var(--ei-muted);
	}

	#secondary.ei-drawer .ei-active-chip {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		min-height: 36px;
		max-width: 100%;
		padding: 0 14px;
		border-radius: 999px;
		background: var(--ei-ink);
		color: #fff;
		font: 600 14px/1.2 var(--ei-font-body);
		text-decoration: none;
	}

	#secondary.ei-drawer .ei-active-text {
		overflow: hidden;
		white-space: nowrap;
		text-overflow: ellipsis;
	}

	/* widgets become flat sections */
	#secondary.ei-drawer > aside.widget {
		flex: none;
		margin: 0;
		padding: 20px 22px;
		border: 0;
		border-bottom: 1px solid var(--ei-line);
		border-radius: 0;
		background: transparent;
		box-shadow: none;
	}

	#secondary.ei-drawer > aside.widget:last-of-type {
		border-bottom: 0;
	}

	#secondary.ei-drawer > aside.widget .widgettitle {
		margin: 0 0 12px;
		padding: 0;
		border: 0;
		background: none;
		font: 600 11px/1.2 var(--ei-font-head);
		letter-spacing: .14em;
		text-transform: uppercase;
		color: var(--ei-muted);
	}

	#secondary.ei-drawer > aside.widget .widgettitle::before,
	#secondary.ei-drawer > aside.widget .widgettitle::after {
		display: none;
	}

	/* search: the field is self-explanatory, drop its heading */
	#secondary.ei-drawer .widget_product_search .widgettitle {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	#secondary.ei-drawer .woocommerce-product-search {
		position: relative;
		margin: 0;
	}

	#secondary.ei-drawer .woocommerce-product-search .search-field {
		width: 100%;
		height: 48px;
		margin: 0;
		padding: 0 52px 0 20px;
		border: 1px solid rgba(0, 0, 0, .16);
		border-radius: 999px;
		background: #fff;
		box-shadow: none;
		font: 400 16px/1.2 var(--ei-font-body);
		color: var(--ei-ink);
	}

	#secondary.ei-drawer .woocommerce-product-search .search-field:focus {
		border-color: var(--ei-ink);
		outline: none;
	}

	#secondary.ei-drawer .woocommerce-product-search button[type="submit"] {
		position: absolute;
		top: 2px;
		right: 2px;
		bottom: 2px;
		width: 44px;
		height: auto;
		margin: 0;
		border-radius: 50%;
	}

	/* categories: tappable rows, counts in a column, chevrons for branches */
	#secondary.ei-drawer .product-categories {
		margin: 0 -10px;
		padding: 0;
		list-style: none;
	}

	#secondary.ei-drawer .product-categories li.cat-item {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto 44px;
		align-items: center;
		margin: 0;
		padding: 0;
		border: 0;
		list-style: none;
	}

	#secondary.ei-drawer .product-categories li.cat-item::before,
	#secondary.ei-drawer .product-categories li.cat-item::after {
		display: none;
	}

	#secondary.ei-drawer .product-categories li.cat-item > a {
		grid-column: 1;
		display: flex;
		align-items: center;
		min-height: 48px;
		margin: 0;
		padding: 10px;
		border-radius: 12px;
		font: 400 16px/1.35 var(--ei-font-body);
		color: var(--ei-ink);
		text-decoration: none;
		-webkit-tap-highlight-color: transparent;
	}

	#secondary.ei-drawer .product-categories li.cat-item > a:active {
		background: rgba(0, 0, 0, .05);
	}

	#secondary.ei-drawer .product-categories li.cat-item > .count {
		display: none;
	}

	#secondary.ei-drawer .product-categories .ei-count {
		grid-column: 2;
		position: static;
		display: inline-block;
		min-width: 26px;
		padding: 3px 8px;
		border-radius: 999px;
		background: rgba(0, 0, 0, .05);
		font: 600 12px/1.2 var(--ei-font-body);
		text-align: center;
		color: var(--ei-muted);
	}

	#secondary.ei-drawer .product-categories li.current-cat > a {
		font-weight: 700;
		color: var(--ei-accent);
	}

	#secondary.ei-drawer .product-categories li.current-cat > .ei-count {
		background: var(--ei-accent);
		color: #fff;
	}

	#secondary.ei-drawer .product-categories li.ei-empty {
		display: none;
	}

	#secondary.ei-drawer .ei-acc,
	#secondary.ei-drawer .ei-acc:hover,
	#secondary.ei-drawer .ei-acc:focus,
	#secondary.ei-drawer .ei-acc:active {
		grid-column: 3;
		display: grid;
		place-items: center;
		width: 44px;
		height: 44px;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: none;
		color: var(--ei-ink);
		box-shadow: none;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}

	#secondary.ei-drawer .ei-acc svg {
		transition: transform .22s ease;
	}

	#secondary.ei-drawer li.ei-open > .ei-acc svg {
		transform: rotate(180deg);
	}

	#secondary.ei-drawer .product-categories ul.children {
		grid-column: 1 / -1;
		float: none;
		width: auto;
		display: none;
		margin: 0 0 6px 20px;
		padding: 0 0 0 4px;
		border-left: 1px solid rgba(0, 0, 0, .12);
		list-style: none;
	}

	#secondary.ei-drawer .product-categories li.ei-open > ul.children {
		display: block;
	}

	#secondary.ei-drawer .product-categories ul.children li.cat-item > a {
		font-size: 15px;
	}

	/* tags: pill chips */
	#secondary.ei-drawer .tagcloud {
		display: flex;
		flex-wrap: wrap;
		gap: 8px;
		margin: 0;
	}

	#secondary.ei-drawer .tagcloud a {
		display: inline-flex;
		align-items: center;
		gap: 7px;
		min-height: 40px;
		margin: 0;
		padding: 0 14px;
		border: 1px solid rgba(0, 0, 0, .14);
		border-radius: 999px;
		background: #fff;
		box-shadow: none;
		font-family: var(--ei-font-body) !important;
		font-size: 14px !important;
		font-weight: 400;
		line-height: 1.2;
		letter-spacing: 0;
		text-transform: none;
		text-decoration: none;
		color: var(--ei-ink);
		-webkit-tap-highlight-color: transparent;
	}

	#secondary.ei-drawer .tagcloud a .ei-count {
		display: inline;
		font-size: 12px;
		font-weight: 600;
		color: var(--ei-muted);
	}

	#secondary.ei-drawer .tagcloud a.ei-current {
		border-color: var(--ei-ink);
		background: var(--ei-ink);
		color: #fff;
	}

	#secondary.ei-drawer .tagcloud a.ei-current .ei-count {
		color: rgba(255, 255, 255, .7);
	}

	/* footer: [Clear] [Show results (11)] */
	#secondary.ei-drawer .ei-drawer-foot {
		position: sticky;
		bottom: 0;
		z-index: 3;
		display: flex;
		flex: none;
		gap: 10px;
		margin-top: auto;
		padding: 12px 22px calc(12px + env(safe-area-inset-bottom, 0px));
		background: var(--ei-cream);
		border-top: 1px solid var(--ei-line);
	}

	#secondary.ei-drawer .ei-drawer-clear:not([hidden]) {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex: none;
		height: 48px;
		padding: 0 20px;
		border: 1px solid var(--ei-ink);
		border-radius: 999px;
		font: 600 15px/1 var(--ei-font-head);
		color: var(--ei-ink);
		text-decoration: none;
	}

	#secondary.ei-drawer .ei-drawer-apply,
	#secondary.ei-drawer .ei-drawer-apply:hover,
	#secondary.ei-drawer .ei-drawer-apply:focus,
	#secondary.ei-drawer .ei-drawer-apply:active {
		flex: 1 1 auto;
		height: 48px;
		margin: 0;
		padding: 0 18px;
		border: 0;
		border-radius: 999px;
		background: var(--ei-ink);
		color: #fff;
		box-shadow: none;
		font: 600 15px/1 var(--ei-font-head);
		letter-spacing: .02em;
		text-transform: none;
		cursor: pointer;
	}

	#secondary.ei-drawer .ei-drawer-total {
		opacity: .7;
		font-weight: 400;
	}

	/* feedback while a tapped filter loads */
	#secondary.ei-drawer.is-loading > aside.widget {
		opacity: .45;
		pointer-events: none;
		transition: opacity .2s;
	}

	#secondary.ei-drawer .ei-pending {
		position: relative;
	}

	#secondary.ei-drawer .ei-pending::after {
		content: "";
		width: 14px;
		height: 14px;
		margin-left: 10px;
		border: 2px solid currentColor;
		border-right-color: transparent;
		border-radius: 50%;
		animation: ei-spin .7s linear infinite;
	}

	@keyframes ei-spin {
		to { transform: rotate(360deg); }
	}
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
	#secondary.ei-drawer,
	body.ei-filters-open #secondary.ei-drawer,
	.ei-drawer-backdrop,
	body button.ei-filter-fab,
	#secondary.ei-drawer .ei-acc svg {
		transition: none;
	}
}
