/* Floating contact buttons: Messenger, Zalo and phone. */
.duy-contact-wrap {
  position: fixed;
  right: var(--duy-contact-right, 18px);
  bottom: calc(var(--duy-contact-bottom, 34px) + env(safe-area-inset-bottom));
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--duy-contact-gap, 10px);
  width: var(--duy-contact-size, 48px);
  visibility: visible;
  opacity: 1;
  transition:
    opacity 180ms ease,
    visibility 180ms ease;
}

.duy-contact-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--duy-contact-size, 48px);
  height: var(--duy-contact-size, 48px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow:
    0 4px 13px rgb(0 0 0 / 18%),
    0 1px 3px rgb(0 0 0 / 12%);
  transform: translateZ(0);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.duy-contact-button:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px) scale(1.06);
  box-shadow:
    0 7px 18px rgb(0 0 0 / 22%),
    0 2px 5px rgb(0 0 0 / 13%);
}

.duy-contact-button:active {
  transform: scale(0.96);
}

.duy-contact-button:focus-visible {
  outline: 3px solid #111;
  outline-offset: 3px;
}

.duy-contact-button img {
  display: block;
  width: 56%;
  height: 56%;
  margin: 0;
  object-fit: contain;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.duy-contact-button.is-messenger {
  background: #168aff;
}

.duy-contact-button.is-messenger img {
  width: 58%;
  height: 58%;
}

.duy-contact-button.is-zalo {
  background: #0068ff;
}

.duy-contact-button.is-zalo img {
  width: 62%;
  height: 62%;
}

.duy-contact-button.is-phone {
  background: #56b92d;
}

.duy-contact-button.is-phone img {
  width: 52%;
  height: 52%;
}

.duy-contact-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 849px) {
  .duy-contact-wrap {
    right: max(14px, var(--duy-contact-right, 28px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .duy-contact-button,
  .duy-contact-wrap {
    transition: none;
  }
}
