/* Entire chatbot container */
#chatbot-container {
  position: fixed;
  bottom: 30px;
  right: 20px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  z-index: 9999;
}

/* Chat icon */
#chat-icon {
  background: #007bff;
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

#chat-icon:hover {
  transform: scale(1.1);
}

/* Chat window */
#chat-window {
  width: 350px;
  height: 450px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Messages area */
#chat-messages {
  flex: 4;
  overflow-y: auto;
  padding: 12px;
  background-color: #f9f9f9;
}

/* Input area */
#chat-input-area {
  display: flex;
  align-items: center;
  padding: 15px;
  border-top: 1px solid #ddd;
  background-color: #fff;
  height: 36px;
  flex-shrink: 0;
}

/* Input field */
#user-input {
  flex: 1;
  padding: 0 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-right: 8px;
  height: 36px;
  box-sizing: border-box;
}

/* Send button */
#send-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 0 16px;
  height: 40px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 14px;
}

#send-btn:hover {
  background-color: #0056b3;
}

/* Message bubbles */
#chat-messages .user {
  background-color: #007bff;
  color: white;
  align-self: flex-end;
  padding: 10px;
  margin: 5px 0;
  max-width: 100%;
  border-radius: 14px 14px 4px 14px;
}

#chat-messages .bot {
  background-color: #e9ecef;
  color: #333;
  align-self: flex-start;
  padding: 10px;
  margin: 5px 0;
  max-width: 100%;
  border-radius: 14px 14px 14px 4px;
}

/* Bubble container */
.user-bubble,
.bot-bubble {
  max-width: 90%;
  margin: 8px 0;
  padding: 10px;
  border-radius: 14px;
  word-wrap: break-word;
  font-size: 14px;
  display: inline-block;
}

/* Align user messages to the right */
.user-bubble {
  background-color: #007bff;
  color: white;
  border-radius: 14px 14px 4px 14px;
  text-align: left; /* Keep text left-aligned */
  align-self: flex-end;
  float: right;
  clear: both;
}

/* Align bot messages to the left */
.bot-bubble {
  background-color: #e9ecef;
  color: #333;
  border-radius: 14px 14px 14px 4px;
  text-align: left;
  align-self: flex-start;
  float: left;
  clear: both;
}

.typing-indicator {
  background: #f0f0f0;
  color: #555;
  padding: 6px 12px;
  border-radius: 10px;
  margin: 8px 0;
  font-style: italic;
  max-width: 60%;
  float: left;
  clear: both;
}
