/* Burbuja de chat flotante */
#chatButton {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #092a49;
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, background-color 0.3s ease;
  animation: bounce 2s infinite; /* Efecto de rebote */
  z-index: 9999; /* Asegura que el botón esté sobre otros elementos */
}

/* Icono del chat y transiciones */
#chatIcon {
  height: 30px;
  font-size: 20px;
  color: white;
  transition: transform 0.4s ease, opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#chatButton.open #chatIcon {
  transform: rotate(180deg) scale(1.2); /* Rotación y escalado al abrir el bot */
}

/* Notificación en la burbuja */
#notification {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: red;
  color: white;
  font-size: 14px;
  font-weight: bold;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* Contenedor del chatbot */
#chatbot {
  width: 350px;
  height: 450px;
  border-radius: 10px;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.2);
  position: fixed;
  bottom: 100px;
  right: 30px;
  background: linear-gradient(145deg, #f0f2f5, #ffffff);
  display: none;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 9999; /* Asegura que el chatbot esté sobre otros elementos */
}

/* Encabezado del chatbot */
#chatbotHeader {
  display: flex;
  align-items: center;
  padding: 10px;
  background-color: #092a49;
  color: #ffffff;
  border-radius: 8px 8px 0 0;
}

#chatbotHeader img {
  width: 30px;
  height: 30px;
  margin-right: 10px;
}

.chatbot-name-status {
  display: flex;
  flex-direction: column;
}

.chatbot-name {
  font-weight: bold;
  font-size: 16px;
  margin: 0;
}

.status-button {
  display: inline-flex;
  align-items: center;
  background-color: #25d366;
  color: white;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  margin-top: 2px;
  text-align: center;
}

/* Mensajes y estilo del chat */
#messages {
  list-style-type: none;
  padding: 15px;
  margin: 0;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

div#options {
  padding: 0px 15px;
}

.message {
  padding: 10px;
  margin: 5px 0;
  border-radius: 8px;
  max-width: 80%;
  line-height: 1.4;
  word-wrap: break-word;
  opacity: 1;
  transform: translateY(0);
}

.bot {
  background-color: #f0f4ff;
  align-self: flex-start;
  color: #333;
}

.user {
  background-color: #092a49;
  color: #ffffff;
  align-self: flex-end;
  text-align: right;
}

/* Botones de opciones */
.option-button {
  padding: 10px 20px;
  border: none;
  border-radius: 20px;
  background-color: #092a49;
  color: white;
  cursor: pointer;
  margin: 5px 0;
  font-size: 16px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: block;
  text-align: center;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.option-button:hover {
  background-color: #2e6fd8;
  transform: translateY(-2px);
}

.option-button:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Indicador de escritura */
.typing-indicator {
  display: flex;
  gap: 4px;
  margin: 5px 0;
  align-self: flex-start;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background-color: #092a49;
  border-radius: 50%;
  animation: blink 1.2s infinite alternate;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.4s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.8s;
}

@keyframes blink {
  from {
    opacity: 0.3;
  }
  to {
    opacity: 1;
  }
}

/* Efecto de rebote para el botón */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Campo de entrada */
#inputContainer {
  display: flex;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
}

#userInput {
  width: 100%;
  padding: 12px;
  border: none;
  outline: none;
  border-radius: 20px;
  font-size: 14px;
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s ease;
}

#userInput:focus {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Botón de enviar (icono de flecha) */
#sendButton {
  margin-left: 10px;
  background-color: #092a49;
  color: white;
  font-size: 18px;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Botón de WhatsApp */
.whatsapp-button {
  display: block;
  margin-top: 10px;
  padding: 12px 16px;
  background-color: #25d366;
  color: white;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

/* Botón de WhatsApp */


a.whatsapp {
    position: fixed;
    z-index: 1000000;
    bottom: 30px;
    left: 30px !important;
}
