/* WhatsFlow global UI — button spinner + success burst */

:root {
  --wf-spinner-color: #25d366;
  --wf-spinner-track: rgba(37, 211, 102, 0.25);
}

/* Button loading state */
.wf-btn-loading {
  position: relative !important;
  pointer-events: none !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}
.wf-btn-loading > *:not(.wf-spinner) {
  visibility: hidden !important;
}

.wf-spinner {
  display: none;
  box-sizing: border-box;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 3px solid var(--wf-spinner-track);
  border-top-color: var(--wf-spinner-color);
  border-radius: 50%;
  animation: wf-spin 0.65s linear infinite;
  visibility: visible !important;
  z-index: 5;
  pointer-events: none;
}
.wf-btn-loading > .wf-spinner {
  display: block !important;
}

.btn-primary.wf-btn-loading,
.btn-success.wf-btn-loading,
.btn-danger.wf-btn-loading,
button.btn-primary.wf-btn-loading {
  --wf-spinner-track: rgba(255, 255, 255, 0.35);
  --wf-spinner-color: #fff;
}

@keyframes wf-spin {
  to { transform: rotate(360deg); }
}

/* Center success circle — grow then redirect */
.wf-burst {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.wf-burst__circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7dffb0, #25d366 45%, #128c7e 100%);
  box-shadow: 0 0 40px rgba(37, 211, 102, 0.55);
  transform: scale(0.2);
  opacity: 0.95;
  animation: wf-burst-grow 1.1s cubic-bezier(0.22, 0.82, 0.28, 1) forwards;
}
.wf-burst__check {
  position: absolute;
  width: 52px;
  height: 52px;
  color: #fff;
  opacity: 0;
  transform: scale(0.6);
  animation: wf-burst-check 0.35s ease 0.15s forwards;
  z-index: 1;
}
.wf-burst__check svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

@keyframes wf-burst-grow {
  0% {
    transform: scale(0.15);
    opacity: 0.9;
  }
  100% {
    transform: scale(45);
    opacity: 1;
  }
}

@keyframes wf-burst-check {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .wf-spinner,
  .wf-burst__circle,
  .wf-burst__check {
    animation-duration: 0.01ms !important;
  }
}
