/* =========================================================
   Botón flotante de WhatsApp (esquina inferior derecha).
   ========================================================= */

.qo-wafloat {
	position: fixed;
	right: max(20px, env(safe-area-inset-right));
	bottom: max(20px, env(safe-area-inset-bottom));
	z-index: 9990;
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
}

.qo-wafloat__bubble {
	position: relative;
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--qo-whatsapp);
	color: var(--qo-white);
	box-shadow: 0 8px 22px color-mix(in srgb, var(--qo-whatsapp) 45%, transparent), 0 2px 6px rgba(0, 0, 0, 0.15);
	transition: transform var(--qo-trans), background var(--qo-trans);
}

/* Onda que llama la atención. */
.qo-wafloat__bubble::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: var(--qo-whatsapp);
	z-index: -1;
	animation: qo-wafloat-pulse 2.4s ease-out infinite;
}

.qo-wafloat__icon {
	width: 32px;
	height: 32px;
}

.qo-wafloat__label {
	padding: 10px 16px;
	border-radius: 999px;
	background: var(--qo-white);
	color: var(--qo-primary);
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	box-shadow: var(--qo-shadow);
	opacity: 0;
	transform: translateX(8px);
	pointer-events: none;
	transition: opacity var(--qo-trans), transform var(--qo-trans);
}

.qo-wafloat:hover .qo-wafloat__bubble,
.qo-wafloat:focus-visible .qo-wafloat__bubble {
	transform: scale(1.06);
	background: color-mix(in srgb, var(--qo-whatsapp) 88%, #000);
}

.qo-wafloat:hover .qo-wafloat__label,
.qo-wafloat:focus-visible .qo-wafloat__label {
	opacity: 1;
	transform: none;
}

.qo-wafloat:focus-visible {
	outline: none;
}

.qo-wafloat:focus-visible .qo-wafloat__bubble {
	outline: 3px solid var(--qo-accent);
	outline-offset: 3px;
}

@keyframes qo-wafloat-pulse {
	0%   { transform: scale(1); opacity: 0.45; }
	70%  { transform: scale(1.55); opacity: 0; }
	100% { transform: scale(1.55); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.qo-wafloat__bubble::before {
		animation: none;
		opacity: 0;
	}
}

@media (max-width: 768px) {
	.qo-wafloat {
		right: max(16px, env(safe-area-inset-right));
		bottom: max(16px, env(safe-area-inset-bottom));
	}

	.qo-wafloat__bubble {
		width: 54px;
		height: 54px;
	}

	.qo-wafloat__icon {
		width: 28px;
		height: 28px;
	}

	/* En pantallas táctiles no hay hover: sin texto. */
	.qo-wafloat__label {
		display: none;
	}
}
