﻿
/* Container chính */
.fixedpage-action {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 2147483647;
}

/* Dropdown Menu */
.dropdown-menu {
	list-style: none;
	padding: 0;
	margin: 0;
	background: white;
	position: absolute;
	bottom: 50px;
	right: 0;
	width: 200px;
	display: none;
}

.dropdown:hover .dropdown-menu {
	display: block;
}

/* Back to Top Button */
#myBtn, .scroll-top-btn {
	display: none;
	transition: background-color 0.3s, opacity 0.5s, visibility 0.5s;
	z-index: 1099;
	cursor: pointer;
	background: #000;
	height: 45px;
	width: 45px;
	color: #fff;
	text-align: center;
	border-radius: 50%;
	line-height: 40px;
	font-size: 30px;
	margin-top: 10px;
	border: 2px solid transparent;
	opacity: 0.4;
}

	#myBtn:hover,
	#myBtn:focus,
	.scroll-top-btn:hover,
	.scroll-top-btn:focus {
		opacity: 1;
	}

/* Chat Widget */
.chat-widget {
	position: fixed !important;
	bottom: 20px;
	right: 20px;
	width: 450px;
	max-width: 95vw;
	height: 650px;
	max-height: 90vh;
	background: white;
	border-radius: 10px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	z-index: 2147483647;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	transition: opacity 0.3s ease-out, transform 0.3s ease-out;
	opacity: 0;
	transform: translateY(100%);
}

	.chat-widget.active {
		opacity: 1;
		transform: translateY(0);
	}

/* Animation */
@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(100%);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes slideDown {
	from {
		opacity: 1;
		transform: translateY(0);
	}

	to {
		opacity: 0;
		transform: translateY(100%);
	}
}

/* Chat Header */
.chat-header {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	padding: 8px;
	background: #007bff;
	color: #fff;
	border-radius: 8px 8px 0 0;
}

	.chat-header img.chatbot-avatar {
		width: 50px; /* tăng kích thước */
		height: 50px;
		object-fit: contain; /* giữ nguyên tỉ lệ logo, không bị kéo méo */
		border-radius: 50%; /* nếu muốn logo tròn */
		background: #fff; /* thêm nền trắng nếu logo trong suốt */
	}

	.chat-header h3 {
		flex: 1;
		margin: 0;
		font-size: 16px;
		font-weight: 600;
		margin-left: 10px;
	}

.chat-reset,
.chat-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 18px;
	margin-left: 5px;
	cursor: pointer;
	transition: 0.3s;
}

	.chat-reset:hover {
		color: #ffeb3b;
	}

	.chat-close:hover {
		color: #ff4d4d;
	}
.icon-btn {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	border-radius: 50%;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease-in-out;
	color: white;
	font-size: 16px;
}

	.icon-btn:hover {
		background: rgba(255, 255, 255, 0.4);
		transform: rotate(10deg);
	}

/* Chat Messages */
.chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
	background: #f8f9fa;
	width: 100%;
	box-sizing: border-box;
	max-height: 500px; /* Đảm bảo có thể cuộn */
}

