.floating-actions {
  position: fixed;
  z-index: 90;
  right: clamp(18px, 2.4vw, 36px);
  bottom: max(clamp(18px, 2.4vw, 34px), env(safe-area-inset-bottom));
  --floating-action-size: 42px;
  display: grid;
  grid-template-columns: repeat(5, var(--floating-action-size));
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(183, 149, 82, .42);
  border-radius: 8px;
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 13px 30px rgba(77, 51, 12, .12), inset 0 1px 0 rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(16px) saturate(1.12);
  backdrop-filter: blur(16px) saturate(1.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px) scale(.92);
  transition:
    opacity .34s ease,
    visibility .34s ease,
    transform .42s cubic-bezier(.22, 1, .36, 1);
}

.floating-actions.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.contact-dock {
  display: contents;
}

.contact-dock-link,
.back-to-top {
  position: relative;
  width: var(--floating-action-size);
  height: var(--floating-action-size);
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(183, 149, 82, .55);
  border-radius: 6px;
}

.contact-dock-link {
  color: #9c6b20;
  background: rgba(255, 255, 255, .72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .88);
  transition: color .25s ease, background-color .25s ease, border-color .25s ease, transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease;
}

.back-to-top {
  color: #fffdf8;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 242, 196, .34), transparent 31%),
    linear-gradient(145deg, #ddb65b, #9c6b20 58%, #c99637);
  box-shadow: 0 9px 19px rgba(77, 51, 12, .2), inset 0 1px 0 rgba(255, 255, 255, .36);
  cursor: pointer;
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), box-shadow .3s ease, filter .3s ease;
}

.contact-dock-link:hover,
.contact-dock-link:focus-visible {
  color: #fffdf8;
  border-color: rgba(244, 216, 146, .88);
  background: linear-gradient(145deg, #ddb65b, #9c6b20 58%, #c99637);
  box-shadow: 0 9px 19px rgba(77, 51, 12, .18), inset 0 1px 0 rgba(255, 255, 255, .34);
  transform: translateY(-3px);
  outline: none;
}

.contact-dock-link:active { transform: translateY(-1px) scale(.97); }

.social-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  line-height: 1;
}

.social-icon-facebook {
  font-family: Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.social-icon-zalo {
  width: auto;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: -.04em;
}

.social-icon-youtube {
  width: 19px;
  height: 14px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
}

.social-icon-youtube::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 0;
  height: 0;
  border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent;
  border-left: 5px solid currentColor;
}

.social-icon-email {
  width: 19px;
  height: 14px;
  overflow: hidden;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.social-icon-email::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 3px;
  width: 10px;
  height: 10px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.back-to-top::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255, 249, 227, .2);
  border-radius: 3px;
  pointer-events: none;
}

.back-to-top > span {
  position: relative;
  width: 17px;
  height: 20px;
  display: block;
}

.back-to-top > span::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 2px;
  width: 10px;
  height: 10px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  transform: translateX(-50%) rotate(45deg);
}

.back-to-top > span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 3px;
  width: 1.5px;
  height: 16px;
  border-radius: 999px;
  background: currentColor;
  transform: translateX(-50%);
}

.back-to-top:is(:hover, :focus-visible) {
  filter: brightness(1.07);
  box-shadow: 0 17px 34px rgba(77, 51, 12, .27), inset 0 1px 0 rgba(255, 255, 255, .45);
  transform: translateY(-3px) scale(1.02);
  outline: none;
}

.back-to-top:active {
  transform: translateY(-1px) scale(.98);
}

@media (max-width: 620px) {
  .floating-actions {
    right: 16px;
    bottom: max(16px, env(safe-area-inset-bottom));
    --floating-action-size: 39px;
    gap: 4px;
    padding: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-actions,
  .back-to-top,
  .contact-dock-link { transition: opacity .2s ease, visibility .2s ease; }
}

@media (prefers-reduced-transparency: reduce) {
  .floating-actions {
    background: #fffdf8;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
