/* Compact floating conversion actions, positioned clear of the mobile dock. */
.floating-contact {
  position: fixed;
  z-index: 18;
  left: 18px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.floating-action,
.back-to-top {
  position: relative;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(17, 29, 35, .2);
  cursor: pointer;
}

.floating-action .icon,
.back-to-top .icon { width: 21px; height: 21px; }
.floating-action-register { background: var(--gold); color: #332200; }
.floating-action-phone { background: var(--blue); }
.floating-action-zalo { background: #0068ff; }
.floating-action-zalo span { font-size: 10px; font-weight: 800; letter-spacing: -.03em; }
.floating-action-facebook { background: #1877f2; }

.floating-action::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 9px);
  top: 50%;
  padding: 6px 9px;
  border-radius: 7px;
  background: var(--blue-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-5px, -50%);
  transition: opacity 160ms ease, transform 160ms ease;
}

.floating-action:hover::after,
.floating-action:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.floating-action:focus-visible,
.back-to-top:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.back-to-top {
  position: fixed;
  z-index: 18;
  right: 18px;
  bottom: 22px;
  border-color: rgba(59, 85, 95, .28);
  background: #fff;
  color: var(--blue);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease, background-color 180ms ease;
}

.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.back-to-top:hover { background: var(--blue-soft); }

@media (max-width: 900px) {
  .floating-contact { left: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); gap: 6px; }
  .floating-action,
  .back-to-top { width: 44px; height: 44px; }
  .floating-action .icon,
  .back-to-top .icon { width: 19px; height: 19px; }
  .floating-action::after { display: none; }
  .back-to-top { right: 10px; bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .floating-action::after,
  .back-to-top { transition: none; }
}