.scroll-btn {
	background: linear-gradient(135deg, #007bff, #00c6ff);
	color: white;
	border: none;
	padding: 8px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 0px;
	display: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	position: absolute;
	top: -50px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
	box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
	transition: all 0.3s ease;
}

	.scroll-btn:hover {
		background: linear-gradient(135deg, #0056b3, #0099cc);
		transform: translateX(-50%) scale(1.1);
		box-shadow: 0 4px 10px rgba(0, 123, 255, 0.5);
	}

	.scroll-btn svg {
		width: 16px;
		height: 16px;
		fill: white;
	}
/* Message */
.message {
	margin-bottom: 10px;
	display: flex;
}

	.message.bot {
		align-items: flex-start;
		justify-content: flex-start;
	}

	.message.user {
		justify-content: flex-end;
	}

	.message.bot .message-content {
		max-width: 85%;
		background: #e7f6fd;
		color: #000;
		border-bottom-left-radius: 5px;
		box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
		display: block; /* Thay flex để đảm bảo không gian cho grid */
		align-items: flex-start;
		gap: 8px;
		word-wrap: break-word;
		padding: 10px;
		box-sizing: border-box;
	}

.message-content {
	max-width: 85%;
	padding: 10px 12px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.5;
	box-sizing: border-box;
	width: auto;
}

.message.user .message-content {
	max-width: 85%;
	background: #007bff;
	color: white;
	border-bottom-right-radius: 5px;
}

.bot-avatar {
	width: 28px;
	height: 28px;
	margin-right: 8px;
	margin-top: 4px;
	flex-shrink: 0;
	background: #fff; 
	border-radius: 50%; 
	padding: 2px;
}


.bot-avatar-icon {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: contain;
	margin-top: 3px;
}

/* Quick Actions */
.quick-actions {
	padding: 15px 20px;
	background: white;
	border-top: 1px solid #e9ecef;
	border-bottom: 1px solid #e9ecef;
	transform: translateY(100%);
	transition: transform 0.3s ease-out;
	display: none;
	z-index: 2147483647;
}

	.quick-actions.active {
		display: block;
		transform: translateY(0);
	}

	.quick-actions h4 {
		font-size: 10px;
		color: #666;
		margin-bottom: 10px;
		text-transform: uppercase;
		letter-spacing: 0.5px;
	}

.action-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.action-btn {
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	padding: 8px 12px;
	border-radius: 15px;
	font-size: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
	color: #495057;
}

	.action-btn:hover {
		background: #e9ecef;
		border-color: #adb5bd;
	}

/* Chat Input */
.chat-input {
	padding: 10px;
	background: white;
	display: flex;
	align-items: center;
	gap: 10px;
	border-top: 1px solid #ddd;
	position: relative;
}

.input-wrapper {
	position: relative;
	flex-grow: 1;
}

	.input-wrapper input[type="text"] {
		width: 100%;
		padding: 8px 40px 8px 36px;
		border-radius: 20px;
		border: 1px solid #ccc;
		font-size: 14px;
		outline: none;
	}

.chat-input input {
	flex: 1;
	border: 1px solid #dee2e6;
	border-radius: 20px;
	padding: 10px 15px;
	font-size: 14px;
	outline: none;
	transition: border-color 0.2s ease;
}

	.chat-input input:focus {
		border-color: #007bff;
	}

.quick-menu-btn {
	position: absolute;
	top: 50%;
	left: 10px;
	transform: translateY(-50%);
	background: none;
	border: none;
	padding: 0;
	width: 20px;
	height: 20px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.menu-icon {
	width: 100%;
	height: 2px;
	background: #495057;
	margin: 2px 0;
	transition: all 0.3s ease;
}

.quick-menu-btn:hover .menu-icon {
	background: #007bff;
}

.send-btn {
	background: #007bff;
	border: none;
	padding: 10px;
	border-radius: 50%;
	color: white;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

	.send-btn:hover {
		background: #0056b3;
	}

	.send-btn:disabled {
		background: #6c757d;
		cursor: not-allowed;
	}

/* Typing Indicator */
.typing-indicator {
	display: none;
	padding: 10px 15px;
	background: white;
	border-radius: 18px;
	border-bottom-left-radius: 5px;
	max-width: 95%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.typing-dots {
	display: flex;
	gap: 3px;
}

	.typing-dots span {
		width: 6px;
		height: 6px;
		background: #666;
		border-radius: 50%;
		animation: typing 1.4s infinite ease-in-out;
	}

		.typing-dots span:nth-child(2) {
			animation-delay: 0.2s;
		}

		.typing-dots span:nth-child(3) {
			animation-delay: 0.4s;
		}

@keyframes typing {
	0%, 60%, 100% {
		opacity: 0.3;
	}

	30% {
		opacity: 1;
	}
}

/* Container danh sách sản phẩm */
.tgdd-product-list {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr) !important; /* Ép 2 cột trên màn hình >400px */
	gap: 8px !important;
	width: 100% !important;
	box-sizing: border-box;
	padding: 0;
	margin: 0;
	min-width: 0;
	max-width: none;
}

/* Card sản phẩm */
.tgdd-product-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 6px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
	align-items: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	width: 100%;
	box-sizing: border-box;
	min-width: 0;
	max-width: 100%; /* Đảm bảo không vượt quá kích thước cha */
}

	.tgdd-product-card:hover {
		transform: translateY(-3px);
		box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
	}

/* Hình ảnh sản phẩm */
.tgdd-product-img-wrapper {
	width: 100%;
	height: 100px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: 4px;
	box-sizing: border-box;
	max-width: 100%; /* Giới hạn kích thước */
}

.tgdd-product-img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

/* Thông tin sản phẩm */
.tgdd-product-info {
	width: 100%;
	text-align: left;
	padding: 4px 0;
	box-sizing: border-box;
}

.tgdd-product-name {
	font-size: 12px;
	font-weight: 600;
	color: #333;
	line-height: 1.2;
	margin-bottom: 2px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
	word-wrap: break-word;
}

.tgdd-product-price {
	display: flex;
	align-items: baseline;
	gap: 2px;
	margin-bottom: 2px;
	flex-wrap: wrap;
}

.tgdd-price-old {
	font-size: 10px;
	color: #888;
	text-decoration: line-through;
}

.tgdd-price-new {
	color: #e5101d;
	font-size: 12px;
	font-weight: bold;
}

.tgdd-product-rating {
	font-size: 10px;
	color: #666;
	margin-bottom: 4px;
}

/* Nút hành động */
.tgdd-product-actions {
	display: flex;
	gap: 4px;
	width: 100%;
	padding-top: 4px;
	box-sizing: border-box;
}

.tgdd-add-to-cart, .tgdd-buy-now {
	padding: 3px 6px;
	border: none;
	border-radius: 4px;
	font-size: 10px;
	font-weight: 500;
	text-align: center;
	width: 50%;
	cursor: pointer;
	transition: background 0.2s ease;
	text-decoration: none;
	display: inline-block;
	box-sizing: border-box;
}

.tgdd-add-to-cart {
	background: #ff6600;
	color: white;
}

	.tgdd-add-to-cart:hover {
		background: #e65c00;
	}

.tgdd-buy-now {
	background: #007bff;
	color: white;
}

	.tgdd-buy-now:hover {
		background: #0056b3;
	}

/* Microphone Button */
.mic-btn {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	background: none;
	border: none;
	padding: 0;
	width: 24px;
	height: 24px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

	.mic-btn svg {
		width: 20px;
		height: 20px;
		fill: #495057;
		transition: fill 0.2s ease;
	}

	.mic-btn.recording svg {
		fill: #e74c3c;
		animation: pulse 1.5s infinite;
	}

	.mic-btn:hover svg {
		fill: #007bff;
	}

/* Animation pulse cho hiệu ứng ghi âm */
@keyframes pulse {
	0% {
		transform: scale(1);
	}

	50% {
		transform: scale(1.1);
	}

	100% {
		transform: scale(1);
	}
}

/* Chat Disclaimer */
.chat-disclaimer {
	font-size: 11px;
	color: #6c757d;
	text-align: center;
	padding: 5px 10px;
	background: #f8f9fa;
	border-top: 1px solid #ddd;
}

/* Responsive Design */
@media (max-width: 768px) {
	.chat-widget {
		width: 100%;
		max-width: 95vw;
		height: 500px;
		max-height: 80vh;
		right: 10px;
		border: 2px solid #005a9c;
	}

	.tgdd-product-list {
		grid-template-columns: repeat(2, 1fr) !important; /* Chỉ 2 cột trên màn hình nhỏ */
		gap: 6px !important;
	}

	.tgdd-product-card {
		width: 100% !important;
	}

	.tgdd-product-img-wrapper {
		height: 80px;
	}

	.tgdd-product-name {
		font-size: 11px;
	}

	.tgdd-price-new {
		font-size: 11px;
	}

	.tgdd-price-old {
		font-size: 9px;
	}

	.tgdd-product-rating {
		font-size: 9px;
	}

	.tgdd-add-to-cart, .tgdd-buy-now {
		font-size: 9px;
		padding: 2px 5px;
	}

	.quick-actions {
		padding: 10px 15px;
	}

	.dropdown-menu {
		bottom: 80px;
		width: 180px;
	}
}


/* Điện thoại nhỏ (≤360px): vẫn 2 cột nhưng thu gọn kích thước */
@media (max-width: 360px) {
	.tgdd-product-list {
		grid-template-columns: repeat(2, minmax(130px, 1fr)) !important;
		gap: 6px !important;
	}

	.tgdd-product-card {
		padding: 6px;
	}

	.tgdd-product-img-wrapper {
		height: 70px;
	}

	.tgdd-product-name {
		font-size: 11px;
		-webkit-line-clamp: 2;
	}

	.tgdd-price-new {
		font-size: 11px;
	}

	.tgdd-price-old {
		font-size: 9px;
	}

	.tgdd-product-rating {
		font-size: 9px;
	}

	.tgdd-product-actions {
		gap: 4px;
	}

	.tgdd-add-to-cart, .tgdd-buy-now {
		font-size: 10px;
		padding: 4px 6px;
	}
}
@media (max-width: 768px) {
	.message.bot .message-content,
	.message.user .message-content {
		max-width: 100% !important; /* mặc định bạn đang để 85% */
	}
}

/* Siêu nhỏ (≤300px): vẫn 2 cột, tiếp tục co lại một chút */
@media (max-width: 300px) {
	.tgdd-product-list {
		grid-template-columns: repeat(2, minmax(120px, 1fr)) !important;
		gap: 4px !important;
	}

	.tgdd-product-img-wrapper {
		height: 64px;
	}

	.tgdd-product-name {
		font-size: 10px;
	}

	.tgdd-add-to-cart, .tgdd-buy-now {
		font-size: 9px;
		padding: 3px 4px;
	}
}

@media (max-width: 400px) {

	.chat-widget {
		width: 100%;
		max-width: 95vw;
		height: 450px;
		right: 10px;

	}

	.tgdd-product-card {
		width: 100% !important;
	}

	.tgdd-product-img-wrapper {
		height: 80px;
	}

	.tgdd-product-actions {
		flex-direction: column;
		gap: 2px;
	}

	.tgdd-add-to-cart, .tgdd-buy-now {
		width: 100%;
		font-size: 10px;
		padding: 3px 6px;
	}

	.quick-actions {
		padding: 8px 12px;
	}

	.dropdown-menu {
		bottom: 70px;
		width: 160px;
	}
}
.tgdd-product-list br {
	display: none;
}
/* Animation cho slide-up và fade-in */
@keyframes slideUp {
	from {
		transform: translateY(20px);
		opacity: 0;
	}

	to {
		transform: translateY(0);
		opacity: 1;
	}
}


@keyframes fadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.cart-added-notification {
	background-color: #f0fff4;
	border-left: 4px solid #38a169;
	padding: 1rem;
	border-radius: 0.5rem;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	display: flex;
	align-items: center;
	animation: fadeIn 0.5s ease-in;
}

.cart-added-img {
	width: 4rem;
	height: 4rem;
	object-fit: cover;
	border-radius: 0.25rem;
	margin-right: 1rem;
}

.cart-added-notification p {
	margin: 0;
}

.text-green-700 {
	color: #2f855a;
}

.font-semibold {
	font-weight: 600;
}

.text-blue-600 {
	color: #3182ce;
}

.text-gray-600 {
	color: #718096;
}

.font-medium {
	font-weight: 500;
}

.text-gray-500 {
	color: #a0aec0;
}

.mt-1 {
	margin-top: 0.25rem;
}

.mt-2 {
	margin-top: 0.5rem;
}

.bg-blue-500 {
	background-color: #4299e1;
}

.text-white {
	color: #fff;
}

.px-3 {
	padding-left: 0.75rem;
	padding-right: 0.75rem;
}

.py-1 {
	padding-top: 0.25rem;
	padding-bottom: 0.25rem;
}

.rounded {
	border-radius: 0.25rem;
}

.hover\:bg-blue-600:hover {
	background-color: #2b6cb0;
}

.transition {
	transition: all 0.2s ease-in-out;
}

.duration-200 {
	transition-duration: 200ms;
}

.mt-2 {
	margin-top: 0.5rem;
}

.bg-blue-600 {
	background-color: #2563eb;
}

.text-white {
	color: #fff;
}

.px-4 {
	padding-left: 1rem;
	padding-right: 1rem;
}

.py-2 {
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}

.rounded-md {
	border-radius: 0.375rem;
}

.hover\:bg-blue-700:hover {
	background-color: #1e40af;
}

.transition {
	transition: all 0.3s ease;
}

.duration-300 {
	transition-duration: 300ms;
}

.text-lg {
	font-size: 1.125rem;
}

.text-sm {
	font-size: 0.875rem;
}

.flex {
	display: flex;
}

.items-center {
	align-items: center;
}

.gap-2 {
	gap: 0.5rem;
}

.bg-red-500 {
	background-color: #ef4444;
}

.hover\:bg-red-600:hover {
	background-color: #dc2626;
}

.cart-removed-notification {
	background-color: #fef2f2;
	border-left: 4px solid #dc2626;
	padding: 1rem;
	border-radius: 0.5rem;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	display: flex;
	align-items: center;
	animation: slideUp 0.5s ease-out, fadeIn 0.5s ease-out;
}

.text-red-800 {
	color: #dc2626;
}
/* ===== Mobile fullscreen chat (like TGDĐ) ===== */
html.no-scroll, body.no-scroll {
	overflow: hidden;
	height: 100%;
}

@media (max-width: 768px) {
	.chat-widget.mobile-full {
		position: fixed !important;
		inset: 0; /* top:0 right:0 bottom:0 left:0 */
		width: 100vw;
		max-width: 100vw;
		height: 100dvh; /* dynamic viewport height cho iOS/Android mới */
		max-height: 100dvh;
		border-radius: 0;
		box-shadow: none;
		background: var(--surface);
		transform: none !important;
		opacity: 1 !important; /* bật luôn hiển thị */
		pointer-events: auto;
		z-index: 2147483647; /* trên mọi thứ */
	}

	/* Tăng đệm safe-area cho tai thỏ */
	.chat-header {
		padding-top: max(10px, env(safe-area-inset-top));
	}

	.chat-input {
		padding-bottom: max(10px, env(safe-area-inset-bottom));
	}

	/* Ẩn các nút nổi khi chat đang full */
	.chat-widget.mobile-full ~ .chat-button,
	.chat-widget.mobile-full ~ .fab-more,
	.chat-widget.mobile-full ~ .scroll-top-btn {
		display: none !important;
	}
}
/* ===== MOBILE FULLSCREEN OVERRIDES (đặt CUỐI file) ===== */
html.no-scroll, body.no-scroll {
	overflow: hidden;
	height: 100%;
}

@media (max-width: 768px) {
	/* Khi chat mở => full màn hình, xoá mọi viền/khoảng cách cũ */
	.chat-widget.active {
		position: fixed !important;
		inset: 0 !important; /* top:0 right:0 bottom:0 left:0 */
		height: calc(var(--vvh) * 100) !important;
		max-height: calc(var(--vvh) * 100) !important;
		max-width: none !important;
		max-height: none !important;
		right: auto !important;
		bottom: auto !important;
		border: 0 !important; /* xoá khung xanh cũ */
		border-radius: 0 !important;
		box-shadow: none !important;
		background: #fff !important;
		transform: none !important;
		opacity: 1 !important;
		z-index: 2147483647 !important;
	}

		/* Vùng tin nhắn không bị giới hạn 500px nữa */
		.chat-widget.active .chat-messages {
			max-height: none !important;
			min-height: 0 !important;
		}

		/* Ẩn nút tròn khi full */
		.chat-widget.active ~ .chat-button,
		.chat-widget.active ~ .scroll-top-btn {
			display: none !important;
		}

	/* Safe-area cho tai thỏ */
	.chat-header {
		padding-top: max(10px, env(safe-area-inset-top));
	}

	.chat-input {
		padding-bottom: max(10px, env(safe-area-inset-bottom));
	}
}
:root{
  --fab-size: 47px;          /* đường kính 1 nút */
  --fab-gap: -10px;           /* khoảng cách giữa 2 nút */
  --fab-base: max(12px, env(safe-area-inset-bottom)); 
}

@media (max-width: 768px){
  .chat-button{
    position: fixed !important;
    right: 12px !important;
    bottom: calc(var(--fab-base) + (var(--fab-size) + var(--fab-gap)) * 1) !important; /* đổi số 0 thành 1/2/3 nếu muốn vị trí khác */
    width: var(--fab-size) !important;
    height: var(--fab-size) !important;
    border-radius: 50% !important;
    z-index: 2147483647 !important;
  }

  /* Khi mở chat full thì ẩn nút tròn để không che */
  .chat-widget.active ~ .chat-button{ display:none !important; }
}
/* --- MOBILE: giữ header & input dính, không nhảy khi mở bàn phím --- */
@media (max-width: 768px) {
	/* dùng chiều cao viewport “thực” qua biến --vvh (set bởi JS ở dưới) */
	.chat-widget.active {
		height: calc(var(--vvh, 1vh) * 100) !important;
		inset: 0 !important;
		position: fixed !important;
		overscroll-behavior: contain; /* tránh bounce đẩy layout */
		background: #fff !important;
		border: 0 !important;
		border-radius: 0 !important;
		box-shadow: none !important;
		transform: none !important;
		opacity: 1 !important;
		z-index: 2147483647 !important;
	}

	/* header dính trên cùng trong khung chat */
	.chat-header {
		position: sticky;
		top: 0;
		z-index: 3;
	}

	/* thanh nhập dính dưới cùng trong khung chat */
	.chat-input {
		position: sticky;
		bottom: 0;
		z-index: 3;
		padding-bottom: max(10px, env(safe-area-inset-bottom));
		background: #fff;
	}

	/* vùng tin nhắn tự co giãn, cuộn mượt */
	.chat-messages {
		flex: 1;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}
}
/* Desktop only: hạ nút chat xuống thêm một xíu */
@media (min-width: 769px) {
	.chat-button {
		bottom: 8px !important; /* chỉnh 8 → 10/12 tùy ý */
	}
}

:root {
	--chat-size: 60px;
}

.chat-button {
	position: fixed !important;
	right: 20px;
	bottom: 20px;
	width: var(--chat-size);
	height: var(--chat-size);
	border-radius: 50%;
	display: grid;
	place-items: center; /* căn giữa tuyệt đối */
	background: linear-gradient(135deg,#007bff,#0056b3);
	box-shadow: 0 6px 25px rgba(0,123,255,.35);
	cursor: pointer;
	overflow: hidden;
	transition: transform .18s ease, box-shadow .18s ease;
	z-index: 2147483647;
}

	/* vòng “ring” mỏng cho cảm giác premium */
	.chat-button::before {
		content: "";
		position: absolute;
		inset: 6px;
		border-radius: 50%;
		box-shadow: inset 0 0 0 2px rgba(255,255,255,.9);
		pointer-events: none;
	}

	.chat-button:hover {
		transform: translateY(-2px) scale(1.03);
	}


.chat-icon {
	width: 64%;
	height: 64%;
	display: block;
}

.chat-button svg {
	width: auto;
	height: auto;
	fill: none;
}

/* chấm online */
.chat-online {
	position: absolute;
	right: 8px;
	bottom: 8px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #22C55E;
	box-shadow: 0 0 0 2px #fff;
}

/* mắt chớp nhẹ (vui mắt) */
@keyframes blink {
	0%,92%,100% {
		transform: scaleY(1)
	}

	96% {
		transform: scaleY(.1)
	}
}

#eye-left, #eye-right {
	transform-origin: center;
	animation: blink 4.5s infinite;
}
/* Nắn vị trí robot cho cân vòng trắng */
:root {
	--chat-icon-shift-y: 2px;
}
/* chỉnh 1–3px tùy mắt */

.chat-button .chat-icon {
	transform: translateY(var(--chat-icon-shift-y));
	/* fallback nếu trình duyệt cũ không hỗ trợ transform sub-pixel */
	margin-top: calc(var(--chat-icon-shift-y));
}
/* ---- MOBILE: cố định các nút theo viewport, không đẩy nhau ---- */
@media (max-width: 768px) {
	:root {
		--fab-base: max(12px, env(safe-area-inset-bottom));
		--fab-size: 47px; /* đúng kích thước chat-button của bạn */
		--fab-gap: 10px; /* khoảng cách menu với nút chat */
	}


		.scroll-top-btn.show {
			opacity: 1;
			visibility: visible;
			transform: translateY(0);
		}

	/* MENU 3 NÚT (Zalo/Mess/Hotline): bám ngay phía trên chat-button */
	.fixedpage-action .dropdown-menu {
		position: fixed !important;
		right: 12px !important;
		bottom: calc(var(--fab-base) + var(--fab-size) + var(--fab-gap)) !important;
		display: none; /* mở bằng click JS của bạn */
		z-index: 2147483647;
	}

	/* KHÔNG dùng hover để mở trên mobile */
	.dropdown:hover .dropdown-menu {
		display: none !important;
	}
}
/* === HSV BLUE THEME (from logo) — paste at END === */
:root {
	--brand-blue: #0C4C9C; /* xanh logo */
	--brand-blue-dark: #083A79; /* đậm hơn để hover */
	--brand-blue-light: #2F6FCB; /* nhạt hơn cho gradient */
}

/* NAV / MENU (đổi selector cho khớp site nếu khác) */
.navbar, .topbar, .main-menu, .menu, .nav-bar, .header-menu {
	background: var(--brand-blue) !important;
	border-color: var(--brand-blue) !important;
}

	.main-menu a, .menu a, .nav a {
		color: #fff !important;
	}

		.main-menu a:hover, .menu a:hover, .nav a:hover {
			background: var(--brand-blue-dark) !important;
			color: #fff !important;
		}

/* Search & hotline viền theo xanh logo */
input[type="search"], .search-input {
	border-color: var(--brand-blue) !important;
}

	input[type="search"]:focus, .search-input:focus {
		border-color: var(--brand-blue) !important;
		box-shadow: 0 0 0 3px rgba(12,76,156,.15) !important;
	}

.hotline, .hotline a {
	color: var(--brand-blue) !important;
}

/* Chat widget */
.chat-header {
	background: var(--brand-blue) !important;
}

.send-btn {
	background: var(--brand-blue) !important;
}

	.send-btn:hover {
		background: var(--brand-blue-dark) !important;
	}

.chat-button {
	background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark)) !important;
	box-shadow: 0 6px 25px rgba(12,76,156,.35) !important;
}

.scroll-btn {
	background: linear-gradient(135deg, var(--brand-blue-dark), var(--brand-blue-light)) !important;
}

/* CTA “Mua ngay” theo xanh logo */
.tgdd-buy-now {
	background: var(--brand-blue) !important;
	color: #fff !important;
}

	.tgdd-buy-now:hover {
		background: var(--brand-blue-dark) !important;
	}

/* Input focus trong chat */
.chat-input input:focus {
	border-color: var(--brand-blue) !important;
}
