/**
 * Floating WhatsApp chat button, bottom left.
 *
 * The chat widget (Zoho SalesIQ) and the Back to top button live bottom
 * right, so the two sides never compete. Printed once by footer.php.
 */
.aa-wa {
	position: fixed;
	left: max(24px, env(safe-area-inset-left, 0px));
	bottom: max(24px, env(safe-area-inset-bottom, 0px));
	z-index: 990; /* above page content, below the sticky header (999). */
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #25d366;
	color: #fff;
	text-decoration: none;
	box-shadow: 0 8px 20px rgba(18, 140, 126, 0.4), 0 2px 6px rgba(1, 0, 8, 0.2);
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
	-webkit-tap-highlight-color: transparent;
}

.aa-wa:hover {
	background: #20bd5a;
	color: #fff;
	transform: translateY(-3px) scale(1.04);
	box-shadow: 0 12px 26px rgba(18, 140, 126, 0.5), 0 3px 8px rgba(1, 0, 8, 0.22);
}

.aa-wa:active {
	transform: translateY(0) scale(1);
}

.aa-wa:focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
	box-shadow: 0 0 0 6px #128c7e, 0 8px 20px rgba(18, 140, 126, 0.4);
}

.aa-wa svg {
	display: block;
	width: 30px;
	height: 30px;
	fill: currentColor;
}

/* Short label beside the icon on hover or keyboard focus (devices with a pointer). */
.aa-wa__tip {
	position: absolute;
	left: calc(100% + 12px);
	top: 50%;
	padding: 7px 12px;
	border-radius: 8px;
	background: #14121c;
	color: #fff;
	font-size: 13px;
	line-height: 1.2;
	font-weight: 600;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translate(-6px, -50%);
	transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
}

@media (hover: hover) and (pointer: fine) {
	.aa-wa:hover .aa-wa__tip,
	.aa-wa:focus-visible .aa-wa__tip {
		opacity: 1;
		visibility: visible;
		transform: translate(0, -50%);
		transition-delay: 0s;
	}
}

@media (max-width: 640px) {
	.aa-wa {
		left: max(16px, env(safe-area-inset-left, 0px));
		bottom: max(16px, env(safe-area-inset-bottom, 0px));
		width: 52px;
		height: 52px;
	}

	.aa-wa svg {
		width: 28px;
		height: 28px;
	}

	.aa-wa__tip {
		display: none;
	}
}

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

	.aa-wa:hover,
	.aa-wa:active {
		transform: none;
	}
}
