/* Contenedor principal del chatbot */
.chatbot-card {
  width: 350px;
  height: 500px;
  background-color: #ffffff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: none;
  flex-direction: column;
  overflow: hidden;
  position: fixed;
  bottom: 80px;
  right: 20px;
  transition: transform 0.3s ease;
  z-index: 1000;
}

.chatbot-card:hover {
  transform: translateY(-5px);
}

/* Encabezado del chatbot */
.card-header {
  background-image: linear-gradient(270deg, #9fcd90, #a9c96a, #469bbf, #9fcd90);
  background-size: 400% 100%;
  animation: gradientMove 8s ease infinite;
  color: #ffffff;
  padding: 15px 20px;
  font-size: 1.1em;
  font-weight: 500;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Contenedor del chat */
#chatbox {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: linear-gradient(to bottom, #eef1f6, #ffffff);
}

/* Estilos de la barra de desplazamiento del chat */
#chatbox::-webkit-scrollbar {
  width: 8px;
}

#chatbox::-webkit-scrollbar-thumb {
  background-color: #d1d5db;
  border-radius: 4px;
}

#chatbox::-webkit-scrollbar-track {
  background-color: #f0f2f5;
}

/* Mensajes del bot */
.msg-bot {
  background-color: #e2e8f0;
  color: #374151;
  padding: 12px 18px;
  border-radius: 18px;
  border-top-left-radius: 4px;
  max-width: 80%;
  align-self: flex-start;
  font-size: 0.95em;
  animation: fadeIn 0.5s ease forwards;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Mensajes del usuario */
.msg-user {
  background-color: rgba(5, 65, 140);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 18px;
  border-bottom-right-radius: 4px;
  max-width: 80%;
  align-self: flex-end;
  font-size: 0.95em;
  animation: fadeIn 0.5s ease forwards;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Contenedor de opciones */
.options-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  align-self: flex-end;
  animation: fadeIn 0.6s ease forwards;
}

/* Botones de opción */
.option-btn {
  background-color: #e2e8f0;
  color: #374151;
  border: none;
  padding: 10px 15px;
  border-radius: 25px;
  font-size: 0.9em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  font-weight: 500;
  user-select: none;
}

.option-btn:hover {
  background-color: #d1d5db;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.option-btn:active {
  transform: translateY(0);
  background-color: #c0c4c8;
}

/* Animación de entrada de mensajes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chatbot-btn {
  position: fixed;
  width: 65px;
  height: 65px;
  bottom: 25px;
  right: 25px;
  background-image: linear-gradient(270deg,#a9c96a, #469bbf, #9fcd90,  #9fcd90);
  background-size: 400% 100%;
  animation: gradientMove 8s ease infinite;
  border: none;
  border-radius: 50%;
  text-align: center;
  font-size: 32px;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease-in-out;
  overflow: visible;
}

.chatbot-btn::after {
  content: "";
  position: absolute;
  width: 90px;
  /* más grande que el botón */
  height: 90px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  /* solo centramos aquí */
  border: 4px solid transparent;
  border-top: 4px solid #469bbf,;
  /* luz */
  border-right: 4px solid #9fcd90;
  animation: spin 2s linear infinite;
  z-index: -1;
  filter: blur(2px);
}

/* Giro continuo */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}


/* Hover: más luz */
.chatbot-btn:hover::after {
  border-top: 4px solid #469bbf;
  border-right: 4px solid #469bbf;
  filter: blur(3px);
}

/* Icono dentro */
.chatbot-btn img {
  width: 35px;
  height: auto;
}

.chatbot-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px #9fcd90;
  cursor: pointer;
}

.icono-chatbot {
  width: 30px;
  height: auto;
}