/* HL Action buttons */
:root {
	--hl-icon-size: 50px;
	--hl-label-h: 42px;
}

.hl-actions {
	position: fixed;
	z-index: 999999;
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column-reverse;
	gap: 12px;
	pointer-events: none;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.hl-actions--right {
	right: 14px;
	align-items: flex-end;
}

.hl-actions--left {
	left: 14px;
	align-items: flex-start;
}

.hl-actions__item {
	--hl-ring-color: rgba(10, 74, 150, .55);
	pointer-events: auto;
	margin: 0;
	padding: 0;
	position: relative;
}

.hl-actions__btn {
	display: inline-flex;
	align-items: center;
	gap: 0;
	margin: 0;
	border: 0;
	background: transparent;
	padding: 0;
	cursor: pointer;
	text-decoration: none;
	color: inherit;
	position: relative;
	z-index: 2;
	overflow: visible;
	-webkit-tap-highlight-color: transparent;
}

.hl-actions__btn:focus {
	outline: none;
}

.hl-actions__btn:focus-visible .hl-actions__icon {
	box-shadow: 0 0 0 3px rgba(10, 74, 150, .35), 0 10px 26px rgba(5, 35, 70, .28);
}

.hl-actions__icon {
	width: var(--hl-icon-size);
	height: var(--hl-icon-size);
	flex-shrink: 0;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	box-shadow:
		0 10px 26px rgba(5, 35, 70, .22),
		0 0 0 2px rgba(255, 255, 255, .96);
	transition: transform .28s cubic-bezier(.22, 1, .36, 1), box-shadow .28s ease;
	position: relative;
	z-index: 2;
	padding: 2px;
	overflow: visible;
}

.hl-actions__icon-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0 !important;
	border-radius: 50% !important;
	box-shadow: none !important;
	display: block;
}

