/* =======================
   CHATBOT STYLES
   ======================= */
#chatbot-container {
  position: fixed;
  bottom: 90px; /* lo subimos para no chocar con el botón "back to top" */
  right: 20px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* --- Chat Button --- */
#chatbot-button {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: #dc3545;
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

#chatbot-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* --- Burbuja flotante (mensaje de sugerencia) --- */
.chatbot-tooltip {
  background: #dc3545; /* 🔴 Rojo estilo Frisco Batteries */
  color: white;
  padding: 8px 14px;
  border-radius: 20px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 1s ease forwards;
  animation-delay: 1.5s;
  position: relative;
}

.chatbot-tooltip::after {
  content: "";
  position: absolute;
  bottom: -6px;
  right: 20px;
  border-width: 6px;
  border-style: solid;
  border-color: #dc3545 transparent transparent transparent;
}


/* Animación para hacerla aparecer suavemente */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Chat Window --- */
#chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 450px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
}

.chatbot-header {
  border-radius: 10px 10px 0 0;
}

#chatbot-messages {
  flex: 1;
  background: #f8f9fa;
  overflow-y: auto;
}

.chat-message {
  margin-bottom: 10px;
  padding: 8px 12px;
  border-radius: 18px;
  max-width: 80%;
  word-wrap: break-word;
}

.chat-message.bot {
  background: #e3f2fd;
  margin-right: auto;
  margin-left: 10px;
}

.chat-message.user {
  background: #007bff;
  color: white;
  margin-left: auto;
  margin-right: 10px;
}

.chatbot-input {
  background: white;
  border-radius: 0 0 10px 10px;
}

#chatbot-input {
  border: none;
  border-radius: 20px;
}

#chatbot-input:focus {
  box-shadow: none;
  border: 1px solid #007bff;
}

#chatbot-send {
  border-radius: 20px;
  margin-left: 5px;
}

/* --- Responsivo para móviles --- */
@media (max-width: 576px) {
  #chatbot-window {
    width: 90vw;
    right: -10px;
  }
}
