/* 🔘 Toggle Button */
#chatbot-toggle-btn {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 9999;
}
#chatbot-toggle-btn img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
}
#chatbot-toggle-btn img:hover {
  transform: scale(1.05);
}

/* 🗨️ Tooltip above bot icon */
#chatbot-tooltip {
  position: absolute;
  bottom: 70px;
  right: 0;
  background-color: #004080; /* 🔵 changed */
  color: #fff;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10000;
}
#chatbot-tooltip.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#tooltip-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  margin: 0;
}

/* 💬 Chatbot Popup */
.chatbot-popup {
  display: none;
  position: fixed;
  bottom: 150px;
  right: 20px;
  width: 340px;
  max-height: 80vh;
  background-color: #fefefe;
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  overflow: hidden;
  flex-direction: column;
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 10000;
}
.chatbot-popup.active {
  display: flex;
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* 🧠 Header */
.chat-header {
  background-color: #004080; /* 🔵 changed */
  color: #fff;
  padding: 12px 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-header button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

/* 📜 Chat Scroll Area */
#chat-messages {
  flex: 1;
  padding: 12px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
}

/* 📩 Messages */
.message {
  padding: 10px 14px;
  border-radius: 14px;
  max-width: 80%;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.message.bot {
  background-color: #e6f0fa; /* 🔵 lighter blue background */
  color: #222;
  align-self: flex-start;
}
.message.user {
  background-color: #004080; /* 🔵 changed */
  color: #fff;
  align-self: flex-end;
}

/* ✍️ Input Section */
.chat-input {
  display: flex;
  padding: 12px;
  background-color: #f2f2f2;
  border-top: 1px solid #ddd;
}
.chat-input input[type="text"] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
}
.chat-input button {
  margin-left: 8px;
  padding: 10px 16px;
  background-color: #004080; /* 🔵 changed */
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
}
.chat-input button:hover {
  background-color: #0059b3; /* 🔵 hover shade */
}

/* 🎯 Option Buttons */
.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 5px;
}
.button-group button {
  padding: 6px 12px;
  font-size: 13px;
  background-color: #e0e0e0;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.button-group button:hover {
  background-color: #c0c0c0;
}

/* 🖱️ Scrollbar */
#chat-messages::-webkit-scrollbar {
  width: 6px;
}
#chat-messages::-webkit-scrollbar-thumb {
  background-color: #bbb;
  border-radius: 4px;
}

/* 📱 Mobile Responsiveness */
@media (max-width: 500px) {
  .chatbot-popup {
    width: 95%;
    right: 10px;
    bottom: 100px;
  }
  #chatbot-toggle-btn img {
    width: 50px;
    height: 50px;
  }
}
