.whatsapp-widget {
  position: fixed;
  bottom: -140px;
  right: 20px;
  z-index: 888;
  animation: slideUp 0.7s ease-out forwards;
  animation-delay: 2.5s;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

    /* Burbuja */
    .whatsapp-bubble {
      position: relative;
      background-color: white;
      padding: 6px 9px;
      border-radius: 16px;
      box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
      margin-bottom: 12px;
      opacity: 0;
      transform: translateY(10px);
      display: flex;
      align-items: center;
      transition: opacity 0.6s ease, transform 0.6s ease;
      visibility: hidden;
    }

    .whatsapp-bubble.show {
      opacity: 1;
      transform: translateY(0);
      visibility: visible;
    }

    .whatsapp-bubble.hide-fade {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.6s ease, transform 0.6s ease;
}


    .whatsapp-bubble::after {
      content: '';
      position: absolute;
      bottom: -13px;
      right: 10px;
      width: 0;
      height: 0;
      border: 9px solid transparent;
      border-top-color: white;
    }

    .typing-dots span {
      display: inline-block;
      width: 6px;
      height: 6px;
      margin: 0 3px;
      background-color: #888;
      border-radius: 50%;
      animation: blink 1.4s infinite;
    }

    .typing-dots span:nth-child(2) { animation-delay: 0.2s; }
    .typing-dots span:nth-child(3) { animation-delay: 0.4s; }

    .whatsapp-btn-container {
      position: relative;
      width: 70px;
      height: 70px;
      animation: pulse 2s infinite;
    }

    .whatsapp-btn-container img {
      width: 70px;
      height: 70px;
      cursor: pointer;
      display: block;
    }

    .notification-dot {
      position: absolute;
      top: -2px;
      right: -2px;
      width: 20px;
      height: 20px;
      background-color: #ff3b3b;
      color: white;
      font-size: 12px;
      font-weight: bold;
      text-align: center;
      line-height: 16px;
      border-radius: 50%;
      border: 2px solid white;
      z-index: 10;
      display: none; /* <-- Oculto al inicio */
    }

/* Círculo rojo fade-in */
.notification-dot {
  opacity: 0;
  transition: opacity 0.6s ease;
  position: absolute;
  top: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  background-color: #ff3b3b;
  color: white;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
  line-height: 16px;
  border-radius: 50%;
  border: 2px solid white;
  z-index: 10;
  display: block;
  pointer-events: none;
}

.notification-dot.fade-in {
  opacity: 1;
}

    /* Animaciones */
    @keyframes slideUp {
      to { bottom: 30px; }
    }

    @keyframes blink {
      0% { opacity: 0.2 }
      20% { opacity: 1 }
      100% { opacity: 0.2 }
    }

    @keyframes pulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.08); }
    }
    
    @media (max-width: 768px) {
  .whatsapp-widget {
    bottom: -160px; /* para ocultar el botón grande al inicio */
    right: 16px;    /* un poco más hacia adentro en móvil */
  }

  .whatsapp-btn-container {
    width: 90px;
    height: 90px;
  }

  .whatsapp-btn-container img {
    width: 90px;
    height: 90px;
  }

  .notification-dot {
    top: 2px;
    right: 2px;
    width: 26px;
    height: 26px;
    font-size: 14px;
    line-height: 20px;
  }

  .whatsapp-bubble {
    font-size: 10px;
  }

  .typing-dots span {
    width: 7px;
    height: 7px;
  }
}

@media (max-width: 768px) {
  .whatsapp-widget {
    transform: scale(0.8);
    transform-origin: bottom right;
  }
}