.swa-widget {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 9999;
  isolation: isolate;
}

.swa-btn {
  position: relative;
  z-index: 1;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(145deg, #2EE071 0%, #25D366 55%, #1EBE5A 100%);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(37, 211, 102, 0.35);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Two staggered ripples expanding continuously behind the button */
.swa-btn::before,
.swa-btn::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  content: "";
  animation: swa-ripple 2s ease-out infinite;
}

.swa-btn::after {
  animation-delay: 1s;
}

.swa-btn-icon {
  display: block;
  width: 30px;
  height: 30px;
}

.swa-btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
  .swa-btn {
    transition: transform 160ms ease, box-shadow 160ms ease;
  }

  .swa-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4), 0 3px 10px rgba(37, 211, 102, 0.5);
  }
}

@media (max-width: 768px) {
  .swa-widget {
    left: 14px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .swa-btn {
    width: 52px;
    height: 52px;
  }

  .swa-btn-icon {
    width: 27px;
    height: 27px;
  }
}

@keyframes swa-ripple {
  0% {
    opacity: 0.6;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.8);
  }
}

@media (prefers-reduced-motion: reduce) {
  .swa-btn::before,
  .swa-btn::after {
    animation: none;
  }

  .swa-btn {
    transition: none;
  }
}
