/* ============================
   CHATBOT CONTAINER
============================ */
#chatbot {
  position: fixed;
  bottom: 10%;
  right: 20px;
  width: 320px;
  max-width: 80%;
  height: 450px;
  display: none;
  flex-direction: column;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  font-family: Arial, sans-serif;
  z-index: 9999;
  overflow: hidden;
}

#chatbot.active {
  display: flex;
}

/* ============================
   HEADER
============================ */
#chatbot-header {
  background-color: #007bff;
  color: #fff;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}

#chatbot-header button {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

/* ============================
   MESSAGES AREA
============================ */
#chatbot-messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  background-color: #f5f7fa;
  scroll-behavior: smooth;
}

/* Typing indicator */
.message.bot.typing {
  font-style: italic;
  color: #555;
  opacity: 0.8;
}

/* Suggested quick questions container */
.suggested-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

/* ============================
   INPUT AREA
============================ */
#chatbot-input {
  display: flex;
  padding: 8px;
  border-top: 1px solid #ddd;
  background-color: #fefefe;
}

#chatbot-input input {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
}

#chatbot-input button {
  margin-left: 6px;
  padding: 10px 14px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s, transform 0.2s;
}

#chatbot-input button:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

/* ============================
   MESSAGE BUBBLES
============================ */
.message {
  margin: 8px 0;
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 12px;
  word-wrap: break-word;
  font-size: 14px;
  animation: fadeIn 0.3s ease;
}

.message.user {
  background-color: #007bff;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

.message.bot {
  background-color: #e4e6eb;
  color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

/* ============================
   SMART BUTTONS INSIDE BOT MESSAGES
============================ */
.message.bot button,
.chat-btn {
  margin-top: 6px;
  background-color: #007bff;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.3s, transform 0.2s;
}

.message.bot button:hover,
.chat-btn:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

/* ============================
   MULTI-CHOICE BUTTON GROUPS
============================ */
.chat-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.chat-buttons .chat-btn {
  flex: 1;
  text-align: center;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 7px 10px;
  cursor: pointer;
  transition: 0.2s ease;
  font-size: 13px;
}

.chat-buttons .chat-btn:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

/* ============================
   CHATBOT TOGGLE BUTTON
============================ */
#chatbot-button {
  position: fixed;
  bottom: 20%;
  right: 20px;
  background-color: #007bff;
  color: white;
  border: none;
  padding: 14px 18px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 9999;
  transition: background 0.3s, transform 0.2s;
}

#chatbot-button:hover {
  background-color: #0056b3;
  transform: scale(1.05);
}

/* ============================
   ANIMATIONS
============================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================
   RESPONSIVE ADJUSTMENTS
============================ */
@media (max-width: 1200px) {
  #chatbot-button { bottom: 10%; }
  #chatbot { bottom: calc(10% + 50px); width: 280px; height: 350px; }
}

@media (max-width: 768px) {
  #chatbot { bottom: 10%; right: 10px; width: 80%; height: 60vh; border-radius: 10px; }
  #chatbot-button { bottom: 12%; right: 12px; padding: 12px 16px; font-size: 14px; }
}

@media (max-width: 480px) {
  #chatbot { width: 95%; height: 55vh; }
  .message { font-size: 13px; }
  .message.bot button, #chatbot-input button, .chat-btn {
    font-size: 13px;
    padding: 6px 10px;
  }
}
