/**
 * SHC Liên hệ nhanh — frontend.
 *
 * Biến do PHP đặt trên :root: --shc-qc-x, --shc-qc-y (khoảng cách tới mép),
 * --shc-qc-n (số nút). Mỗi nút có --shc-qc-color.
 * Mốc điện thoại: ≤ 849px (khớp mốc tablet của Flatsome).
 */

.shc-qc {
	--shc-qc-size: 52px;
	--shc-qc-gap: 12px;
	--shc-qc-bar-h: 62px;
	font-family: inherit;
}

.shc-qc__svg {
	display: block;
	width: 24px;
	height: 24px;
}

/* ---------------- Nút tròn nổi ---------------- */
.shc-qc__float {
	position: fixed;
	bottom: var(--shc-qc-y, 20px);
	z-index: 9990;
	display: flex;
	flex-direction: column;
	gap: var(--shc-qc-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.shc-qc--right .shc-qc__float { right: var(--shc-qc-x, 20px); }
.shc-qc--left .shc-qc__float { left: var(--shc-qc-x, 20px); }

.shc-qc__item {
	margin: 0;
	list-style: none;
}

.shc-qc__btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--shc-qc-size);
	height: var(--shc-qc-size);
	border-radius: 50%;
	background: var(--shc-qc-color, #141414);
	color: #fff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
	transition: transform .2s ease, box-shadow .2s ease;
}

.shc-qc__btn:hover,
.shc-qc__btn:focus-visible {
	color: #fff;
	transform: scale(1.08);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.shc-qc__btn:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--shc-qc-color) 45%, transparent);
	outline-offset: 3px;
}

/* Kênh dùng logo màu (Zalo): nút mang đúng hình logo gốc (vuông bo góc,
   như icon ứng dụng) thay vì nền tròn — cắt tròn làm logo bị lệch. */
.shc-qc__logo {
	display: block;
	width: 100%;
	height: 100%;
}

.shc-qc__btn--logo {
	border-radius: 24%;
	
}

/* Nhãn hiện khi rê chuột, nằm phía trong màn hình. */
.shc-qc__tip {
	position: absolute;
	top: 50%;
	padding: 7px 12px;
	border-radius: 6px;
	background: #141414;
	color: #fff;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(-50%);
	transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}

.shc-qc__tip b {
	font-weight: 700;
}

.shc-qc--right .shc-qc__tip { right: calc(100% + 12px); }
.shc-qc--left .shc-qc__tip { left: calc(100% + 12px); }

.shc-qc__btn:hover .shc-qc__tip,
.shc-qc__btn:focus-visible .shc-qc__tip {
	opacity: 1;
	visibility: visible;
}

/* Hiệu ứng tỏa sóng cho nút Hotline. */
.shc-qc--pulse .shc-qc__item--hotline .shc-qc__btn::before,
.shc-qc--pulse .shc-qc__item--hotline .shc-qc__btn::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: 50%;
	background: var(--shc-qc-color);
	animation: shc-qc-pulse 2s ease-out infinite;
}

.shc-qc--pulse .shc-qc__item--hotline .shc-qc__btn::after {
	animation-delay: 1s;
}

.shc-qc--pulse .shc-qc__item--hotline .shc-qc__svg {
	animation: shc-qc-ring 2s ease-in-out infinite;
}

@keyframes shc-qc-pulse {
	from { opacity: .45; transform: scale(1); }
	to { opacity: 0; transform: scale(1.8); }
}

@keyframes shc-qc-ring {
	0%, 50%, 100% { transform: rotate(0); }
	10%, 30% { transform: rotate(-14deg); }
	20%, 40% { transform: rotate(14deg); }
}

/* ---------------- Thanh dưới đáy (điện thoại) ---------------- */
.shc-qc__bar {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 9990;
	display: none;
	height: calc(var(--shc-qc-bar-h) + env(safe-area-inset-bottom, 0px));
	padding-bottom: env(safe-area-inset-bottom, 0px);
	background: #fff;
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
}

.shc-qc__bar-item {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	min-width: 0;
	color: var(--shc-qc-color);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
}

.shc-qc__bar-item span {
	max-width: 100%;
	overflow: hidden;
	color: #3a3a3a;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.shc-qc__bar-item .shc-qc__logo {
	width: 26px;
	height: 26px;
}

.shc-qc__bar-item + .shc-qc__bar-item {
	border-left: 1px solid rgba(0, 0, 0, 0.06);
}

/* Hotline nổi bật: nền màu, chữ trắng. */
.shc-qc__bar-item--hotline,
.shc-qc__bar-item--hotline2 {
	background: var(--shc-qc-color);
	color: #fff;
}

.shc-qc__bar-item--hotline span,
.shc-qc__bar-item--hotline2 span {
	color: #fff;
}

.shc-qc__bar-item:active {
	opacity: .75;
}

/* ---------------- Hiển thị theo thiết bị ---------------- */
@media (min-width: 850px) {
	.shc-qc-show-mobile .shc-qc { display: none; }

	/* Đẩy nút "lên đầu trang" của Flatsome lên trên cột nút. */
	body.shc-qc-side-right:not(.shc-qc-show-mobile) .back-to-top:not(.left),
	body.shc-qc-side-left:not(.shc-qc-show-mobile) .back-to-top.left {
		bottom: calc(var(--shc-qc-y) + var(--shc-qc-n) * 64px + 4px);
	}
}

@media (max-width: 849px) {
	.shc-qc-show-desktop .shc-qc { display: none; }

	.shc-qc {
		--shc-qc-size: 48px;
		--shc-qc-gap: 10px;
	}

	/* Không có chuột → không cần nhãn. */
	.shc-qc__tip { display: none; }

	/* Kiểu thanh dưới đáy. */
	.shc-qc-m-bar .shc-qc__float { display: none; }
	.shc-qc-m-bar .shc-qc__bar { display: flex; }

	body.shc-qc-m-bar:not(.shc-qc-show-desktop) {
		padding-bottom: calc(var(--shc-qc-bar-h, 62px) + env(safe-area-inset-bottom, 0px));
	}

	body.shc-qc-m-bar:not(.shc-qc-show-desktop) .back-to-top {
		bottom: calc(62px + 14px + env(safe-area-inset-bottom, 0px));
	}

	/* Kiểu nút tròn trên điện thoại. */
	body.shc-qc-m-float.shc-qc-side-right:not(.shc-qc-show-desktop) .back-to-top:not(.left),
	body.shc-qc-m-float.shc-qc-side-left:not(.shc-qc-show-desktop) .back-to-top.left {
		bottom: calc(var(--shc-qc-y) + var(--shc-qc-n) * 58px + 4px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.shc-qc__btn::before,
	.shc-qc__btn::after,
	.shc-qc__svg {
		animation: none !important;
	}
}

@media print {
	.shc-qc { display: none !important; }
}
