/* XTD Nút liên hệ nổi – 1.1 */
.xtd-nlh {
	position: fixed;
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	z-index: 9990;
	display: flex;
	flex-direction: column;
	gap: 18px;
	pointer-events: none;
}
.xtd-nlh--trai { left: 20px; align-items: flex-start; }
.xtd-nlh--phai { right: 20px; align-items: flex-end; }

.xtd-nlh__nut {
	position: relative;
	display: flex;
	align-items: center;
	text-decoration: none !important;
	pointer-events: auto;
	-webkit-tap-highlight-color: transparent;
	transition: transform .2s;
}
.xtd-nlh__nut:hover { transform: translateY(-2px); }
.xtd-nlh--phai .xtd-nlh__nut { flex-direction: row-reverse; }

.xtd-nlh__icon {
	position: relative;
	z-index: 2;
	flex: 0 0 60px;
	width: 60px;
	height: 60px;
}
.xtd-nlh__tron {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	/* bóng đổ 2 lớp + viền sáng trên / tối dưới cho khối nổi */
	box-shadow:
		0 1px 2px rgba(0, 0, 0, .22),
		0 4px 8px rgba(0, 0, 0, .18),
		0 10px 20px rgba(0, 0, 0, .16),
		inset 0 2px 3px rgba(255, 255, 255, .45),
		inset 0 -3px 5px rgba(0, 0, 0, .18);
}

/* Chữ / số nằm sau icon */
.xtd-nlh__chu {
	position: relative;
	z-index: 1;
	display: block;
	height: 40px;
	line-height: 40px;
	margin-left: -30px;
	padding: 0 18px 0 40px;
	border-radius: 20px;
	color: #fff;
	font-family: "Be Vietnam Pro", Arial, Helvetica, sans-serif;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: .2px;
	white-space: nowrap;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
	box-shadow:
		0 1px 2px rgba(0, 0, 0, .2),
		0 4px 8px rgba(0, 0, 0, .16),
		0 8px 16px rgba(0, 0, 0, .12),
		inset 0 1px 1px rgba(255, 255, 255, .35),
		inset 0 -2px 3px rgba(0, 0, 0, .15);
	transition: filter .2s;
}
.xtd-nlh--phai .xtd-nlh__chu {
	margin-left: 0;
	margin-right: -30px;
	padding: 0 40px 0 18px;
}
.xtd-nlh__nut:hover .xtd-nlh__chu,
.xtd-nlh__nut:focus-visible .xtd-nlh__chu { filter: brightness(1.08); }
.xtd-nlh__nut:focus-visible { outline: 2px solid #f5b21e; outline-offset: 3px; border-radius: 30px; }

/* Zalo */
.xtd-nlh__nut--zalo .xtd-nlh__tron {
	background: radial-gradient(circle at 35% 28%, #ffffff 0%, #ffffff 45%, #e3edff 100%);
	border: 3px solid #0068ff;
}
.xtd-nlh__zalo { width: 74%; height: 74%; display: block; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .12)); }
.xtd-nlh__nut--zalo .xtd-nlh__chu { background: linear-gradient(180deg, #2a82ff 0%, #0068ff 55%, #0056d6 100%); }

/* Gọi */
.xtd-nlh__nut--goi .xtd-nlh__tron { background: radial-gradient(circle at 35% 28%, #5eb0f5 0%, #1e88e5 55%, #1565c0 100%); }
.xtd-nlh__nut--goi .xtd-nlh__chu { background: linear-gradient(180deg, #3d9bec 0%, #1e88e5 55%, #1872c8 100%); font-size: 17px; }
.xtd-nlh__rung {
	width: 30px;
	height: 30px;
	display: block;
	transform-origin: 50% 50%;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3));
	animation: xtd-nlh-rung 1.2s ease-in-out infinite;
}
.xtd-nlh__song {
	position: absolute;
	z-index: 1;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: rgba(30, 136, 229, .35);
	animation: xtd-nlh-song 1.8s ease-out infinite;
}
.xtd-nlh__song--2 { animation-delay: .9s; }

@keyframes xtd-nlh-rung {
	0%, 50%, 100% { transform: rotate(0); }
	5%, 15%, 25%, 35% { transform: rotate(-22deg); }
	10%, 20%, 30%, 40% { transform: rotate(22deg); }
}
@keyframes xtd-nlh-song {
	0% { transform: scale(1); opacity: .9; }
	100% { transform: scale(1.75); opacity: 0; }
}

/* Máy tính bảng + điện thoại: 1 hàng ngang – gọi bên trái, Zalo bên phải (chữ trái, logo phải) */
@media (max-width: 921px) {
	.xtd-nlh,
	.xtd-nlh--trai,
	.xtd-nlh--phai {
		left: 12px;
		right: 12px;
		bottom: calc(16px + env(safe-area-inset-bottom, 0px));
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		gap: 8px;
	}
	.xtd-nlh__nut--goi { order: 1; flex-direction: row; }
	.xtd-nlh__nut--zalo { order: 2; flex-direction: row-reverse; }

	.xtd-nlh__icon { flex-basis: 50px; width: 50px; height: 50px; }
	.xtd-nlh__chu,
	.xtd-nlh--phai .xtd-nlh__chu {
		height: 34px;
		line-height: 34px;
		border-radius: 17px;
		font-size: 14px;
	}
	.xtd-nlh__nut--goi .xtd-nlh__chu,
	.xtd-nlh--phai .xtd-nlh__nut--goi .xtd-nlh__chu { margin: 0 0 0 -25px; padding: 0 14px 0 33px; font-size: 15px; }
	.xtd-nlh__nut--zalo .xtd-nlh__chu,
	.xtd-nlh--phai .xtd-nlh__nut--zalo .xtd-nlh__chu { margin: 0 -25px 0 0; padding: 0 33px 0 14px; }
	.xtd-nlh__rung { width: 25px; height: 25px; }
}
/* màn rất hẹp */
@media (max-width: 359px) {
	.xtd-nlh, .xtd-nlh--trai, .xtd-nlh--phai { left: 8px; right: 8px; }
	.xtd-nlh__icon { flex-basis: 44px; width: 44px; height: 44px; }
	.xtd-nlh__nut--goi .xtd-nlh__chu,
	.xtd-nlh--phai .xtd-nlh__nut--goi .xtd-nlh__chu { margin-left: -22px; padding: 0 10px 0 28px; font-size: 13px; }
	.xtd-nlh__nut--zalo .xtd-nlh__chu,
	.xtd-nlh--phai .xtd-nlh__nut--zalo .xtd-nlh__chu { margin-right: -22px; padding: 0 28px 0 10px; font-size: 13px; }
	.xtd-nlh__rung { width: 22px; height: 22px; }
}

@media print {
	.xtd-nlh { display: none; }
}