/* NÚT LÊN ĐẦU TRANG (Back to top)
   JS: assets/js/back-to-top.js (tự tạo nút <button class="vd-btt">).

   Tránh đè cụm nút liên hệ (contact-btn.php, .contact-buttons-floating):
   - Máy tính: cụm nút liên hệ nằm bên TRÁI -> nút này nằm góc PHẢI dưới.
   - Mobile: cụm nút liên hệ là thanh ngang ở đáy màn hình -> JS đo chiều cao
     thanh đó và đẩy nút lên phía trên qua biến --vd-btt-lift. */

.vd-btt {
	--vd-btt-gap: 24px;
	--vd-btt-lift: 0px;
	position: fixed;
	right: var(--vd-btt-gap);
	bottom: calc(var(--vd-btt-gap) + var(--vd-btt-lift));
	z-index: 9990; /* thấp hơn cụm nút liên hệ (9999) */
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #04BA71;
	color: #fff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s, background-color .2s ease, bottom .2s ease;
}
.vd-btt.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}
.vd-btt:hover { background: #09A956; }
.vd-btt:focus-visible { outline: 3px solid rgba(4, 186, 113, .4); outline-offset: 3px; }
.vd-btt svg { width: 22px; height: 22px; display: block; }

@media (max-width: 767px) {
	.vd-btt {
		--vd-btt-gap: 12px;
		width: 42px;
		height: 42px;
	}
	.vd-btt svg { width: 20px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
	.vd-btt { transition: none; }
}
