@import url("https://fonts.googleapis.com/css?family=Roboto");

/* Animación pulse para sombra */
@keyframes pulseShadow {
  0% {
    box-shadow: 0 0 8px rgba(37, 211, 102, 0.7);
  }
  50% {
    box-shadow: 0 0 20px rgba(37, 211, 102, 1);
  }
  100% {
    box-shadow: 0 0 8px rgba(37, 211, 102, 0.7);
  }
}

.pulse {
  animation-name: pulseShadow;
  animation-duration: 2s;
  animation-iteration-count: infinite;
}

/* Contenedor del botón y popup */
.nav-bottom {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 9999;
  padding: 0;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: flex-end;
  width: auto;
  height: auto;
}

/* Popup WhatsApp */
.popup-whatsapp {
  display: none;
  position: absolute;
  bottom: 85px;
  right: 6px;
  flex-direction: column;
  background: white;
  border-radius: 10px;
  padding: 10px 15px 15px 15px;
  box-shadow: 2px 1px 6px rgba(68, 68, 68, 0.7);
  width: 320px;
  max-width: 90vw;
  z-index: 10000;
}

/* Mostrar popup */
.is-active-whatsapp-popup {
  display: flex !important;
  animation: slideInUp 0.6s forwards;
  background-color: #fafafa;
}

/* Contenido top y bottom */
.popup-whatsapp > .content-whatsapp.-top {
  margin-top: 10px;
  margin-bottom: 10px;
  color: #585858;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 1em;
  display: flex;
  align-items: center;
}

.popup-whatsapp > .content-whatsapp.-top p {
  margin: 0;
}

.popup-whatsapp > .content-whatsapp.-bottom {
  display: flex;
  flex-direction: row;
  align-items: center;
}

/* Input */
input.whats-input[type="text"] {
  flex-grow: 1;
  height: 40px;
  border: 0;
  border-radius: 20px;
  font-size: 1em;
  background-color: #ffffff;
  padding-left: 10px;
  outline: none;
  transition: width 0.3s ease-in-out, background-color 0.3s;
}

input.whats-input::placeholder {
  color: rgba(68, 68, 68, 0.7);
}

input.whats-input[type="text"]:focus {
  background-color: #f8f8f8;
}

/* Botón cerrar */
.closePopup {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background-color: #25d366;
  color: white;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 1px 1px 2px rgba(68, 68, 68, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
  z-index: 10001;
}

.closePopup:hover {
  background-color: #ff0000;
}

/* Botón enviar mensaje */
.send-msPopup {
  width: 40px;
  height: 40px;
  margin-left: 8px;
  border-radius: 50%;
  background-color: white;
  border: none;
  cursor: pointer;
  box-shadow: 1px 1px 2px rgba(68, 68, 68, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background-color 0.3s ease;
}

.send-msPopup:hover {
  background-color: #f8f8f8;
}

/* Botón WhatsApp flotante */
.whatsapp-button {
  background-color: #25d366;
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(37, 211, 102, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: box-shadow 1.5s ease-in-out, transform 0.3s ease;
  z-index: 9999;
  position: relative;
}

/* Solo pulso si tiene esta clase */
.pulse {
  animation: pulseShadow 2s infinite;
}

/* Efecto hover: crecer y sombra más fuerte */
.whatsapp-button:hover {
  transform: scale(1.15);
  box-shadow: 0 0 20px rgba(37, 211, 102, 1);
}

/* Icono WhatsApp más grande */
.whatsapp-button i.fa {
  font-size: 40px;
  line-height: 60px;
  color: white;
}

/* Animación slideInUp */
@keyframes slideInUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 420px) {
  .popup-whatsapp {
    width: 280px;
  }
  input.whats-input[type="text"] {
    width: 100%;
  }
}
