/* Woo Elements Toolkit – sticky element behavior. */

.wet-sticky.is-wet-stuck {
	right: auto;
	transition: transform .3s ease, box-shadow .3s ease;
}

/*
 * Only the scroll-up mode needs a transform. We intentionally avoid applying
 * `transform`/`will-change` in the always-sticky mode: a transformed ancestor
 * becomes the containing block for `position: fixed` descendants, which would
 * clip a full-screen menu drawer rendered inside the header to the header box.
 */
.wet-sticky.is-wet-stuck[data-wet-sticky="scrollup"] {
	will-change: transform;
}

/* Show-on-scroll-up: slide the stuck element out of view while scrolling down. */
.wet-sticky.is-wet-stuck.is-wet-hidden {
	transform: translateY(-100%);
}

/*
 * While a menu/drawer is open inside the sticky element, drop the transform so
 * the element stops acting as a containing block and the fixed drawer can fill
 * the viewport again. The header stays pinned via `position: fixed`.
 */
.wet-sticky.is-wet-stuck.wet-sticky--menu-open {
	transform: none;
	will-change: auto;
	transition: none;
}

.wet-sticky__placeholder {
	pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
	.wet-sticky.is-wet-stuck {
		transition: none;
	}
}
