/**
 * Pulsante fisso in basso a destra — apre l’assistente virtuale (solo home).
 */
#openChat.chat-link {
	position: fixed;
	z-index: 9990;
	right: max(1rem, calc(env(safe-area-inset-right, 0px) + 0.75rem));
	bottom: max(1rem, calc(env(safe-area-inset-bottom, 0px) + 1rem));
	left: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.65rem 1.15rem;
	margin: 0;
	font-family: 'Open Sans', sans-serif;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	color: var(--white);
	background-color: var(--blue);
	border: 1px solid rgba(255, 255, 255, 0.75);
	border-radius: 999px;
	box-shadow: none;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

#openChat.chat-link .chat-link__icon {
	display: inline-flex;
	flex-shrink: 0;
	line-height: 0;
}

#openChat.chat-link .chat-link__icon svg {
	display: block;
}

#openChat.chat-link:hover,
#openChat.chat-link:focus {
	background-color: var(--blue);
	color: var(--white);
	text-decoration: none;
	border-color: rgba(200, 208, 216, 0.95);
}

#openChat.chat-link:focus {
	outline: 2px solid var(--azure);
	outline-offset: 3px;
}

#openChat.chat-link:active {
	transform: scale(0.98);
}

/**
 * Barra fissa .kf-mobile-menu: bottom 0, height 4.9375rem, z-index 99999998.
 * Senza offset il pulsante resta sotto la barra e non è visibile / cliccabile.
 */
@media screen and (max-width: 1024px) {
	#openChat.chat-link {
		bottom: max(
			calc(4.9375rem + 0.75rem),
			calc(env(safe-area-inset-bottom, 0px) + 4.9375rem + 0.75rem)
		);
		z-index: 100000000;
	}
}

@media (max-width: 480px) {
	#openChat.chat-link {
		font-size: 0.875rem;
		padding: 0.55rem 1rem;
	}
}
