/* Floating Button */
#chatbotToggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ffffffdd;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.25s;
  z-index: 9999;
}

#chatbotToggle img {
  width: 55px;
  height: 55px;
}

#chatbotToggle:hover {
  transform: scale(1.1);
}

/* Chat Window */
#chatbotBox {
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 330px;
  height: 420px;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
}

/* เปิด */
#chatbotBox.open {
  display: flex;
}

/* Messages */
#chatMessages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  font-family: "Prompt", sans-serif;
}

.msg {
  padding: 10px 14px;
  margin-bottom: 10px;
  border-radius: 12px;
  max-width: 90%;
  white-space: pre-wrap;
  word-wrap: break-word;
  animation: fadeIn 0.2s ease-in;
}

.msg.user {
  background: #d1e7ff;
  align-self: flex-end;
}

.msg.bot {
  background: #efefef;
  align-self: flex-start;
}

/* Input */
.chat-input-area {
  display: flex;
  padding: 10px;
  background: #f4f4f4;
}

#chatInput {
  flex: 1;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #ccc;
  outline: none;
}

#sendBtn {
  margin-left: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  border: none;
  background: #007bff;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

#sendBtn:hover {
  background: #005fcc;
}

/* Typing dots */
.typing {
  display: inline-block;
  font-size: 14px;
  color: #555;
}
