/* =========================================================
   WhatsApp Floating Support Widget
   ========================================================= */

/* Config */
:root {
  --wa-color: #25D366;
  --wa-color-dark: #1da851;
  --wa-bg: #ffffff;
  --wa-text: #1f2937;
  --wa-text-light: #6b7280;
  --wa-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  --wa-shadow-hover: 0 8px 24px rgba(37, 211, 102, 0.35);
  --wa-radius: 50%;
  --wa-size: 60px;
  --wa-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Floating Button */
.wa-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: var(--wa-size);
  height: var(--wa-size);
  border-radius: var(--wa-radius);
  background: var(--wa-color);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--wa-shadow);
  transition: transform var(--wa-transition), box-shadow var(--wa-transition), background var(--wa-transition);
  z-index: 9999;
  text-decoration: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.wa-float-btn:hover {
  transform: scale(1.08);
  box-shadow: var(--wa-shadow-hover);
  background: var(--wa-color-dark);
}

.wa-float-btn:focus-visible {
  outline: 3px solid rgba(37, 211, 102, 0.4);
  outline-offset: 4px;
}

.wa-float-btn:active {
  transform: scale(0.96);
}

.wa-float-btn svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
  pointer-events: none;
}

/* Pulse Ring */
.wa-pulse {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: var(--wa-size);
  height: var(--wa-size);
  border-radius: var(--wa-radius);
  background: var(--wa-color);
  opacity: 0;
  z-index: 9998;
  pointer-events: none;
  animation: waPulse 2.5s ease-out infinite;
}

@keyframes waPulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  70% {
    transform: scale(1.6);
    opacity: 0;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* Chat Bubble */
.wa-bubble {
  position: fixed;
  bottom: 96px;
  right: 24px;
  background: var(--wa-bg);
  color: var(--wa-text);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: var(--wa-shadow);
  z-index: 9999;
  max-width: 260px;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.wa-bubble.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.wa-bubble-text {
  margin-bottom: 10px;
  color: var(--wa-text);
}

.wa-bubble-text strong {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
  color: var(--wa-text);
}

.wa-bubble-text span {
  font-size: 0.8rem;
  color: var(--wa-text-light);
}

.wa-bubble-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: var(--wa-text-light);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 4px;
  border-radius: 50%;
  transition: color 0.2s, background 0.2s;
}

.wa-bubble-close:hover {
  color: var(--wa-text);
  background: #f3f4f6;
}

.wa-bubble-close:focus-visible {
  outline: 2px solid rgba(37, 211, 102, 0.4);
  outline-offset: 2px;
}

/* Bubble arrow */
.wa-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 28px;
  width: 16px;
  height: 16px;
  background: var(--wa-bg);
  transform: rotate(45deg);
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.06);
  z-index: -1;
}

/* Responsive */
@media (max-width: 480px) {
  :root {
    --wa-size: 54px;
  }

  .wa-float-btn {
    bottom: 18px;
    right: 18px;
  }

  .wa-pulse {
    bottom: 18px;
    right: 18px;
  }

  .wa-bubble {
    bottom: 84px;
    right: 18px;
    max-width: 220px;
    font-size: 0.85rem;
  }
}
