/* ETA — globalne poprawki Elementor na wąskich ekranach
   Wersja 1.5.0 / 2026-07-21
   Cel: ujemne margin zigzag nie ucinają treści.
   Gutter treści: kanonicznie w eta-shell-boxed.css (--eta-shell-content-gutter). */

/*
 * ≤1279: white-bar guard for stuck invisible shells — MUST NOT pin opacity on
 * active/pending entrance (.animated or data-settings animation / .animated-item).
 * Motion kit (eta-motion v1.5+) owns opacity via fill-mode: both + eta_fadein_only.
 */
@media (max-width: 1279px) {
	/* Stuck shells without entrance — force visible (white-bar fix) */
	.elementor-invisible:not(.animated):not(.animated-item):not([data-settings*="animation"]):not([data-settings*="_animation"]),
	.trx_addons_invisible:not(.animated):not(.animated-item):not([data-settings*="animation"]):not([data-settings*="_animation"]),
	.elementor .elementor-invisible:not(.animated):not(.animated-item):not([data-settings*="animation"]):not([data-settings*="_animation"]),
	.elementor .trx_addons_invisible:not(.animated):not(.animated-item):not([data-settings*="animation"]):not([data-settings*="_animation"]) {
		visibility: visible !important;
		opacity: 1 !important;
	}

	/*
	 * Pending entrance (widget settings OR ThemeREX split .animated-item):
	 * HOLD opacity:0 — prevents solid flash before fade.
	 * Once .animated, eta-motion fill-mode:both owns opacity.
	 */
	.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) {
		visibility: visible !important;
		opacity: 0 !important;
	}

	.elementor-invisible.animated,
	.trx_addons_invisible.animated,
	.animated-item.animated,
	.sc_item_animated_block.animated {
		visibility: visible !important;
	}

	/* Non-active animation shells: kill leftover translateY hole */
	.elementor [class*="animation_type_"].elementor-invisible:not(.animated),
	.elementor [class*="animation_type_"].trx_addons_invisible:not(.animated),
	.elementor .animated-item.elementor-invisible:not(.animated),
	.elementor .sc_item_animated_block.elementor-invisible:not(.animated) {
		transform: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.elementor-invisible,
	.trx_addons_invisible {
		visibility: visible !important;
		opacity: 1 !important;
		transform: none !important;
	}
}

@media (max-width: 767px) {
	html,
	body {
		overflow-x: hidden !important;
		max-width: 100% !important;
		width: 100% !important;
	}

	.body_wrap,
	.page_wrap,
	.content_wrap_fullscreen,
	.content_wrap_fullscreen > .content,
	.page_content_wrap,
	.elementor,
	.elementor-3066 {
		overflow-x: clip !important;
		max-width: 100% !important;
	}

	/* Marquee: clip/max-width na WRAP — tor musi być szerszy (wiele kadrów) */
	.trx-addons-marquee-wrap,
	.trx_addons_marquee_wrap,
	.eta-trust-marquee {
		overflow: hidden !important;
		max-width: 100% !important;
	}

	.trx-addons-marquee,
	.trx_addons_marquee_element {
		overflow: visible !important;
		max-width: none !important;
		width: max-content !important;
	}

	.elementor-3066 .elementor-element-0b39482 .trx-addons-marquee-item img.char,
	.elementor-3066 .elementor-element-0b39482 .trx-addons-marquee-item-image img {
		width: auto !important;
		max-width: none !important;
		flex: 0 0 auto;
	}

	/* Complianz: kontener cookies nie może rozszerzać dokumentu */
	#cmplz-cookiebanner-container,
	#cmplz-manage-consent,
	.cmplz-manage-consent-container {
		max-width: 100vw !important;
		overflow-x: clip !important;
	}

	/* Zero ujemnych offsetów — bez max-width:100% na całym drzewie */
	.elementor .e-con.elementor-element,
	.elementor .e-con > .e-con-inner,
	.elementor .elementor-widget,
	.elementor .elementor-element {
		--margin-left: 0px !important;
		--margin-right: 0px !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}

	.elementor .elementor-widget-text-editor,
	.elementor .elementor-widget-text-editor .elementor-widget-container,
	.elementor .elementor-heading-title {
		overflow-wrap: anywhere;
		word-break: normal;
		hyphens: auto;
		max-width: 100%;
	}

	/* Contact H2 — never hyphenate mid-word (overrides hyphens:auto above) */
	.elementor-3066 .elementor-element-h000d .elementor-heading-title {
		hyphens: none !important;
		-webkit-hyphens: none !important;
		overflow-wrap: normal !important;
		word-break: normal !important;
		font-size: clamp(1.35rem, 4.2vw, 2.1rem) !important;
		line-height: 1.15 !important;
	}

	/* GWRM / OSP Wielmoża — same: no mid-word "Meteorologiczne|go" */
	.elementor-3066 .elementor-element-a591e5d .elementor-heading-title,
	.elementor-3066 .elementor-element-fb034c8 .elementor-heading-title,
	.elementor-3066 .elementor-element-411a4f7.elementor-widget-text-editor,
	.elementor-3066 .elementor-element-411a4f7 .elementor-widget-container,
	.elementor-3066 .elementor-element-b18fc99 .elementor-heading-title {
		hyphens: none !important;
		-webkit-hyphens: none !important;
		overflow-wrap: normal !important;
		word-break: normal !important;
	}

	body.eta-shop-skin.single-product div.product {
		padding-inline: 12px !important;
	}

	body.eta-shop-skin.single-product div.product > .summary,
	body.eta-shop-skin.single-product div.product > .woocommerce-product-gallery {
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
	}

	body.eta-shop-skin.single-product .woocommerce-breadcrumb {
		padding-inline: 12px !important;
	}

	body.eta-shop-skin.single-product div.product .summary .woocommerce-product-details__short-description {
		max-width: 100% !important;
		overflow-wrap: anywhere;
	}
}

/* Gutter na ≤480: zostaje w eta-shell-boxed (--eta-shell-content-gutter). */
