/* Floating WhatsApp button (every page). Same look as the paid-ads landing pages. */

.cd-whatsapp {
	position: fixed;
	right: max(24px, env(safe-area-inset-right));
	bottom: max(24px, env(safe-area-inset-bottom));
	z-index: 990; /* under the header (1000), popups and the mobile menu */
	display: flex;
	align-items: center;
	height: 60px;
	min-width: 60px;
	padding: 0 15px;
	border-radius: 999px;
	background: #25D366;
	color: #fff;
	font-family: "Instrument Sans", sans-serif;
	text-decoration: none;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Endless pulse: a soft green ring that grows out of the button and fades */
.cd-whatsapp::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: #25D366;
	z-index: -1;
	animation: cd-whatsapp-pulse 2s ease-out infinite;
}

.cd-whatsapp svg { flex: none; width: 30px; height: 30px; }

/* The label slides out on hover (computers) */
.cd-whatsapp__label {
	max-width: 0;
	overflow: hidden;
	white-space: nowrap;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	transition: max-width 0.25s ease, padding 0.25s ease;
}

.cd-whatsapp:hover,
.cd-whatsapp:focus-visible {
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4);
}

.cd-whatsapp:hover .cd-whatsapp__label,
.cd-whatsapp:focus-visible .cd-whatsapp__label { max-width: 130px; padding: 0 4px 0 10px; }

.cd-whatsapp:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

@keyframes cd-whatsapp-pulse {
	0% { transform: scale(1); opacity: 0.55; }
	100% { transform: scale(1.55); opacity: 0; }
}

/* Phones: a bigger round button, no label */
@media (max-width: 767px) {
	.cd-whatsapp {
		right: max(16px, env(safe-area-inset-right));
		bottom: max(16px, env(safe-area-inset-bottom));
		height: 64px;
		min-width: 64px;
		padding: 0 15px;
	}
	.cd-whatsapp svg { width: 34px; height: 34px; }
	.cd-whatsapp__label { display: none; }
}

/* Visitors who switch off animations in their phone/computer settings get a still button */
@media (prefers-reduced-motion: reduce) {
	.cd-whatsapp::before { animation: none; opacity: 0; }
	.cd-whatsapp, .cd-whatsapp__label { transition: none; }
}
