/* ==========================================================================
   WIDGET FLUTUANTE DE WHATSAPP (#ignis-wa-1)
   ========================================================================== */

#ignis-wa-1 {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 999999;
  font-family: var(--font-mulish), Arial, sans-serif;
}

#ignis-wa-1 .ignis-wa-window,
#ignis-wa-1 .ignis-wa-card {
  display: none;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.2);
  margin-bottom: 14px;
  animation: popIn 0.3s ease-out;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.8) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

#ignis-wa-1.open .ignis-wa-window,
#ignis-wa-1.open .ignis-wa-card {
  display: block;
}

#ignis-wa-1 .ignis-wa-header {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  padding: 16px;
  background: rgb(9, 94, 84);
}

#ignis-wa-1 .ignis-wa-header img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

#ignis-wa-1 .ignis-wa-header strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}

#ignis-wa-1 .ignis-wa-header small {
  display: block;
  margin-top: 2px;
  opacity: 0.9;
  font-size: 0.75rem;
}

#ignis-wa-1 .ignis-wa-close {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

#ignis-wa-1 .ignis-wa-body {
  padding: 20px 16px;
  background: #efeae2;
  background-image: radial-gradient(#d1c7b7 1px, transparent 1px);
  background-size: 16px 16px;
}

#ignis-wa-1 .ignis-wa-message,
#ignis-wa-1 .ignis-wa-msg-bubble {
  background: #ffffff;
  padding: 12px 16px;
  border-radius: 0px 12px 12px 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  color: #111b21;
  position: relative;
  margin-left: 8px;
}

#ignis-wa-1 .ignis-wa-message p,
#ignis-wa-1 .ignis-wa-msg-bubble p {
  margin: 0;
  color: #111b21;
}

#ignis-wa-1 .ignis-wa-message::before,
#ignis-wa-1 .ignis-wa-msg-bubble::before {
  content: '';
  position: absolute;
  top: 0;
  left: -8px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 10px 10px 0;
  border-color: transparent #ffffff transparent transparent;
}

#ignis-wa-1 .ignis-wa-time {
  display: block;
  text-align: right;
  font-size: 0.7rem;
  color: #667781;
  margin-top: 6px;
}

#ignis-wa-1 .ignis-wa-footer {
  padding: 12px;
  background: #ffffff;
}

#ignis-wa-1 .ignis-wa-footer a {
  display: block;
  padding: 12px;
  border-radius: 20px;
  background: rgb(79, 206, 93);
  color: #ffffff;
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background var(--transition-fast);
}

#ignis-wa-1 .ignis-wa-footer a:hover {
  background: rgb(65, 185, 78);
}

#ignis-wa-1 .ignis-wa-bubble {
  float: right;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 0;
  background: rgb(79, 206, 93);
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.2s ease, background 0.2s ease;
  animation: waSubtlePulse 3s infinite ease-in-out;
}

#ignis-wa-1 .ignis-wa-bubble::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(79, 206, 93, 0.4);
  z-index: -1;
  animation: waRingPulse 3s infinite ease-in-out;
}

#ignis-wa-1 .ignis-wa-bubble:hover {
  transform: scale(1.12);
  background: rgb(65, 185, 78);
  animation-play-state: paused;
}

#ignis-wa-1 .ignis-wa-bubble:hover::after {
  animation-play-state: paused;
  opacity: 0;
}

@keyframes waSubtlePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes waRingPulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.32);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}
