/**
 * Bricksify: Step Wipe, the animated state only.
 *
 * The layout of the honest vertical stack (what a visitor without JavaScript,
 * or a site without this plugin, sees) lives in the template's own global
 * class `bsfy-step-wipe`, so it travels with the paste. This file only adds
 * what `is-ready` needs: one pinned stage, every step laid on the first.
 */

.bxc-wipe.is-ready .bxc-wipe__stage {
	height: 100vh;
	height: 100lvh;
	overflow: hidden;
}

/*
 * The pinned stage fills the LARGE viewport (lvh): dvh was frozen into the
 * pin at load, with the mobile toolbars out, and left a strip of the next
 * section visible once they collapsed. The texts anchored to the bottom are
 * lifted by the toolbar height while the toolbars are out.
 */
@supports (height: 100dvh) {
	.bxc-wipe.is-ready .bxc-wipe__meta {
		bottom: calc(100lvh - 100dvh);
	}
}

.bxc-wipe.is-ready .bxc-wipe__layers {
	position: absolute;
	inset: 0;
}

.bxc-wipe.is-ready .bxc-wipe__step {
	position: absolute;
	inset: 0;
	min-height: 0;

	/* No z-index, no opacity, no transform: the step must not become a
	   stacking context, or the rule below cannot reach across steps. */
	z-index: auto;
}

/*
 * Order by role, not by step.
 *
 * Grouped per step, the incoming background sits above the outgoing card.
 * Both clip by the same percentage, but the card is centred, so its edge
 * travels fewer pixels; past halfway the background edge overtakes it and
 * leaves a band where the old card is already covered and the new one has
 * not arrived. Lifting every card above every background removes the hole.
 */
.bxc-wipe.is-ready .bxc-wipe__bg {
	z-index: 1;
}

.bxc-wipe.is-ready .bxc-wipe__card {
	z-index: 2;
}

.bxc-wipe.is-ready .bxc-wipe__meta {
	z-index: 3;
}