/* HVN Floating Contact - Frontend Styles */

.hvn-fc-widget {
	--hvn-fc-color: #0068ff;
	position: fixed;
	bottom: 24px;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.hvn-fc-widget[data-hvn-preview="1"] {
	position: absolute;
	bottom: 20px;
}

.hvn-fc-widget.hvn-fc-right {
	right: 24px;
	align-items: flex-end;
}

.hvn-fc-widget.hvn-fc-left {
	left: 24px;
	right: auto;
	align-items: flex-start;
}

/* Danh sách các nút con (Zalo, Messenger, Hotline, Email) */
.hvn-fc-items {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 14px;
}

.hvn-fc-item {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	border-radius: 50px;
	padding: 8px 8px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
	text-decoration: none;
	opacity: 0;
	transform: translateY(14px) scale(0.85);
	pointer-events: none;
	transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hvn-fc-left .hvn-fc-item {
	flex-direction: row-reverse;
}

.hvn-fc-widget.hvn-fc-open .hvn-fc-item {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

/* Hiệu ứng xuất hiện lệch thời gian cho từng nút (stagger) */
.hvn-fc-widget.hvn-fc-open .hvn-fc-items .hvn-fc-item:nth-child(1) { transition-delay: 0.02s; }
.hvn-fc-widget.hvn-fc-open .hvn-fc-items .hvn-fc-item:nth-child(2) { transition-delay: 0.06s; }
.hvn-fc-widget.hvn-fc-open .hvn-fc-items .hvn-fc-item:nth-child(3) { transition-delay: 0.10s; }
.hvn-fc-widget.hvn-fc-open .hvn-fc-items .hvn-fc-item:nth-child(4) { transition-delay: 0.14s; }

.hvn-fc-item:hover {
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
	transform: translateY(-2px) scale(1.03);
}

.hvn-fc-widget.hvn-fc-open .hvn-fc-item:hover {
	transform: translateY(-2px) scale(1.03);
}

.hvn-fc-icon {
	width: 40px;
	height: 40px;
	min-width: 40px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hvn-fc-zalo .hvn-fc-icon { background: #0068ff; }
.hvn-fc-messenger .hvn-fc-icon { background: linear-gradient(135deg, #00c6ff, #0068ff); }
.hvn-fc-phone .hvn-fc-icon { background: #22c55e; }
.hvn-fc-email .hvn-fc-icon { background: #f97316; }

.hvn-fc-label {
	font-size: 14px;
	font-weight: 600;
	color: #1f2937;
	padding-right: 10px;
	white-space: nowrap;
}

.hvn-fc-left .hvn-fc-label {
	padding-right: 0;
	padding-left: 10px;
}

.hvn-fc-hide-labels .hvn-fc-label {
	display: none;
}

.hvn-fc-hide-labels .hvn-fc-item {
	padding: 6px;
}

/* Nút tròn chính */
.hvn-fc-toggle {
	position: relative;
	width: 80px;
	height: 80px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	background: var(--hvn-fc-color);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.hvn-fc-toggle:hover {
	transform: scale(1.06);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

.hvn-fc-toggle:active {
	transform: scale(0.96);
}

.hvn-fc-toggle-icon {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hvn-fc-icon-close {
	opacity: 0;
	transform: rotate(-90deg) scale(0.5);
}

.hvn-fc-icon-chat {
	opacity: 1;
	transform: rotate(0) scale(1);
}

.hvn-fc-widget.hvn-fc-open .hvn-fc-icon-chat {
	opacity: 0;
	transform: rotate(90deg) scale(0.5);
}

.hvn-fc-widget.hvn-fc-open .hvn-fc-icon-close {
	opacity: 1;
	transform: rotate(0) scale(1);
}

/* Hiệu ứng pulse nhắc chú ý */
.hvn-fc-pulse {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--hvn-fc-color);
	opacity: 0.55;
	animation: hvn-fc-pulse-animation 2.2s ease-out infinite !important;
	pointer-events: none;
}

.hvn-fc-widget.hvn-fc-open .hvn-fc-pulse {
	display: none;
}

@keyframes hvn-fc-pulse-animation {
	0% {
		transform: scale(1);
		opacity: 0.55;
	}
	100% {
		transform: scale(1.9);
		opacity: 0;
	}
}

/* Bong bóng chào mừng */
.hvn-fc-welcome {
	position: absolute;
	bottom: 70px;
	max-width: 220px;
	background: #fff;
	color: #1f2937;
	font-size: 13.5px;
	line-height: 1.4;
	padding: 10px 14px;
	border-radius: 14px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
	animation: hvn-fc-fade-in 0.4s ease 1.2s both;
}

.hvn-fc-right .hvn-fc-welcome {
	right: 0;
	border-bottom-right-radius: 4px;
}

.hvn-fc-left .hvn-fc-welcome {
	left: 0;
	border-bottom-left-radius: 4px;
}

.hvn-fc-widget.hvn-fc-open .hvn-fc-welcome {
	display: none;
}

@keyframes hvn-fc-fade-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Responsive - điện thoại */
@media (max-width: 600px) {
	.hvn-fc-widget {
		bottom: 16px;
	}
	.hvn-fc-widget.hvn-fc-right {
		right: 16px;
	}
	.hvn-fc-widget.hvn-fc-left {
		left: 16px;
	}
	.hvn-fc-toggle {
		width: 54px;
		height: 54px;
	}
	.hvn-fc-icon {
		width: 40px;
		height: 40px;
		min-width: 40px;
	}
	.hvn-fc-label {
		font-size: 13px;
	}
	.hvn-fc-welcome {
		max-width: 180px;
		font-size: 13px;
	}
	.hvn-fc-widget.hvn-fc-hide-mobile {
		display: none !important;
	}
}
/* ===== Fix icon chat bị nền vuông ===== */

.hvn-fc-toggle svg,
{
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.hvn-fc-toggle {
    background: var(--hvn-fc-color) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.hvn-fc-toggle svg {
    display: block;
    width: 28px;
    height: 28px;
    overflow: visible;
}
/* Ghi đè CSS của theme */
button.hvn-fc-toggle {
    padding: 0 !important;
    border: none !important;
    border-radius: 50% !important;

    width: 60px !important;
    height: 60px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    overflow: hidden !important;
    background: var(--hvn-fc-color) !important;
}