/* =============================================
   PREMIUM WHATSAPP WIDGET - Konsultan Pajak Cimahi
   ============================================= */
.wa-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99999;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ===== FLOATING ACTION BUTTON ===== */
.wa-fab {
  position: relative;
  width: 66px;
  height: 66px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  box-shadow: 0 18px 40px rgba(18, 140, 126, .42), 0 4px 12px rgba(0, 0, 0, .18);
  transition: transform .35s cubic-bezier(.16, 1, .3, 1), box-shadow .35s ease;
  animation: wa-pulse 2.4s infinite;
}
.wa-fab:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 22px 50px rgba(18, 140, 126, .55), 0 6px 16px rgba(0, 0, 0, .2);
}
.wa-fab svg { width: 32px; height: 32px; }

@keyframes wa-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, .55), 0 18px 40px rgba(18, 140, 126, .42); }
  70%  { box-shadow: 0 0 0 22px rgba(37, 211, 102, 0), 0 18px 40px rgba(18, 140, 126, .42); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0), 0 18px 40px rgba(18, 140, 126, .42); }
}

/* Unread badge */
.wa-fab__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: #f9961e;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(249, 150, 30, .5);
}
.wa-fab__badge.is-hidden { display: none; }

/* Tooltip */
.wa-fab__tooltip {
  position: absolute;
  right: 78px;
  bottom: 14px;
  white-space: nowrap;
  background: #0b1220;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 14px;
  border-radius: 12px;
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.wa-fab__tooltip::after {
  content: "";
  position: absolute;
  right: -6px;
  bottom: 12px;
  border: 6px solid transparent;
  border-left-color: #0b1220;
  border-right: 0;
}
.wa-fab:hover .wa-fab__tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* ===== POPUP CHAT CARD ===== */
.wa-popup {
  position: absolute;
  right: 0;
  bottom: 84px;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(8, 18, 32, .35), 0 8px 24px rgba(0, 0, 0, .18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px) scale(.96);
  transform-origin: bottom right;
  transition: opacity .35s cubic-bezier(.16, 1, .3, 1),
              transform .35s cubic-bezier(.16, 1, .3, 1),
              visibility .35s;
}
.wa-popup.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Header */
.wa-popup__header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 18px 18px 16px;
  background: linear-gradient(135deg, #0b1220 0%, #16243b 60%, #1d3a5f 100%);
  color: #fff;
}
.wa-popup__header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, #f9961e, #25d366);
}
.wa-popup__avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .1);
}
.wa-popup__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wa-popup__id {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
  min-width: 0;
}
.wa-popup__name {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: .2px;
}
.wa-popup__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, .8);
}
.wa-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, .25);
}
.wa-popup__close {
  margin-left: auto;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background .25s ease, transform .25s ease;
}
.wa-popup__close:hover {
  background: rgba(255, 255, 255, .25);
  transform: rotate(90deg);
}

/* Body */
.wa-popup__body {
  padding: 18px 18px 8px;
  background: linear-gradient(180deg, #f4f7fb 0%, #eef2f7 100%);
}
.wa-msg {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.wa-msg__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex: 0 0 auto;
}
.wa-bubble {
  position: relative;
  background: #fff;
  border-radius: 4px 16px 16px 16px;
  padding: 13px 15px;
  max-width: 250px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
}
.wa-bubble::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0;
  border: 7px solid transparent;
  border-top-color: #fff;
  border-right: 0;
}
.wa-bubble p {
  margin: 0 0 6px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #1f2937;
}
.wa-bubble p:last-of-type { margin-bottom: 0; }
.wa-bubble__time {
  display: block;
  margin-top: 6px;
  font-size: 10.5px;
  color: #9ca3af;
  text-align: right;
}

/* Quick replies */
.wa-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.wa-chip {
  border: 1px solid #d7dee8;
  background: #fff;
  color: #1f2937;
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 13px;
  border-radius: 20px;
  cursor: pointer;
  transition: all .25s ease;
}
.wa-chip:hover {
  border-color: #25d366;
  color: #128c7e;
  background: #f0fbf5;
  transform: translateY(-1px);
}

/* CTA */
.wa-popup__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px 18px 18px;
  padding: 15px;
  border-radius: 16px;
  text-decoration: none;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  box-shadow: 0 14px 30px rgba(18, 140, 126, .4);
  transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s ease;
}
.wa-popup__cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(18, 140, 126, .55);
}
.wa-popup__cta svg { width: 22px; height: 22px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .wa-widget { right: 16px; bottom: 16px; }
  .wa-popup { width: 320px; }
  .wa-fab__tooltip { display: none; }
}
