/* whatsapp-widget.css — floating JoinChat-style WhatsApp button */

.wa-widget {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .75rem;
}

/* ── Main button ── */
.wa-widget__btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, .4);
  transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s;
  position: relative;
  flex-shrink: 0;
  animation: wa-btn-in .5s cubic-bezier(.16,1,.3,1) .3s both;
}

@keyframes wa-btn-in {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.wa-widget__btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, .6);
}

.wa-widget__btn svg {
  width: 30px;
  height: 30px;
  color: #fff;
}

/* ── Badge ── */
.wa-widget__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  background: #ef4444;
  border-radius: 50%;
  font-size: .65rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  transition: transform .2s cubic-bezier(.16,1,.3,1), opacity .15s;
}

.wa-widget__badge.is-hidden {
  transform: scale(0);
  opacity: 0;
  pointer-events: none;
}

/* ── Popup card ── */
.wa-widget__popup {
  width: 300px;
  background: #f0f0f0;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .2);
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(.88) translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: transform .28s cubic-bezier(.16,1,.3,1), opacity .2s;
}

.wa-widget__popup.is-open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ── Header ── */
.wa-widget__header {
  background: #25D366;
  padding: .875rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wa-widget__brand {
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: -.3px;
}

.wa-widget__close {
  background: rgba(0,0,0,.18);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
  flex-shrink: 0;
}

.wa-widget__close:hover {
  background: rgba(0,0,0,.3);
}

/* ── Body (bubbles area) ── */
.wa-widget__body {
  padding: 1.125rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.wa-widget__bubble {
  background: #fff;
  border-radius: 4px 14px 14px 14px;
  padding: .7rem 1rem;
  font-size: .875rem;
  line-height: 1.45;
  color: #111;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  position: relative;
  align-self: flex-start;
  max-width: 94%;
  opacity: 0;
  transform: translateY(10px);
}

.wa-widget__popup.is-open .wa-widget__bubble {
  animation: wa-bubble-in .38s cubic-bezier(.16,1,.3,1) forwards;
}

.wa-widget__popup.is-open .wa-widget__bubble:nth-child(1) {
  animation-delay: .12s;
}
.wa-widget__popup.is-open .wa-widget__bubble:nth-child(2) {
  animation-delay: .3s;
}

@keyframes wa-bubble-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── CTA button ── */
.wa-widget__start {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin: 0 1rem 1rem;
  padding: .8rem 1.25rem;
  background: #25D366;
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  border-radius: 50px;
  transition: background .15s, transform .15s;
}

.wa-widget__start:hover {
  background: #1db954;
  color: #fff;
  transform: translateY(-1px);
}

.wa-widget__start svg {
  flex-shrink: 0;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .wa-widget {
    bottom: 1rem;
    right: 1rem;
  }

  .wa-widget__popup {
    width: calc(100vw - 2rem);
    max-width: 300px;
  }
}
