/**
 * ETA Motion Kit — staggered card reveals (navy B2B, dial ~4–5).
 * Product tiles use `.eta-reveal-wrap` (escapes TRX opacity locks on `.post_item`).
 *
 * v1.6.0 — delay 0.1s + duration 0.4s + fill-mode: both;
 *          pure opacity fade; cover ThemeREX .animated-item / .sc_item_animated_block
 *          (v1.4.0 only hit .elementor-element → raw ta_fadeinup 1s leaked → blink);
 *          Path B home entrances: hero etaher01 + H2 fa894e2 / 5b92137 (.eta-enter).
 */

:root {
	--eta-reveal-duration: 0.4s;
	--eta-reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--eta-reveal-y: 14px;
	--eta-reveal-stagger: 55ms;
	--eta-anim-delay: 0.1s;
	--eta-anim-duration: 0.4s;
	--eta-anim-stagger: 0.08s;
}

ul.products li.product > .eta-reveal-wrap {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	height: 100%;
	min-width: 0;
	width: 100%;
}

/* Blog listing (Aktualności classic) — same reveal shell as shop */
.posts_container.classic_wrap > [class*="column-"] > .eta-reveal-wrap,
.posts_container > [class*="column-"] > .eta-reveal-wrap {
	display: block;
	width: 100%;
	min-width: 0;
}

/*
 * Pending entrance — hold opacity:0 until .animated + keyframes.
 * Elementor .elementor-invisible is only visibility:hidden (opacity stays 1) →
 * removing the class flashes solid before CSS delay/fill-mode can paint.
 * ThemeREX splits heading/menu into .animated-item children — same hold.
 */
.elementor-invisible[data-settings*="animation"]:not(.animated),
.elementor-invisible[data-settings*="_animation"]:not(.animated),
.trx_addons_invisible[data-settings*="animation"]:not(.animated),
.trx_addons_invisible[data-settings*="_animation"]:not(.animated),
.animated-item.elementor-invisible:not(.animated),
.animated-item.trx_addons_invisible:not(.animated),
.sc_item_animated_block.elementor-invisible:not(.animated),
.sc_item_animated_block.trx_addons_invisible:not(.animated) {
	opacity: 0 !important;
}

/*
 * Elementor / TRX ta_fade* — ONE delay source (CSS).
 * Targets .elementor-element AND ThemeREX child .animated-item / .sc_item_animated_block.
 * fill-mode: both = from during delay + to after end → no flash.
 */
.elementor-element.animated,
.elementor .elementor-element.animated,
.elementor-element[class*="ta_fade"].animated,
.elementor-element.animated[class*="fadeIn"],
.elementor-invisible.animated,
.trx_addons_invisible.animated,
.animated-item.animated,
.sc_item_animated_block.animated,
[class*="ta_fade"].animated {
	animation-duration: var(--eta-anim-duration) !important;
	animation-timing-function: var(--eta-reveal-ease) !important;
	animation-delay: var(--eta-anim-delay) !important;
	animation-fill-mode: both !important;
}

