/* 0.9.3: botón de WhatsApp para consultas y correo en el pie (Contact\Front). */

.evxp-wa {
	position: fixed;
	right: 16px;
	bottom: calc(16px + env(safe-area-inset-bottom, 0px));
	z-index: 40;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 52px;
	padding: 0 1.1rem 0 0.9rem;
	border-radius: 999px;
	background: #0e7a40; /* verde más oscuro que el de WhatsApp: el texto blanco se lee bien (contraste ≈ 5,4:1) */
	color: #fff;
	font-weight: 700;
	font-size: 0.95rem;
	line-height: 1;
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.evxp-wa:hover,
.evxp-wa:focus-visible {
	background: #0b6635;
	color: #fff;
}

.evxp-wa:focus-visible {
	outline: 3px solid #142f21;
	outline-offset: 3px;
}

.evxp-wa-icon {
	flex: none;
}

/* Mientras el configurador está en pantalla (ficha del producto) no se muestra: no tapa Siguiente ni "Añadir al carrito". */
.evxp-wa.evxp-wa-hidden {
	opacity: 0;
	transform: translateY(12px);
	pointer-events: none;
	visibility: hidden;
}

/* Celular: solo el círculo, para tapar lo menos posible. */
@media (max-width: 781px) {
	.evxp-wa {
		width: 56px;
		height: 56px;
		min-height: 0;
		padding: 0;
		justify-content: center;
	}

	.evxp-wa-text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
}

@media (prefers-reduced-motion: reduce) {
	.evxp-wa {
		transition: none;
	}
}

/* El enlace bajo el configurador. */
.evxp-wa-inline {
	margin: 0.75rem 0 0;
	font-size: 0.95rem;
}

.evxp-wa-inline a {
	color: #0e7a40;
	font-weight: 700;
}

/* 0.9.5: la ventana del computador (contact.js): abrir la app, QR para el celular y, discreto, WhatsApp Web. */
.evxp-wa-dialog {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(20, 47, 33, 0.55);
}

.evxp-wa-dialog[hidden] {
	display: none;
}

.evxp-wa-box {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 360px;
	padding: 1.5rem 1.5rem 1.1rem;
	border-radius: 14px;
	background: #fff;
	color: #142f21;
	text-align: center;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.evxp-wa-title {
	margin: 0 0 1rem;
	font-size: 1.2rem;
	line-height: 1.25;
}

.evxp-wa-close {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #2f4038;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}

.evxp-wa-close:hover,
.evxp-wa-close:focus-visible {
	background: #eef2f1;
}

.evxp-wa-app {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 1rem;
	border-radius: 999px;
	background: #0e7a40;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

.evxp-wa-app:hover,
.evxp-wa-app:focus-visible {
	background: #0b6635;
	color: #fff;
}

.evxp-wa-app:focus-visible,
.evxp-wa-web:focus-visible,
.evxp-wa-close:focus-visible {
	outline: 3px solid #142f21;
	outline-offset: 2px;
}

.evxp-wa-or {
	margin: 1rem 0 0.5rem;
	font-size: 0.9rem;
}

.evxp-wa-qr {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 200px;
	min-height: 200px;
	margin: 0 auto;
	font-size: 0.85rem;
	color: #56665e;
}

.evxp-wa-qr svg {
	display: block;
	width: 200px;
	height: 200px;
}

.evxp-wa-web-line {
	margin: 0.75rem 0 0;
	font-size: 0.85rem;
}

.evxp-wa-web {
	color: #2f4038;
	text-decoration: underline;
}

/* El correo en el pie de página: junto al "© 2026 …", con la alineación y la letra del tema. */
.evxp-footer-contact {
	margin-top: 0.4rem;
}

.evxp-footer-contact a {
	color: inherit;
	text-decoration: underline;
}

/* 0.9.7.2: en el celular el botón flotante (56 px, a 16 px del borde) no tapa el final del pie ("© 2026 EvoxPro Group SpA…"). */
@media (max-width: 781px) {
	body:has(.evxp-wa) footer.wp-block-template-part {
		padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
	}
}