/**
 * Live chat (Tawk.to) — chỉ nạp khi chat đang bật.
 *
 * Tawk.to ở góc phải dưới; nút liên hệ nhanh (Zalo / Gọi / Messenger / Map,
 * dán trong Flatsome > Footer Scripts) chuyển sang góc trái dưới.
 */

/* ===== Nút liên hệ nhanh -> góc trái ===== */
html body .fsd-wrap {
	right: auto;
	left: 20px;
}

@media (max-width: 768px) {
	html body .fsd-wrap {
		left: 12px;
	}
}

/* Nhãn "Zalo", "Call now"... bật sang phải thay vì sang trái */
html body .fsd-tip {
	right: auto;
	left: calc(100% + 10px);
	transform: translateX(-6px);
}

html body .fsd-btn:hover .fsd-tip {
	transform: translateX(0);
}

/* Bong bóng "Do you need a consultation?" được thay bằng lời chào của chat */
html body .fsd-bubble {
	display: none !important;
}

/* ===== Lời chào cạnh nút Tawk.to ===== */
.smt-chat-greet {
	position: fixed;
	right: 20px;
	bottom: 96px;
	z-index: 2147483000;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	max-width: 290px;
	padding: 14px 14px 14px 16px;
	background: #fff;
	color: #1f2937;
	border-radius: 16px 16px 4px 16px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.22);
	font-size: 14px;
	line-height: 1.5;
	cursor: pointer;
	opacity: 0;
	transform: translateY(10px) scale(0.95);
	transform-origin: bottom right;
	transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.smt-chat-greet.is-visible {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.smt-chat-greet::after {
	content: "";
	position: absolute;
	right: 24px;
	bottom: -8px;
	border: 8px solid transparent;
	border-top-color: #fff;
	border-bottom: 0;
}

.smt-chat-greet__bell {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #006fba;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	animation: smt-chat-bell 1s ease 0.2s 2;
}

.smt-chat-greet__bell svg {
	width: 18px;
	height: 18px;
}

.smt-chat-greet__text {
	flex: 1 1 auto;
}

.smt-chat-greet__cta {
	display: block;
	margin-top: 4px;
	color: #006fba;
	font-weight: 600;
}

.smt-chat-greet__close {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin: -4px -4px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f1f5f9;
	color: #64748b;
	font-size: 15px;
	line-height: 22px;
	cursor: pointer;
}

.smt-chat-greet__close:hover {
	background: #e2e8f0;
	color: #1f2937;
}

@keyframes smt-chat-bell {
	0%, 100% { transform: rotate(0); }
	20% { transform: rotate(-16deg); }
	40% { transform: rotate(14deg); }
	60% { transform: rotate(-10deg); }
	80% { transform: rotate(6deg); }
}

@media (max-width: 768px) {
	.smt-chat-greet {
		right: 12px;
		bottom: 84px;
		max-width: calc(100vw - 96px);
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.smt-chat-greet,
	.smt-chat-greet__bell {
		animation: none;
		transition: opacity 0.2s ease;
		transform: none;
	}
}
