/* Custom styles for the static version of magifer.com.br.
   Replaces behavior previously provided by Elementor Pro's JS
   (popups, background slideshow) now that the WordPress/jQuery
   runtime has been removed. */

/* ---------- WhatsApp popup ---------- */
[data-elementor-type="popup"] {
	display: none;
}

[data-elementor-type="popup"].popup-open {
	display: flex;
	position: fixed;
	inset: 0;
	z-index: 100000;
	align-items: center;
	justify-content: center;
	padding: 20px;
	overflow-y: auto;
	background: rgba(0, 0, 0, 0.6);
}

[data-elementor-type="popup"] > .elementor-element {
	position: relative;
	width: 100%;
	max-width: 640px;
	max-height: 90vh;
	overflow: auto;
	background: #fff;
	border-radius: 4px;
}

[data-elementor-type="popup"] .popup-close {
	position: absolute;
	top: 12px;
	inset-inline-end: 16px;
	z-index: 1;
	width: 32px;
	height: 32px;
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #1f2124;
}

[data-elementor-type="popup"] .popup-close:hover {
	opacity: 0.7;
}

body.popup-is-open {
	overflow: hidden;
}

/* ---------- Hero background slideshow ---------- */
.js-slideshow {
	position: relative;
}

.js-slideshow .elementor-background-slideshow {
	inset: 0;
	position: absolute;
	z-index: 0;
	overflow: hidden;
}

.js-slideshow .elementor-background-slideshow__slide__image {
	position: absolute;
	inset: 0;
	background-position: 50%;
	background-size: cover;
	height: 100%;
	width: 100%;
	opacity: 0;
	transition: opacity 1.2s ease-in-out;
}

.js-slideshow .elementor-background-slideshow__slide__image.is-active {
	opacity: 1;
}

/* ---------- Cloudflare Turnstile ---------- */
.turnstile-field {
	display: flex;
	justify-content: center;
	margin: 10px 0;
}

/* ---------- Form feedback message ---------- */
.elementor-form-message {
	display: none;
	width: 100%;
	margin-top: 10px;
	padding: 10px 14px;
	border-radius: 3px;
	font-size: 15px;
}

.elementor-form-message.is-visible {
	display: block;
}

.elementor-form-message.is-success {
	background: #e6f6ec;
	color: #1e7e34;
	border: 1px solid #b7e4c7;
}

.elementor-form-message.is-error {
	background: #fdecea;
	color: #b3261e;
	border: 1px solid #f5c6cb;
}

.elementor-form-message.is-loading {
	background: #eef3fb;
	color: #1f4e79;
	border: 1px solid #cfe0f5;
}

.elementor-form .elementor-field.is-invalid {
	border-color: #b3261e !important;
}