/* Pure fade — kill ThemeREX translateY(60px) jump on directional fades */
@keyframes eta_fadein_only {
	from {
		opacity: 0;
		transform: none;
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.animated.ta_fadeinup,
.animated.ta_fadeindown,
.animated.ta_fadeinleft,
.animated.ta_fadeinright,
.animated.ta_fadein,
.elementor-element.animated.ta_fadeinup,
.elementor-element.animated.ta_fadeindown,
.elementor-element.animated.ta_fadeinleft,
.elementor-element.animated.ta_fadeinright,
.elementor-element.animated.ta_fadein,
.elementor .elementor-element.animated.ta_fadeinup,
.elementor .elementor-element.animated.ta_fadeindown,
.elementor .elementor-element.animated.ta_fadeinleft,
.elementor .elementor-element.animated.ta_fadeinright,
.elementor .elementor-element.animated.ta_fadein,
.animated-item.animated.ta_fadeinup,
.animated-item.animated.ta_fadeindown,
.animated-item.animated.ta_fadeinleft,
.animated-item.animated.ta_fadeinright,
.animated-item.animated.ta_fadein,
.sc_item_animated_block.animated.ta_fadeinup,
.sc_item_animated_block.animated.ta_fadeindown,
.sc_item_animated_block.animated.ta_fadeinleft,
.sc_item_animated_block.animated.ta_fadeinright,
.sc_item_animated_block.animated.ta_fadein {
	animation-name: eta_fadein_only !important;
}

/*
 * Path B — home surfaces without Elementor entrance settings.
 * Armed by SiteLoader (.eta-enter → .eta-enter-in via IO). Same tokens as global fade.
 */
.elementor-3066 .eta-elementor-home-hero.eta-enter:not(.eta-enter-in),
.elementor-3066 .elementor-element-etaher01.eta-enter:not(.eta-enter-in),
.elementor-3066 .elementor-element-fa894e2.eta-enter:not(.eta-enter-in),
.elementor-3066 .elementor-element-5b92137.eta-enter:not(.eta-enter-in) {
	opacity: 0 !important;
}

.elementor-3066 .eta-elementor-home-hero.eta-enter-in,
.elementor-3066 .elementor-element-etaher01.eta-enter-in,
.elementor-3066 .elementor-element-fa894e2.eta-enter-in,
.elementor-3066 .elementor-element-5b92137.eta-enter-in {
	animation-name: eta_fadein_only !important;
	animation-duration: var(--eta-anim-duration) !important;
	animation-timing-function: var(--eta-reveal-ease) !important;
	animation-delay: var(--eta-anim-delay) !important;
	animation-fill-mode: both !important;
}

/* Sibling stagger inside a shared parent */
.e-con-inner > .elementor-element.animated:nth-child(1),
.e-con-inner > .e-con.animated:nth-child(1),
.elementor-widget.animated:nth-child(1) {
	animation-delay: var(--eta-anim-delay) !important;
}

.e-con-inner > .elementor-element.animated:nth-child(2),
.e-con-inner > .e-con.animated:nth-child(2),
.elementor-widget.animated:nth-child(2) {
	animation-delay: calc(var(--eta-anim-delay) + var(--eta-anim-stagger)) !important;
}

.e-con-inner > .elementor-element.animated:nth-child(3),
.e-con-inner > .e-con.animated:nth-child(3),
.elementor-widget.animated:nth-child(3) {
	animation-delay: calc(var(--eta-anim-delay) + (2 * var(--eta-anim-stagger))) !important;
}

.e-con-inner > .elementor-element.animated:nth-child(4),
.e-con-inner > .e-con.animated:nth-child(4),
.elementor-widget.animated:nth-child(4) {
	animation-delay: calc(var(--eta-anim-delay) + (3 * var(--eta-anim-stagger))) !important;
}

.e-con-inner > .elementor-element.animated:nth-child(n + 5),
.e-con-inner > .e-con.animated:nth-child(n + 5),
.elementor-widget.animated:nth-child(n + 5) {
	animation-delay: calc(var(--eta-anim-delay) + (4 * var(--eta-anim-stagger))) !important;
}

@media (prefers-reduced-motion: reduce) {
	:root {
		--eta-anim-delay: 0s;
		--eta-anim-stagger: 0s;
		--eta-reveal-stagger: 0ms;
	}

	.elementor-element.animated,
	.elementor .elementor-element.animated,
	.elementor-element[class*="ta_fade"].animated,
	.elementor-element.animated[class*="fadeIn"],
	.elementor-invisible.animated,
	.trx_addons_invisible.animated,
	.animated-item.animated,
	.sc_item_animated_block.animated,
	[class*="ta_fade"].animated,
	.e-con-inner > .elementor-element.animated:nth-child(n),
	.e-con-inner > .e-con.animated:nth-child(n),
	.elementor-widget.animated:nth-child(n),
	.elementor-3066 .eta-elementor-home-hero.eta-enter-in,
	.elementor-3066 .elementor-element-etaher01.eta-enter-in,
	.elementor-3066 .elementor-element-fa894e2.eta-enter-in,
	.elementor-3066 .elementor-element-5b92137.eta-enter-in {
		animation-delay: 0s !important;
		animation-duration: 0.01ms !important;
		animation-fill-mode: both !important;
	}

	.elementor-invisible,
	.trx_addons_invisible,
	.animated-item.elementor-invisible,
	.sc_item_animated_block.elementor-invisible,
	.elementor-3066 .eta-elementor-home-hero.eta-enter,
	.elementor-3066 .elementor-element-etaher01.eta-enter,
	.elementor-3066 .elementor-element-fa894e2.eta-enter,
	.elementor-3066 .elementor-element-5b92137.eta-enter {
		opacity: 1 !important;
		visibility: visible !important;
		transform: none !important;
	}

	.eta-reveal-wrap,
	.eta-reveal {
		animation: none !important;
		transition: none !important;
	}
}
