/*
 * Completely disable Salient/WooCommerce's native sidebar
 * on desktop, tablet and mobile.
 */
body.woocommerce.archive .container.main-content #sidebar,
body.woocommerce.archive .container.main-content .woocommerce-sidebar {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* Shared drawer styling. */
#exelixis-shop-drawer {
	--exelixis-drawer-width: 300px;
	--exelixis-drawer-top: 0px;

	position: fixed !important;
	z-index: 100001 !important;

	display: block !important;

	background: #ffffff !important;
	color: #111111 !important;

	border-right: 1px solid rgba(0, 0, 0, 0.10) !important;
	box-shadow: 8px 0 30px rgba(0, 0, 0, 0.15) !important;

	overflow: hidden !important;

	transform: translate3d(-105%, 0, 0) !important;

	transition:
		transform 0.32s cubic-bezier(0.22, 1, 0.36, 1) !important;

	will-change: transform;
}

body.exelixis-drawer-open #exelixis-shop-drawer {
	transform: translate3d(0, 0, 0) !important;
}

.exelixis-shop-drawer-inner {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
}

.exelixis-shop-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;

	flex: 0 0 auto;

	min-height: 68px;

	padding: 14px 18px;

	border-bottom: 1px solid rgba(0, 0, 0, 0.10);
}

.exelixis-shop-drawer-header strong {
	font-size: 19px;
	font-weight: 700;
	line-height: 1.2;
}

.exelixis-shop-drawer-close {
	display: flex;
	align-items: center;
	justify-content: center;

	width: 42px;
	height: 42px;

	margin: 0;
	padding: 0;

	border: 0;
	border-radius: 50%;

	background: rgba(0, 0, 0, 0.07);
	color: #111111;

	font-size: 27px;
	font-weight: 400;
	line-height: 1;

	cursor: pointer;
}

.exelixis-shop-drawer-close:hover {
	background: rgba(0, 0, 0, 0.14);
}

.exelixis-shop-drawer-content {
	flex: 1 1 auto;

	padding: 12px 18px 35px;

	overflow-x: hidden;
	overflow-y: auto;

	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

/* Category list. */
.exelixis-product-categories,
.exelixis-product-categories ul {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.exelixis-product-categories li {
	position: relative !important;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.exelixis-product-categories > li {
	border-bottom: 1px solid rgba(0, 0, 0, 0.09);
}

.exelixis-product-categories li > a {
	display: block !important;

	padding: 12px 42px 12px 0 !important;

	color: #111111 !important;

	font-size: 14px !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;

	text-decoration: none !important;
}

.exelixis-product-categories .exelixis-shop-home > a {
	font-weight: 750 !important;
}

.exelixis-product-categories .current-cat > a {
	font-weight: 750 !important;
}

.exelixis-product-categories .count {
	margin-left: 5px !important;
	opacity: 0.48 !important;
	font-size: 12px !important;
}

/* Nested categories collapsed by default. */
.exelixis-product-categories li > ul {
	display: none !important;
	padding: 0 0 8px 15px !important;
}

.exelixis-product-categories li.exelixis-category-open > ul {
	display: block !important;
}

.exelixis-product-categories li > ul > li > a {
	padding-top: 8px !important;
	padding-bottom: 8px !important;

	font-size: 13px !important;
	font-weight: 400 !important;
}

/* +/- category button. */
.exelixis-category-toggle {
	position: absolute !important;
	top: 7px !important;
	right: 0 !important;
	z-index: 2 !important;

	display: flex !important;
	align-items: center !important;
	justify-content: center !important;

	width: 32px !important;
	height: 32px !important;

	margin: 0 !important;
	padding: 0 !important;

	border: 0 !important;
	border-radius: 6px !important;

	background: rgba(0, 0, 0, 0.07) !important;
	color: #111111 !important;

	font-size: 20px !important;
	font-weight: 500 !important;
	line-height: 1 !important;

	cursor: pointer !important;
}

.exelixis-category-toggle:hover {
	background: rgba(0, 0, 0, 0.15) !important;
}

/* Mobile backdrop. */
#exelixis-shop-drawer-backdrop {
	position: fixed;
	inset: 0;
	z-index: 100000;

	display: block;

	background: rgba(0, 0, 0, 0.48);

	opacity: 0;
	visibility: hidden;
	pointer-events: none;

	transition:
		opacity 0.25s ease,
		visibility 0.25s ease;
}

body.exelixis-drawer-open #exelixis-shop-drawer-backdrop {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Desktop behaviour. */
@media only screen and (min-width: 1000px) {

	#exelixis-shop-drawer {
		--exelixis-drawer-width: 290px;

		top: calc(var(--exelixis-drawer-top) + 12px) !important;
		left: 20px !important;
		bottom: 16px !important;

		width: var(--exelixis-drawer-width) !important;
		height: auto !important;
		max-height: calc(100vh - var(--exelixis-drawer-top) - 26px) !important;

		border-radius: 22px !important;
		border: 1px solid rgba(0, 0, 0, 0.08) !important;
		border-right: 1px solid rgba(0, 0, 0, 0.08) !important;

		box-shadow: 0 12px 35px rgba(0, 0, 0, 0.16) !important;

		overflow: hidden !important;
	}

	body:not(.exelixis-drawer-open)
	#exelixis-shop-drawer {
		transform: translate3d(calc(-100% - 30px), 0, 0) !important;
	}

	body.exelixis-drawer-open
	#exelixis-shop-drawer {
		transform: translate3d(0, 0, 0) !important;
	}

	#exelixis-shop-drawer-backdrop {
		display: none !important;
	}

	#ajax-content-wrap {
		transition:
			padding-left 0.32s cubic-bezier(0.22, 1, 0.36, 1) !important;
	}

	body.exelixis-drawer-open
	#ajax-content-wrap {
		padding-left: 330px !important;
		box-sizing: border-box !important;
	}

	body:not(.exelixis-drawer-open)
	#ajax-content-wrap {
		padding-left: 0 !important;
	}

	body.exelixis-drawer-open
	.container.main-content {
		width: calc(100% - 30px) !important;
		max-width: 1450px !important;
	}
}

/* Mobile and tablet behaviour. */
@media only screen and (max-width: 999px) {

	html.exelixis-mobile-drawer-lock,
	body.exelixis-mobile-drawer-lock {
		overflow: hidden !important;
		touch-action: none;
	}

	#exelixis-shop-drawer {
		top: 0 !important;
		left: 0 !important;
		bottom: auto !important;

		width: min(88vw, 360px) !important;
		max-width: 360px !important;

		height: 100vh !important;
		height: 100dvh !important;

		border-radius: 0 14px 14px 0;

		padding-top: env(safe-area-inset-top);
	}

	body.exelixis-drawer-open
	#ajax-content-wrap,
	body:not(.exelixis-drawer-open)
	#ajax-content-wrap {
		padding-left: 0 !important;
		transform: none !important;
	}

	.exelixis-shop-drawer-header {
		padding-left: max(
			18px,
			env(safe-area-inset-left)
		);
	}

	.exelixis-shop-drawer-content {
		padding-bottom: max(
			35px,
			env(safe-area-inset-bottom)
		);
	}
}
