/* =========================================
   GLOBAL
   ========================================= */

.wrrg-button,
.wrrg-floating-button {
  font-family: inherit;
}

/* =========================================
   INLINE BUTTON
   ========================================= */

.wrrg-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

/* pill style default */
.wrrg-button--pill {
  padding: 10px 16px;
  border-radius: 999px;
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.25);
  font-size: 14px;
  line-height: 1.2;
  font-weight: 500;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
}

.wrrg-button--pill:hover,
.wrrg-button--pill:focus {
  background: #1ebe5b;
  box-shadow: 0 6px 14px rgba(37, 211, 102, 0.35);
  transform: translateY(-1px);
}

.wrrg-button--pill:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.25);
}

/* icon + label */
.wrrg-button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #ffffff;
}

.wrrg-button-icon img {
  display: block;
  width: 16px;
  height: 16px;
}

.wrrg-button-label {
  white-space: nowrap;
}

/* =========================================
   FLOATING BUTTON (BULAT + PULSE)
   ========================================= */

.wrrg-floating {
  position: fixed;
  bottom: 22px;
  z-index: 9999;
  pointer-events: none; /* hanya button yang menerima klik */
}

.wrrg-floating-right {
  right: 18px;
}

.wrrg-floating-left {
  left: 18px;
}

.wrrg-floating-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  pointer-events: auto;
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
}

/* icon bulat */
.wrrg-floating-icon-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 6px 20px rgba(15, 23, 42, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.35);
  overflow: visible;
  z-index: 2;
}

.wrrg-floating-icon-img {
  display: block;
  width: 28px;
  height: 28px;
}

/* pulse / kedip */
.wrrg-floating-pulse {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.45);
  animation: wrrg-floating-pulse 1.6s ease-out infinite;
  transform-origin: center;
  z-index: 1;
  pointer-events: none;
}

@keyframes wrrg-floating-pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.7;
  }
  70% {
    transform: scale(1.4);
    opacity: 0;
  }
  100% {
    transform: scale(1.4);
    opacity: 0;
  }
}

/* label di samping icon (theme full/minimal).
   Untuk theme "bubble" label bisa disembunyikan via class. */
.wrrg-floating-label {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: #111827;
  color: #f9fafb;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.35);
  max-width: 220px;
  line-height: 1.2;
}

/* jika theme bubble: hanya bulatan saja (tanpa label) */
.wrrg-theme-bubble .wrrg-floating-label {
  display: none;
}

/* theme minimal: label putih, border abu */
.wrrg-theme-minimal .wrrg-floating-label {
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
}

/* responsive: di layar <480, label disembunyikan supaya tidak makan tempat */
@media (max-width: 480px) {
  .wrrg-floating-label {
    display: none;
  }

  .wrrg-floating-right {
    right: 14px;
  }

  .wrrg-floating-left {
    left: 14px;
  }

  .wrrg-floating {
    bottom: 18px;
  }
}

/* =========================================
   LOADING OVERLAY (optional)
   ========================================= */

.wrrg-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f9fafb;
  font-size: 14px;
  text-align: center;
}

.wrrg-loading-box {
  padding: 18px 22px;
  border-radius: 12px;
  background: #111827;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  max-width: 260px;
}

.wrrg-loading-spinner {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 3px solid rgba(249, 250, 251, 0.25);
  border-top-color: #25d366;
  margin: 0 auto 10px;
  animation: wrrg-spin 0.8s linear infinite;
}

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

/* hide helper */
.wrrg-hidden {
  display: none !important;
}