.contact-floating {
  position: fixed;
  left: 24px;
  bottom: 28px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  pointer-events: none;
}

.contact-floating__item {
  --contact-rgb: 47, 130, 255;
  position: relative;
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  pointer-events: auto;
  text-decoration: none;
  transform: translateZ(0);
  transition: transform 0.25s ease, filter 0.25s ease;
  isolation: isolate;
}

.contact-floating__item::before,
.contact-floating__item::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}

.contact-floating__item::before {
  inset: 5px;
  background: rgba(var(--contact-rgb), 0.24);
  animation: contact-floating-pulse 1.9s ease-out infinite;
}

.contact-floating__item::after {
  inset: -2px;
  background: rgba(var(--contact-rgb), 0.18);
  filter: blur(10px);
}

.contact-floating__item:hover {
  filter: saturate(1.08);
  transform: translateY(-2px) scale(1.04);
}

.contact-floating__item:active {
  transform: translateY(0) scale(0.97);
}

.contact-floating__item:focus-visible {
  outline: 3px solid rgba(var(--contact-rgb), 0.38);
  outline-offset: 4px;
}

.contact-floating__icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 22px rgba(var(--contact-rgb), 0.28);
}

.contact-floating__icon img {
  width: 30px;
  height: 30px;
  display: block;
  object-fit: contain;
}

.contact-floating__item--zalo {
  --contact-rgb: 47, 130, 255;
}

.contact-floating__item--zalo .contact-floating__icon {
  background: #fff;
  border: 6px solid #3b82f6;
}

.contact-floating__item--zalo .contact-floating__icon img {
  width: 30px;
  height: 30px;
}

.contact-floating__item--wechat {
  --contact-rgb: 19, 174, 103;
}

.contact-floating__item--wechat .contact-floating__icon {
  background: #fff;
  border: 6px solid #13ae67;
}

.contact-floating__item--wechat .contact-floating__icon img {
  width: 32px;
  height: 32px;
}

.contact-floating__item--hotline {
  --contact-rgb: 231, 36, 42;
}

.contact-floating__item--hotline::before {
  animation-name: contact-floating-hotline-pulse;
}

.contact-floating__item--hotline .contact-floating__icon {
  width: 52px;
  height: 52px;
  background: #e7242a;
  box-shadow: 0 10px 24px rgba(231, 36, 42, 0.34);
  animation: contact-floating-ring 1.35s ease-in-out infinite;
}

.contact-floating__item--hotline .contact-floating__icon img {
  width: 25px;
  height: 25px;
}

body.contact-modal-open {
  overflow: hidden;
}

.wechat-qr-modal[hidden] {
  display: none;
}

.wechat-qr-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.wechat-qr-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(5px);
}

.wechat-qr-modal__dialog {
  position: relative;
  width: min(420px, 100%);
  max-height: calc(100dvh - 40px);
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  transform: translateZ(0);
}

.wechat-qr-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(26, 28, 30, 0.82);
  color: #fff;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.wechat-qr-modal__close:hover {
  background: #1a1c1e;
  transform: scale(1.05);
}

.wechat-qr-modal__close:focus-visible {
  outline: 3px solid rgba(19, 174, 103, 0.36);
  outline-offset: 3px;
}

.wechat-qr-modal__image {
  width: 100%;
  max-height: calc(100dvh - 64px);
  display: block;
  border-radius: 6px;
  object-fit: contain;
}

.wechat-qr-modal__sr-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes contact-floating-pulse {
  0% {
    opacity: 0.86;
    transform: scale(0.9);
  }
  78%,
  100% {
    opacity: 0;
    transform: scale(1.72);
  }
}

@keyframes contact-floating-hotline-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(231, 36, 42, 0.58);
    opacity: 0.9;
    transform: scale(0.9);
  }
  80%,
  100% {
    box-shadow: 0 0 0 20px rgba(231, 36, 42, 0);
    opacity: 0;
    transform: scale(1.42);
  }
}

@keyframes contact-floating-ring {
  0%,
  100% {
    transform: rotate(0deg);
  }
  12% {
    transform: rotate(-13deg);
  }
  24% {
    transform: rotate(13deg);
  }
  36% {
    transform: rotate(-8deg);
  }
  48% {
    transform: rotate(8deg);
  }
  60% {
    transform: rotate(0deg);
  }
}

@media (max-width: 768px) {
  .contact-floating {
    left: 16px;
    bottom: 18px;
    gap: 10px;
  }

  .contact-floating__item {
    width: 52px;
    height: 52px;
  }

  .contact-floating__icon {
    width: 40px;
    height: 40px;
  }

  .contact-floating__item--hotline .contact-floating__icon {
    width: 46px;
    height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .contact-floating__item::before,
  .contact-floating__item--hotline .contact-floating__icon {
    animation: none;
  }
}
