/* Widget WhatsApp fisso in basso a destra (04/11). Solo sopra 600 px; sotto c'e la barra sticky-contact. */
.cc-wa-float {
	display: none;
}

@media (min-width: 601px) {
	.cc-wa-float {
		position: fixed;
		right: 24px;
		bottom: 24px;
		z-index: 15;
		display: block;
		width: 60px;
		height: 60px;
		text-decoration: none;
		transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
	}

	/* Senza JS il widget e sempre visibile; con JS compare quando l'hero esce dallo schermo. */
	.cc-js .cc-wa-float {
		visibility: hidden;
		opacity: 0;
		transform: translateY(16px);
	}

	.cc-js .cc-wa-float.is-visible {
		visibility: visible;
		opacity: 1;
		transform: none;
	}

	.cc-wa-float__btn {
		display: flex;
		flex: none;
		align-items: center;
		justify-content: center;
		width: 60px;
		height: 60px;
		background: var(--cc-wa);
		border-radius: 50%;
		box-shadow: 0 8px 24px rgba(21, 122, 69, 0.35);
		transition: background-color var(--cc-ease), transform var(--cc-ease);
	}

	.cc-wa-float__btn img {
		width: 28px;
		height: 28px;
	}

	/* Etichetta: fuori dal flusso (non allarga l'area cliccabile), compare a sinistra del tondo
	   al passaggio del mouse o col focus da tastiera. */
	.cc-wa-float__label {
		position: absolute;
		top: 50%;
		right: 72px;
		padding: 10px 16px;
		background: #fff;
		border-radius: var(--wp--custom--radius--tondo);
		box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
		color: var(--cc-ink);
		font-weight: 600;
		font-size: 15px;
		white-space: nowrap;
		opacity: 0;
		transform: translate(8px, -50%);
		pointer-events: none;
		transition: opacity 200ms ease, transform 200ms ease;
	}

	.cc-wa-float:focus-visible .cc-wa-float__label {
		opacity: 1;
		transform: translate(0, -50%);
	}

	/* Banner cookie aperto: il widget non lo copre. */
	body:has([data-cc-cookie]:not([hidden])) .cc-wa-float,
	body:has([data-cc-cookie]:not([hidden])) .cc-wa-float.is-visible {
		visibility: hidden;
		opacity: 0;
		transform: translateY(16px);
	}
}

@media (min-width: 601px) and (hover: hover) {
	.cc-wa-float:hover .cc-wa-float__label {
		opacity: 1;
		transform: translate(0, -50%);
	}

	.cc-wa-float:hover .cc-wa-float__btn {
		background: var(--cc-wa-hover);
		transform: translateY(-2px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.cc-wa-float,
	.cc-wa-float__btn,
	.cc-wa-float__label {
		transition: none;
	}
}
