/* Floating contact widgets moved from systems.google_analytic. */

/* Icon Zalo cố định */
.zalo-float {
  position: fixed;
  right: 20px;
  bottom: 20px; /* chỉnh nếu bị đè icon khác */
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0068ff;

  display: flex;
  align-items: center;
  justify-content: center;

  z-index: 9999;
  cursor: pointer;

  box-shadow: 0 8px 20px rgba(0, 104, 255, 0.35);
  animation: zalo-pulse 1.6s infinite;
}

/* Icon bên trong */
.zalo-float img {
  width: 30px;
  height: 30px;
}

/* Hover nhẹ */
.zalo-float:hover {
  transform: scale(1.08);
  animation-play-state: paused;
}

/* Hiệu ứng nhấp nháy */
@keyframes zalo-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 104, 255, 0.6);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(0, 104, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 104, 255, 0);
  }
}


.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: 100px;
  z-index: 9999;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 56px;
  height: 56px;

  color: #ffffff !important;
  background: #25d366;
  border-radius: 50%;
  text-decoration: none !important;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);

  isolation: isolate;
  overflow: visible;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.whatsapp-float::before,
.whatsapp-float::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.whatsapp-float::before {
  z-index: -1;
  background: rgba(37, 211, 102, 0.45);
  animation: whatsapp-pulse 1.6s infinite;
}

.whatsapp-float::after {
  z-index: -2;
  border: 2px solid rgba(37, 211, 102, 0.55);
  animation: whatsapp-ring 1.6s infinite;
}

.whatsapp-float:hover {
  color: #ffffff !important;
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.whatsapp-float__icon {
  display: block;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

@keyframes whatsapp-pulse {
  0% {
    transform: scale(1);
    opacity: 0.75;
  }

  70%,
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

@keyframes whatsapp-ring {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }

  70%,
  100% {
    transform: scale(2.1);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .whatsapp-float {
    right: 16px;
    bottom: 80px;
    width: 52px;
    height: 52px;
  }

  .whatsapp-float__icon {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-float::before,
  .whatsapp-float::after {
    animation: none;
  }
}
