.floating-contact {
	position: fixed;
	right: clamp(14px, 2vw, 28px);
	bottom: clamp(120px, 18vh, 190px);
	z-index: 95;
	display: flex;
	align-items: center;
	flex-direction: column;
	gap: 12px;
}

.floating-contact__item {
	--contact-rgb: 8 120 237;
	position: relative;
	isolation: isolate;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	color: #ffffff;
	border: 0;
	border-radius: 50%;
	box-shadow: 0 0 16px rgb(var(--contact-rgb) / 0.36);
	animation: tmnp-contact-glow 2.8s ease-in-out infinite;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-contact__item::before {
	position: absolute;
	inset: -4px;
	z-index: -1;
	border: 2px solid rgb(var(--contact-rgb) / 0.58);
	border-radius: inherit;
	content: "";
	opacity: 0;
	animation: tmnp-contact-pulse 2.2s ease-out infinite;
}

.floating-contact__item > svg {
	position: relative;
	z-index: 1;
	width: 28px;
	height: 28px;
}

.floating-contact__item--zalo > svg {
	width: 32px;
	height: 32px;
}

.floating-contact__item:hover,
.floating-contact__item:focus-visible {
	color: #ffffff;
	box-shadow: 0 0 28px rgb(var(--contact-rgb) / 0.62);
	animation-play-state: paused;
	transform: scale(1.06);
}

.floating-contact__item--messenger,
.floating-contact__item--zalo {
	--contact-rgb: 8 120 237;
	background: #0878ed;
}

.floating-contact__item--phone {
	--contact-rgb: 239 31 47;
	background: #ef1f2f;
}

.floating-contact__item:nth-child(2),
.floating-contact__item:nth-child(2)::before {
	animation-delay: -0.7s;
}

.floating-contact__item:nth-child(3),
.floating-contact__item:nth-child(3)::before {
	animation-delay: -1.4s;
}

.floating-contact__tooltip {
	position: absolute;
	top: 50%;
	right: calc(100% + 12px);
	width: max-content;
	max-width: 180px;
	padding: 7px 10px;
	color: #ffffff;
	background: #203247;
	border-radius: 7px;
	box-shadow: 0 4px 12px rgb(15 23 42 / 0.2);
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1;
	opacity: 0;
	pointer-events: none;
	transform: translate(6px, -50%);
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.floating-contact__tooltip::after {
	position: absolute;
	top: 50%;
	left: 100%;
	border: 5px solid transparent;
	border-left-color: #203247;
	content: "";
	transform: translateY(-50%);
}

.floating-contact__item:hover .floating-contact__tooltip,
.floating-contact__item:focus-visible .floating-contact__tooltip {
	opacity: 1;
	transform: translate(0, -50%);
}

@keyframes tmnp-contact-pulse {
	0% {
		opacity: 0.56;
		transform: scale(0.92);
	}
	75%,
	100% {
		opacity: 0;
		transform: scale(1.28);
	}
}

@keyframes tmnp-contact-glow {
	0%,
	100% {
		box-shadow: 0 0 12px rgb(var(--contact-rgb) / 0.28);
	}
	50% {
		box-shadow: 0 0 25px rgb(var(--contact-rgb) / 0.56);
	}
}

@media (max-width: 782px) {
	.floating-contact {
		right: 10px;
		bottom: 84px;
		gap: 9px;
	}

	.floating-contact__item {
		width: 46px;
		height: 46px;
	}

	.floating-contact__item > svg {
		width: 25px;
		height: 25px;
	}

	.floating-contact__item--zalo > svg {
		width: 29px;
		height: 29px;
	}

	.floating-contact__tooltip {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.floating-contact__item,
	.floating-contact__item::before,
	.floating-contact__tooltip {
		animation: none;
		transition: none;
	}
}