.hl-actions__label {
	display: block;
	max-width: 0;
	opacity: 0;
	overflow: hidden;
	white-space: nowrap;
	height: var(--hl-label-h);
	line-height: var(--hl-label-h);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .01em;
	color: #fff;
	background: linear-gradient(135deg, #0a4a96 0%, #053b7c 100%);
	box-shadow: 0 8px 22px rgba(5, 59, 124, .28);
	transition:
		max-width .4s cubic-bezier(.22, 1, .36, 1),
		opacity .3s ease,
		padding .4s cubic-bezier(.22, 1, .36, 1);
}

.hl-actions--right .hl-actions__label {
	order: -1;
	border-radius: 999px 0 0 999px;
	margin-right: -20px;
	padding: 0;
}

.hl-actions--right .hl-actions__btn:hover .hl-actions__label,
.hl-actions--right .hl-actions__btn:focus-visible .hl-actions__label,
.hl-actions--right .hl-actions__btn.is-active .hl-actions__label {
	max-width: 360px;
	opacity: 1;
	padding-left: 18px;
	padding-right: 32px;
}

.hl-actions--left .hl-actions__label {
	border-radius: 0 999px 999px 0;
	margin-left: -20px;
	padding: 0;
}

.hl-actions--left .hl-actions__btn:hover .hl-actions__label,
.hl-actions--left .hl-actions__btn:focus-visible .hl-actions__label,
.hl-actions--left .hl-actions__btn.is-active .hl-actions__label {
	max-width: 360px;
	opacity: 1;
	padding-left: 32px;
	padding-right: 18px;
}

.hl-actions__btn:hover .hl-actions__icon,
.hl-actions__btn:focus-visible .hl-actions__icon,
.hl-actions__btn.is-active .hl-actions__icon {
	transform: translateY(-2px) scale(1.08);
	box-shadow:
		0 14px 30px rgba(5, 35, 70, .3),
		0 0 0 2px rgba(255, 255, 255, 1);
}

/* Pulse ring — all icons */
.hl-actions__item::before,
.hl-actions__item::after {
	content: "";
	position: absolute;
	top: 50%;
	width: var(--hl-icon-size);
	height: var(--hl-icon-size);
	margin-top: calc(var(--hl-icon-size) / -2);
	border-radius: 50%;
	border: 2px solid var(--hl-ring-color);
	pointer-events: none;
	z-index: 0;
	animation: hlActionRing 2.6s cubic-bezier(0, 0, .2, 1) infinite;
}

.hl-actions--right .hl-actions__item::before,
.hl-actions--right .hl-actions__item::after {
	right: 0;
}

.hl-actions--left .hl-actions__item::before,
.hl-actions--left .hl-actions__item::after {
	left: 0;
}

.hl-actions__item::after {
	animation-delay: 1.3s;
}

.hl-actions__item:nth-child(2)::before { animation-delay: .2s; }
.hl-actions__item:nth-child(2)::after { animation-delay: 1.5s; }
.hl-actions__item:nth-child(3)::before { animation-delay: .4s; }
.hl-actions__item:nth-child(3)::after { animation-delay: 1.7s; }
.hl-actions__item:nth-child(4)::before { animation-delay: .6s; }
.hl-actions__item:nth-child(4)::after { animation-delay: 1.9s; }

.hl-actions__item--phone {
	--hl-ring-color: rgba(229, 57, 53, .7);
}

.hl-actions__item--phone .hl-actions__icon {
	background: linear-gradient(180deg, #fff 0%, #fff6f6 100%);
}

.hl-actions__item--phone .hl-actions__icon-img {
	animation: hlActionPhoneShake 4s ease-in-out infinite;
}

.hl-actions__item--phone .hl-actions__label {
	background: linear-gradient(135deg, #ef5350 0%, #d32f2f 100%);
}

.hl-actions__item--zalo {
	--hl-ring-color: rgba(0, 104, 255, .65);
}

.hl-actions__item--zalo .hl-actions__label {
	background: linear-gradient(135deg, #008fe5 0%, #0068ff 100%);
}

.hl-actions__item--messenger,
.hl-actions__item--facebook {
	--hl-ring-color: rgba(0, 132, 255, .65);
}

.hl-actions__item--messenger .hl-actions__label,
.hl-actions__item--facebook .hl-actions__label {
	background: linear-gradient(135deg, #0084ff 0%, #0062d1 100%);
}

.hl-actions__item--map {
	--hl-ring-color: rgba(52, 168, 83, .65);
}

.hl-actions__item--map .hl-actions__label {
	background: linear-gradient(135deg, #34a853 0%, #1e8e3e 100%);
}

.hl-actions__item--tiktok {
	--hl-ring-color: rgba(30, 30, 30, .55);
}

.hl-actions__item--tiktok .hl-actions__label {
	background: linear-gradient(135deg, #222 0%, #444 100%);
}

@keyframes hlActionRing {
	0% {
		transform: scale(1);
		opacity: .75;
	}
	100% {
		transform: scale(1.6);
		opacity: 0;
	}
}

@keyframes hlActionPhoneShake {
	0%, 90%, 100% { transform: rotate(0); }
	92% { transform: rotate(-7deg); }
	94% { transform: rotate(7deg); }
	96% { transform: rotate(-5deg); }
	98% { transform: rotate(5deg); }
}

button.hl-actions__btn.hl-phone-trigger {
	border: 0;
	padding: 0;
	cursor: pointer;
	background: transparent;
	font: inherit;
	color: inherit;
}

@media (max-width: 767px) {
	:root {
		--hl-icon-size: 48px;
		--hl-label-h: 40px;
	}

	.hl-actions--right {
		right: 10px;
	}

	.hl-actions--left {
		left: 10px;
	}

	.hl-actions--right .hl-actions__label {
		max-width: 220px;
		opacity: 1;
		padding-left: 14px;
		padding-right: 28px;
	}

	.hl-actions--left .hl-actions__label {
		max-width: 220px;
		opacity: 1;
		padding-left: 28px;
		padding-right: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hl-actions__item::before,
	.hl-actions__item::after,
	.hl-actions__item--phone .hl-actions__icon-img {
		animation: none;
	}

	.hl-actions__label,
	.hl-actions__icon {
		transition: none;
	}
}
