/* ── BSD ONE SECURITY — WhatsApp Floating Widget ────────────── */

.wa-widget {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* ── Pulse button ─────────────────────────────────────────── */
.wa-btn {
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  text-decoration: none;
  border: none;
}

.wa-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 32px rgba(37,211,102,0.55);
}

.wa-btn svg {
  width: 30px;
  height: 30px;
  fill: white;
}

/* Pulse rings */
.wa-btn::before,
.wa-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(37,211,102,0.25);
  animation: wa-pulse 2.5s ease-out infinite;
}

.wa-btn::after {
  background: rgba(37,211,102,0.12);
  animation-delay: 0.6s;
}

@keyframes wa-pulse {
  0%   { transform: scale(1);   opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Notification dot */
.wa-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 18px;
  height: 18px;
  background: var(--red, #C0202A);
  border-radius: 50%;
  border: 2px solid var(--black, #0A0A0A);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: white;
  font-family: sans-serif;
}

/* ── Chat popup card ──────────────────────────────────────── */
.wa-popup {
  background: var(--black-card, #161616);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  width: 300px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.55);
  overflow: hidden;
  transform: scale(0.85) translateY(20px);
  transform-origin: bottom right;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wa-popup.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Header */
.wa-popup-header {
  background: #075E54;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.wa-avatar {
  width: 42px;
  height: 42px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wa-avatar svg {
  width: 22px;
  height: 22px;
  fill: white;
}

.wa-header-info {
  flex: 1;
}

.wa-header-name {
  font-family: sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: white;
  display: block;
}

.wa-header-status {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.65);
  display: flex;
  align-items: center;
  gap: 5px;
}

.wa-status-dot {
  width: 7px;
  height: 7px;
  background: #25D366;
  border-radius: 50%;
  display: inline-block;
  animation: wa-blink 2s ease-in-out infinite;
}

@keyframes wa-blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

.wa-close-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  padding: 4px;
  font-size: 1rem;
  line-height: 1;
  transition: color 0.2s;
}

.wa-close-btn:hover { color: white; }

/* Chat bubble area */
.wa-popup-body {
  padding: 16px;
  background: #ECE5DD;
  min-height: 100px;
}

.wa-bubble {
  background: white;
  border-radius: 0 10px 10px 10px;
  padding: 10px 14px;
  max-width: 220px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  position: relative;
  animation: wa-bubble-in 0.4s 0.2s ease backwards;
}

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

.wa-bubble::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 0;
  border-width: 0 8px 8px 0;
  border-style: solid;
  border-color: transparent white transparent transparent;
}

.wa-bubble p {
  font-family: sans-serif;
  font-size: 0.85rem;
  color: #303030;
  margin: 0 0 6px;
  line-height: 1.5;
}

.wa-bubble-time {
  font-size: 0.65rem;
  color: #999;
  text-align: right;
  display: block;
}

/* CTA button inside popup */
.wa-popup-cta {
  padding: 14px 16px;
  background: var(--black-card, #161616);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.wa-start-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  background: #25D366;
  color: white;
  border: none;
  border-radius: 25px;
  font-family: sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.wa-start-btn:hover {
  background: #20c05b;
  color: white;
  transform: translateY(-1px);
}

.wa-start-btn svg {
  width: 18px;
  height: 18px;
  fill: white;
}

/* ── Mobile adjustments ───────────────────────────────────── */
@media (max-width: 480px) {
  .wa-widget { bottom: 20px; right: 16px; }
  .wa-popup  { width: 270px; }
  .wa-btn    { width: 54px; height: 54px; }
}
