/* Tách nguyên văn từ public/views/footer.php (giai đoạn 1 tái kiến trúc, 27/09/2026). */
/* ==================== ZALO CHAT WIDGET STYLES ==================== */
.zalo-chat-widget {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 1050;
	font-family: var(--font-body, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif);
}

/* Nút bong bóng kích hoạt */
.zalo-chat-launcher {
	position: relative;
	display: flex;
	align-items: center;
	cursor: pointer;
	user-select: none;
}
.zalo-chat-icon-btn {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: #0068ff;
	box-shadow: 0 8px 24px rgba(0, 104, 255, 0.4);
	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;
	position: relative;
	z-index: 2;
}
.zalo-chat-launcher:hover .zalo-chat-icon-btn {
	transform: scale(1.08);
	box-shadow: 0 10px 28px rgba(0, 104, 255, 0.55);
}
.zalo-chat-pulse {
	position: absolute;
	width: 58px;
	height: 58px;
	border-radius: 50%;
	background: #0068ff;
	opacity: 0.5;
	animation: zaloPulse 2.2s 3;   /* thu hút chú ý vài lần rồi dừng, không nhấp nháy mãi */
	z-index: 1;
	pointer-events: none;
}
@keyframes zaloPulse {
	0% { transform: scale(1); opacity: 0.6; }
	70% { transform: scale(1.45); opacity: 0; }
	100% { transform: scale(1.45); opacity: 0; }
}

/* Tooltip cạnh nút */
.zalo-chat-tooltip {
	position: absolute;
	right: 68px;
	background:var(--o-bg-29);
	color:var(--o-tx-25);
	padding: 7px 14px;
	border-radius: 20px;
	box-shadow:var(--o-sh-3);
	border:1px solid var(--o-ln-21);
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	white-space: nowrap;
	pointer-events: none;
	transition: opacity 0.2s, transform 0.2s;
	opacity: 0;                     /* chỉ hiện khi rê chuột: không che nội dung trang */
	transform: translateX(6px);
}
.zalo-chat-launcher:hover .zalo-chat-tooltip {
	opacity: 1;
	transform: none;
}
.zalo-chat-tooltip span {
	font-size: 12.5px;
	font-weight: 700;
	color: #0068ff;
	line-height: 1.25;
}
.zalo-chat-tooltip small {
	font-size: 11px;
	font-weight: 600;
	color: #64748b;
}
@keyframes zaloTooltipBounce {
	0%, 100% { transform: translateX(0); }
	50% { transform: translateX(-4px); }
}

/* Khung chat Popup */
.zalo-chat-box {
	position: absolute;
	bottom: 74px;
	right: 0;
	width: 330px;
	background:var(--o-bg-29);
	border-radius: 18px;
	box-shadow:var(--o-sh-4);
	border:1px solid var(--o-ln-22);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	animation: zaloSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes zaloSlideUp {
	from { opacity: 0; transform: translateY(14px) scale(0.96); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Header khung chat */
.zalo-chat-header {
	background: linear-gradient(135deg, #0068ff, #0050c8);
	color: #ffffff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
	position: relative;
}
.zalo-chat-header-avatar {
	position: relative;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.zalo-chat-online-dot {
	position: absolute;
	bottom: 1px;
	right: 1px;
	width: 10px;
	height: 10px;
	background: #10b981;
	border: 2px solid #ffffff;
	border-radius: 50%;
}
.zalo-chat-header-info {
	flex: 1;
	min-width: 0;
}
.zalo-chat-name {
	font-size: 13.5px;
	font-weight: 700;
	line-height: 1.3;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.zalo-chat-status {
	font-size: 11.5px;
	opacity: 0.9;
	margin-top: 2px;
}
.zalo-chat-close-btn {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: #ffffff;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	font-size: 18px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.15s;
}
.zalo-chat-close-btn:hover {
	background: rgba(255, 255, 255, 0.35);
}

/* Thân chat */
.zalo-chat-body {
	padding: 16px;
	background:var(--o-bg-30);
	max-height: 250px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.zalo-chat-msg {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
}
.zalo-chat-bubble {
	background:var(--o-bg-29);
	color:var(--o-tx-25);
	padding: 10px 13px;
	border-radius: 14px 14px 14px 3px;
	font-size: 13px;
	line-height: 1.5;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	border:1px solid var(--o-ln-23);
}
.zalo-chat-bubble b {
	color:var(--o-tx-26);
}
.zalo-chat-time {
	font-size: 10.5px;
	color: #94a3b8;
	margin-left: 4px;
}

/* Chân khung chat / Nút hành động */
.zalo-chat-footer {
	padding: 12px 16px;
	background:var(--o-bg-29);
	border-top: 1px solid #f1f5f9;
}
.zalo-chat-action-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #0068ff;
	color: #ffffff;
	padding: 10px 16px;
	border-radius: 12px;
	font-size: 13.5px;
	font-weight: 700;
	text-decoration: none;
	transition: background 0.15s, transform 0.15s;
	box-shadow: 0 4px 12px rgba(0, 104, 255, 0.3);
}
.zalo-chat-action-btn:hover {
	background: #0056d6;
	transform: translateY(-1px);
	color: #ffffff;
}

@media(max-width: 768px) {
	.zalo-chat-icon-btn, .zalo-chat-pulse {
		width: 48px;
		height: 48px;
	}
	.zalo-chat-icon-btn svg {
		width: 28px;
		height: 28px;
	}
}
@media(max-width: 480px) {
	.zalo-chat-widget {
		bottom: 14px;
		right: 14px;
	}
	.zalo-chat-box {
		width: calc(100vw - 36px);
		bottom: 70px;
	}
	.zalo-chat-tooltip {
		display: none;
	}
}

/* Liên hệ ở chân trang + biểu tượng ô chat Zalo (trước là style="…" trong views/partials/public/footer.php, 28/09).
   Selector đủ mạnh để giữ thứ tự thắng như style trực tiếp (kể cả khi rê chuột). */
.footer .footer-col a.footer-contact, .footer .footer-col a.footer-contact:hover { display: inline-flex; align-items: center; gap: 6px; }
.footer .footer-col a.footer-zalo, .footer .footer-col a.footer-zalo:hover { color: #0068ff; font-weight: 600; }
.footer .footer-contact-ico { flex-shrink: 0; }
.footer .footer-zalo-ico { display: inline-block; vertical-align: middle; border-radius: 3px; }
#zaloChatWidget .zalo-chat-avatar-img { display: block; border-radius: 50%; }
#zaloChatWidget .zalo-chat-action-ico { display: block; flex-shrink: 0; }
#zaloChatWidget .zalo-chat-icon-svg { display: block; }
