/* Floating contact — 2 bubble icons + purchase hint */
.ntpanel-floating-contact {
	--ntp-fc-ink: var(--ntpanel-ink, #242828);
	--ntp-fc-line: var(--ntpanel-line, #e3e8eb);
	--ntp-fc-yellow: var(--ntpanel-yellow, #ffb610);
	--ntp-fc-offset: 96px;
	position: fixed;
	right: max(14px, env(safe-area-inset-right, 0px));
	bottom: calc(max(18px, env(safe-area-inset-bottom, 0px)) + var(--ntp-fc-offset));
	z-index: 9990;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	font-family: var(--ntpanel-font-family, "Mulish", system-ui, sans-serif);
	pointer-events: none;
}

.ntpanel-floating-contact *,
.ntpanel-floating-contact *::before,
.ntpanel-floating-contact *::after {
	box-sizing: border-box;
}

.ntpanel-floating-contact__bubbles {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
}

.ntpanel-floating-contact__bubble {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border: 0;
	border-radius: 50%;
	color: #fff;
	text-decoration: none;
	box-shadow: 0 10px 24px rgba(36, 40, 40, 0.18);
	pointer-events: auto;
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.ntpanel-floating-contact__bubble:hover,
.ntpanel-floating-contact__bubble:focus-visible {
	transform: translateY(-2px) scale(1.04);
	box-shadow: 0 14px 28px rgba(36, 40, 40, 0.22);
}

.ntpanel-floating-contact__bubble:focus-visible {
	outline: 2px solid var(--ntp-fc-yellow);
	outline-offset: 3px;
}

.ntpanel-floating-contact__bubble--zalo {
	background: #0068ff;
}

.ntpanel-floating-contact__bubble--zalo:hover,
.ntpanel-floating-contact__bubble--zalo:focus-visible {
	background: #0056d6;
}

.ntpanel-floating-contact__bubble--phone {
	background: var(--ntp-fc-yellow);
	color: var(--ntp-fc-ink);
}

.ntpanel-floating-contact__bubble--phone:hover,
.ntpanel-floating-contact__bubble--phone:focus-visible {
	background: #e5a40e;
	color: var(--ntp-fc-ink);
}

.ntpanel-floating-contact__bubble--phone::after {
	content: "";
	position: absolute;
	inset: -4px;
	border: 2px solid rgba(255, 182, 16, 0.45);
	border-radius: 50%;
	animation: ntpanel-fc-ring 2.6s ease-out infinite;
	pointer-events: none;
}

.ntpanel-floating-contact__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 1.35rem;
	line-height: 1;
}

.ntpanel-floating-contact__tag {
	position: absolute;
	right: calc(100% + 10px);
	top: 50%;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
	padding: 7px 12px;
	border: 1px solid var(--ntp-fc-line);
	border-radius: 4px;
	background: #fff;
	color: var(--ntp-fc-ink);
	font-size: 0.78rem;
	font-weight: 800;
	line-height: 1.15;
	white-space: nowrap;
	box-shadow: 0 8px 20px rgba(36, 40, 40, 0.1);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-50%) translateX(6px);
	transition:
		opacity 0.18s ease,
		transform 0.18s ease,
		visibility 0.18s;
	pointer-events: none;
}

.ntpanel-floating-contact__tag-label {
	font-weight: 800;
}

.ntpanel-floating-contact__tag-phone {
	font-size: 0.72rem;
	font-weight: 700;
	color: #657078;
	letter-spacing: 0.01em;
}

.ntpanel-floating-contact:not([data-hint-dismissed="1"]) .ntpanel-floating-contact__tag {
	transition:
		opacity 0.35s ease,
		transform 0.35s ease,
		visibility 0.35s ease;
}

.ntpanel-floating-contact[data-hint-visible="1"]:not([data-hint-dismissed="1"]) .ntpanel-floating-contact__tag {
	opacity: 1;
	visibility: visible;
	transform: translateY(-50%) translateX(0);
}

.ntpanel-floating-contact[data-hint-dismissed="1"] .ntpanel-floating-contact__tag {
	animation: none;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-50%) translateX(6px);
}

.ntpanel-floating-contact[data-hint-dismissed="1"] .ntpanel-floating-contact__bubble:hover .ntpanel-floating-contact__tag,
.ntpanel-floating-contact[data-hint-dismissed="1"] .ntpanel-floating-contact__bubble:focus-visible .ntpanel-floating-contact__tag {
	opacity: 1;
	visibility: visible;
	transform: translateY(-50%) translateX(0);
}

.ntpanel-floating-contact__tag::after {
	content: "";
	position: absolute;
	top: 50%;
	right: -5px;
	width: 8px;
	height: 8px;
	border-top: 1px solid var(--ntp-fc-line);
	border-right: 1px solid var(--ntp-fc-line);
	background: #fff;
	transform: translateY(-50%) rotate(45deg);
}

.ntpanel-floating-contact__bubble:hover .ntpanel-floating-contact__tag,
.ntpanel-floating-contact__bubble:focus-visible .ntpanel-floating-contact__tag {
	opacity: 1;
	visibility: visible;
	transform: translateY(-50%) translateX(0);
}

.ntpanel-floating-contact__hint {
	position: relative;
	max-width: min(248px, calc(100vw - 28px));
	padding: 12px 34px 12px 14px;
	border: 1px solid var(--ntp-fc-line);
	border-left: 3px solid var(--ntp-fc-yellow);
	border-radius: 0.4rem;
	background: #fff;
	box-shadow: 0 14px 30px rgba(36, 40, 40, 0.12);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	pointer-events: none;
	transition:
		opacity 0.35s ease,
		transform 0.35s ease,
		visibility 0.35s ease;
}

.ntpanel-floating-contact[data-hint-visible="1"]:not([data-hint-dismissed="1"]) .ntpanel-floating-contact__hint {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

.ntpanel-floating-contact[data-hint-dismissed="1"] .ntpanel-floating-contact__hint {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateY(8px);
}

.ntpanel-floating-contact__hint-text {
	margin: 0;
	color: var(--ntp-fc-ink);
	font-size: 0.78rem;
	font-weight: 500;
	line-height: 1.45;
}

.ntpanel-floating-contact__hint-text strong {
	font-weight: 800;
}

.ntpanel-floating-contact__hint-close {
	position: absolute;
	top: 8px;
	right: 8px;
	display: inline-flex;
	width: 22px;
	height: 22px;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f2f2f5;
	color: #657078;
	font-size: 0.65rem;
	cursor: pointer;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.ntpanel-floating-contact__hint-close:hover,
.ntpanel-floating-contact__hint-close:focus-visible {
	background: var(--ntp-fc-yellow);
	color: var(--ntp-fc-ink);
}

.ntpanel-floating-contact__hint-close:focus-visible {
	outline: 2px solid var(--ntp-fc-yellow);
	outline-offset: 2px;
}

/* Keep above legacy back-to-top button */
body:has(.ntpanel-floating-contact) #back-to-top.floating-action-button {
	right: max(14px, env(safe-area-inset-right, 0px)) !important;
	bottom: max(14px, env(safe-area-inset-bottom, 0px)) !important;
	z-index: 9985;
}

/* Product mobile sticky bar — lift bubbles above purchase/contact row */
@media (max-width: 767.98px) {
	.ntpanel-restored-single .ntpanel-floating-contact {
		--ntp-fc-offset: 158px;
	}
}

@keyframes ntpanel-fc-ring {
	0% {
		transform: scale(0.94);
		opacity: 0.7;
	}

	75%,
	100% {
		transform: scale(1.18);
		opacity: 0;
	}
}

@media (min-width: 768px) {
	.ntpanel-floating-contact {
		--ntp-fc-offset: 104px;
		right: max(22px, env(safe-area-inset-right, 0px));
		bottom: calc(max(24px, env(safe-area-inset-bottom, 0px)) + var(--ntp-fc-offset));
	}

	.ntpanel-floating-contact__bubble {
		width: 58px;
		height: 58px;
	}

	.ntpanel-floating-contact__hint {
		max-width: 260px;
	}

	body:has(.ntpanel-floating-contact) #back-to-top.floating-action-button {
		right: max(22px, env(safe-area-inset-right, 0px)) !important;
		bottom: max(18px, env(safe-area-inset-bottom, 0px)) !important;
	}
}

@media (max-width: 575.98px) {
	.ntpanel-floating-contact {
		--ntp-fc-offset: 92px;
	}

	.ntpanel-floating-contact__bubble {
		width: 52px;
		height: 52px;
	}

	.ntpanel-floating-contact__icon {
		font-size: 1.2rem;
	}

	.ntpanel-floating-contact__tag {
		opacity: 0;
		visibility: hidden;
	}

	.ntpanel-floating-contact__bubble:hover .ntpanel-floating-contact__tag,
	.ntpanel-floating-contact__bubble:focus-visible .ntpanel-floating-contact__tag {
		opacity: 1;
		visibility: visible;
		transform: translateY(-50%) translateX(0);
		font-size: 0.72rem;
		padding: 6px 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ntpanel-floating-contact__bubble,
	.ntpanel-floating-contact__tag,
	.ntpanel-floating-contact__hint {
		transition: none;
	}

	.ntpanel-floating-contact__bubble--phone::after {
		animation: none;
		display: none;
	}
}
