/* ========================================================
   Floating WhatsApp Widget - Ultra Premium & "Greget"
   SIM Prima - High-Converting Consultation Widget
   ======================================================== */

.wa-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  font-family: var(--sans, 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  pointer-events: none; /* children enable pointer events */
}

/* Tooltip / Speech Bubble */
.wa-bubble {
  pointer-events: auto;
  position: relative;
  max-width: 290px;
  background: #ffffff;
  color: #10294e;
  padding: 13px 15px 12px;
  border-radius: 14px;
  box-shadow: 0 14px 38px rgba(16, 41, 78, 0.16), 0 3px 10px rgba(0, 0, 0, 0.06);
  border: 1px solid #e1e9f0;
  transform-origin: bottom right;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: waSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.wa-bubble.is-hidden {
  opacity: 0;
  transform: translateY(10px) scale(0.92);
  pointer-events: none;
  visibility: hidden;
}

.wa-bubble::after {
  content: '';
  position: absolute;
  bottom: -7px;
  right: 22px;
  width: 13px;
  height: 13px;
  background: #ffffff;
  border-right: 1px solid #e1e9f0;
  border-bottom: 1px solid #e1e9f0;
  transform: rotate(45deg);
}

.wa-bubble-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: transparent;
  border: 0;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1;
  padding: 3px 5px;
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s ease, background 0.15s ease;
}
.wa-bubble-close:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.wa-bubble-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}

.wa-bubble-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: waPulseGreen 1.8s infinite;
}

.wa-bubble-status {
  font-size: 11px;
  font-weight: 700;
  color: #166534;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.wa-bubble-msg {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: #334155;
  cursor: pointer;
}

.wa-bubble-msg strong {
  color: #0f2b4c;
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}

/* Main Button */
.wa-btn {
  pointer-events: auto;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff !important;
  text-decoration: none;
  padding: 10px 18px 10px 14px;
  border-radius: 50px;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45), 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.01em;
}

.wa-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 16px 36px rgba(37, 211, 102, 0.6), 0 4px 12px rgba(0, 0, 0, 0.14);
  color: #ffffff !important;
}

.wa-btn:active {
  transform: translateY(-1px) scale(0.98);
}

.wa-icon-wrap {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.wa-svg {
  width: 30px;
  height: 30px;
  fill: #ffffff;
}

.wa-btn-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.wa-btn-text b {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.wa-btn-text small {
  font-size: 9.5px;
  font-weight: 500;
  opacity: 0.92;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* Pulsing Radar Rings */
.wa-radar {
  position: absolute;
  top: -5px;
  left: -5px;
  right: -5px;
  bottom: -5px;
  border-radius: 50px;
  border: 2px solid #25D366;
  opacity: 0.75;
  pointer-events: none;
  animation: waRadarPulse 2.4s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.wa-radar.radar-delay {
  animation-delay: 1.2s;
}

/* Online Badge Dot */
.wa-online-dot {
  position: absolute;
  top: 3px;
  left: 36px;
  width: 10px;
  height: 10px;
  background: #4ade80;
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Keyframe Animations */
@keyframes waRadarPulse {
  0% {
    transform: scale(0.96);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.25;
  }
  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}

@keyframes waPulseGreen {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

@keyframes waSlideUp {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.93);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .wa-widget {
    bottom: 18px;
    right: 16px;
  }

  .wa-btn-text {
    display: none;
  }

  .wa-btn {
    padding: 12px;
    border-radius: 50%;
    width: 54px;
    height: 54px;
    justify-content: center;
  }

  .wa-radar {
    border-radius: 50%;
  }

  .wa-online-dot {
    top: 3px;
    right: 3px;
    left: auto;
  }

  .wa-bubble {
    max-width: 250px;
    padding: 11px 13px 10px;
  }

  .wa-bubble-msg {
    font-size: 11.5px;
  }
}
