/* ==========================================================================
   HH Floating Tools — Nút nổi (Lên đầu trang / Liên hệ) + Popup liên hệ
   Tông màu theo logo HaiHuy: xanh dương #1a3fa3 + xanh lá #22c55e
   ========================================================================== */

.hhft-floating-wrap {
	--hhft-blue: #1a3fa3;
	--hhft-blue-dark: #122c75;
	--hhft-green: #22c55e;
	--hhft-green-dark: #16a34a;
	position: fixed;
	right: 18px;
	bottom: 24px;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
}

.hhft-fab-group {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.hhft-fab {
	display: flex;
	align-items: center;
	gap: 6px;
	border: none;
	border-radius: 8px;
	padding: 10px 14px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	color: #fff;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
	opacity: 0;
	transform: translateY(8px);
	pointer-events: none;
}

.hhft-fab.is-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.hhft-fab:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

.hhft-fab--top {
	background: var(--hhft-fab-top-color, #1a1a2e);
	filter: brightness(1);
}

.hhft-fab--top:hover {
	filter: brightness(1.2);
}

.hhft-fab--contact {
	background: var(--hhft-fab-contact-color, var(--hhft-green));
	filter: brightness(1);
}

.hhft-fab--contact:hover {
	filter: brightness(0.9);
}

.hhft-fab__arrow,
.hhft-fab__icon {
	font-size: 15px;
	line-height: 1;
}

.hhft-fab__icon-svg {
	width: 17px;
	height: 17px;
	flex-shrink: 0;
}

/* Kích thước nút — tuỳ chỉnh trong Settings */
.hhft-size--small .hhft-fab {
	padding: 7px 11px;
	font-size: 12px;
}
.hhft-size--small .hhft-fab__arrow,
.hhft-size--small .hhft-fab__icon {
	font-size: 12px;
}
.hhft-size--small .hhft-fab__icon-svg {
	width: 14px;
	height: 14px;
}

.hhft-size--large .hhft-fab {
	padding: 14px 20px;
	font-size: 15px;
}
.hhft-size--large .hhft-fab__arrow,
.hhft-size--large .hhft-fab__icon {
	font-size: 18px;
}
.hhft-size--large .hhft-fab__icon-svg {
	width: 21px;
	height: 21px;
}

@media (max-width: 480px) {
	.hhft-size--small .hhft-fab {
		width: 38px;
		height: 38px;
	}
	.hhft-size--large .hhft-fab {
		width: 54px;
		height: 54px;
	}
}

/* Popup liên hệ — gọn nhẹ, không tiêu đề */
.hhft-contact-popup {
	display: none;
	position: relative;
	flex-direction: column;
	width: 230px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
	overflow: hidden;
	margin-bottom: 4px;
	padding: 10px;
}

.hhft-contact-popup.is-open {
	display: flex;
}

.hhft-contact-popup__close {
	position: absolute;
	top: 4px;
	right: 6px;
	background: transparent;
	border: none;
	color: #999;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 4px;
	z-index: 1;
}

.hhft-contact-popup__close:hover {
	color: #444;
}

.hhft-contact-popup__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.hhft-contact-channel {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 10px;
	border-radius: 10px;
	text-decoration: none;
	color: #333;
	font-size: 13px;
	font-weight: 500;
	background: transparent;
	transition: background 0.15s ease;
}

.hhft-contact-channel:hover {
	background: #f3f5fa;
}

.hhft-contact-channel__icon {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: #fff;
	font-size: 13px;
}

.hhft-contact-channel__icon--custom {
	border-radius: 6px;
	object-fit: cover;
	background: none;
}

.hhft-contact-channel--zalo .hhft-contact-channel__icon {
	background: #0068ff;
}
.hhft-contact-channel--zalo .hhft-contact-channel__icon::before {
	content: "Za";
	font-size: 10px;
	font-weight: 700;
}

.hhft-contact-channel--messenger .hhft-contact-channel__icon {
	background: #0084ff;
}
.hhft-contact-channel--messenger .hhft-contact-channel__icon::before {
	content: "Fb";
	font-size: 10px;
	font-weight: 700;
}

.hhft-contact-channel--hotline .hhft-contact-channel__icon {
	background: var(--hhft-green);
}
.hhft-contact-channel--hotline .hhft-contact-channel__icon::before {
	content: "\260E";
	font-size: 13px;
}

@media (max-width: 480px) {
	.hhft-floating-wrap {
		right: 12px;
		bottom: 16px;
	}

	.hhft-fab__text {
		display: none;
	}

	.hhft-fab {
		padding: 12px;
		border-radius: 50%;
		width: 46px;
		height: 46px;
		justify-content: center;
	}

	.hhft-contact-popup {
		width: 220px;
	}
}
