/* Cụm nút CTA nổi + popup form (v1.5.18, inc/cta-noi.php). Font luôn inherit. Màu nhận diện theo phiếu SEO 17/10:
   cam #f58634 (viền, nền nhãn) · nền tối #1b181f · nền nút trắng. */

/* Nút chat cam cũ của child theme (footer.php) — bộ đệm cta-noi.php gỡ hẳn HTML; dòng này dự phòng khi khối lệch khuôn.
   Tắt BFF_CTA_NOI là hiện lại. */
#arcontactus { display: none !important; }

.bff-cta {
	position: fixed; right: 20px; bottom: 20px; z-index: 99;
	display: flex; flex-direction: column; gap: 14px;
}
.bff-cta__nut {
	position: relative; display: flex; align-items: center; justify-content: center;
	width: 56px; height: 56px; border: 2px solid #f58634; border-radius: 50%;
	background: #fff; color: #f58634; box-shadow: 0 6px 18px rgba(27, 24, 31, .18);
	transition: transform .15s, box-shadow .15s;
}
.bff-cta__nut:hover, .bff-cta__nut:focus-visible { color: #f58634; transform: scale(1.06); box-shadow: 0 8px 22px rgba(27, 24, 31, .26); }
.bff-cta__icon { display: flex; line-height: 0; }
.bff-cta__zalo { width: 30px; height: 30px; }

/* Vòng toả lần lượt: mỗi nút toả 1 nhịp rồi nghỉ (anh chốt 17/10) — chu kỳ 7,5 giây, 3 nút lệch 2,5 giây. */
.bff-cta__nut::before {
	content: ""; position: absolute; inset: -2px; border: 2px solid #f58634; border-radius: 50%;
	opacity: 0; pointer-events: none; animation: bff-cta-vong 7.5s ease-out infinite;
}
.bff-cta__nut--form::before { animation-delay: 2.5s; }
.bff-cta__nut--call::before { animation-delay: 5s; }
.bff-cta__nut--call .bff-cta__svg { animation: bff-cta-rung 7.5s ease-in-out 5s infinite; transform-origin: 50% 50%; }
@keyframes bff-cta-vong {
	0% { transform: scale(1); opacity: .75; }
	16% { transform: scale(1.65); opacity: 0; }
	100% { transform: scale(1.65); opacity: 0; }
}
@keyframes bff-cta-rung {
	0%, 12%, 100% { transform: rotate(0); }
	2%, 6%, 10% { transform: rotate(-14deg); }
	4%, 8% { transform: rotate(14deg); }
}

/* Nhãn viên thuốc bên trái nút, hiện khi rê chuột / Tab tới. */
.bff-cta__nhan {
	position: absolute; right: calc(100% + 12px); top: 50%; transform: translate(6px, -50%);
	padding: 8px 16px; border-radius: 999px; background: #f58634; color: #fff;
	font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap;
	box-shadow: 0 4px 12px rgba(27, 24, 31, .2); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
}
.bff-cta__nut:hover .bff-cta__nhan, .bff-cta__nut:focus-visible .bff-cta__nhan { opacity: 1; transform: translate(0, -50%); }

/* Nút "lên đầu trang" của Flatsome (chỉ hiện từ 850px) đặt lên trên cụm, cách 20px: 3 × 56 + 2 × 14 + 20 + 20. */
.back-to-top.fixed { bottom: 236px; }

/* Điện thoại: thanh dưới của child theme đã có Gọi · Zalo · Điền form · Nhắn tin → không hiện cụm nổi (tránh trùng nút). */
@media only screen and (max-width: 549px) {
	.bff-cta { display: none; }
}
.helpbarfull .helpbar li.item a.link-item i.bff-cta-o__i { color: #f58634; }
.bff-cta-o__i .bff-cta__svg { width: 28px; height: 28px; display: block; }

/* ===== Header: rê chuột nút "Liên hệ" + nút tìm kiếm về cam (phiếu SEO GuiLuongCode_202610172335_HoverCamHeader, v1.5.20) =====
   header.css của child theme đè hover thành #f1f1f1 bằng #header #masthead.header-main … → thêm `html` để mạnh hơn 1 bậc, không cần !important.
   Kính lúp là ảnh PNG tối (img/icons/icon_search.png) → đổi trắng bằng filter. Hai nút chỉ có ở máy tính (.hide-for-medium); header dính dùng chung #masthead. */
html #header #masthead.header-main .header-button-1 .header-button .button,
html #header #masthead.header-main .header-button-1 .header-button .button span,
html #header #masthead .html_topbar_right .SearchButton .icon-search-customize,
html #header #masthead .html_topbar_right .SearchButton .search-icon { transition: background-color .2s, color .2s, filter .2s; }
html #header #masthead.header-main .header-button-1 .header-button .button:hover,
html #header #masthead.header-main .header-button-1 .header-button .button:focus-visible,
html #header #masthead .html_topbar_right .SearchButton .icon-search-customize:hover { background: #f58634; }
html #header #masthead.header-main .header-button-1 .header-button .button:hover span,
html #header #masthead.header-main .header-button-1 .header-button .button:focus-visible span { color: #fff; }
html #header #masthead .html_topbar_right .SearchButton .icon-search-customize:hover .search-icon { filter: brightness(0) invert(1); }

@media (prefers-reduced-motion: reduce) {
	.bff-cta__nut::before, .bff-cta__nut--call .bff-cta__svg { animation: none; }
	.bff-cta__nut, .bff-cta__nhan { transition: none; }
}

/* ===== Popup form ===== */
.bff-cta-pop[hidden] { display: none; }
.bff-cta-pop { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.bff-cta-pop__nen { position: absolute; inset: 0; background: rgba(27, 24, 31, .72); }
.bff-cta-pop__hop {
	position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto;
	padding: 28px 24px 24px; border-top: 4px solid #f58634; border-radius: 16px; background: #fff;
	box-shadow: 0 20px 50px rgba(27, 24, 31, .35);
}
.bff-cta-pop__dong {
	position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; min-height: 0; margin: 0; padding: 0;
	border: 0; border-radius: 50%; background: transparent; color: #1b181f; font-size: 28px; line-height: 40px; cursor: pointer;
}
.bff-cta-pop__dong:hover, .bff-cta-pop__dong:focus-visible { background: #f6f1ec; }
.bff-cta-pop__tieude { margin: 0 40px 6px 0; color: #1b181f; font-size: 22px; font-weight: 700; line-height: 1.3; text-transform: uppercase; }
.bff-cta-pop__mota { margin: 0 0 16px; color: #555; font-size: 15px; line-height: 1.5; }
/* Form 23099 tự có khung trắng lề 24px + tiêu đề "Đăng ký tư vấn" (theme ._4jek) → trong popup bỏ khung lồng (ô dàn hết hộp)
   và ẩn tiêu đề của form, giữ tiêu đề popup (anh chốt 18/10). Trang Liên hệ không đổi. */
.bff-cta-pop__hop ._4jek { padding: 0; border-radius: 0; }
.bff-cta-pop__hop ._4jek ._6nni { display: none; }
body.bff-cta-mo { overflow: hidden; }
