/* Chatbot Container */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  font-family: 'Roboto', sans-serif;
}

/* Chat Toggle Button */
.chat-toggle {
  position: fixed;
  bottom: 60px;
  right: 20px;
  z-index: 1000;
  background-color: #347ff8; /* Matches site theme */
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  transition: transform 0.3s ease;
}

.chat-toggle:hover {
  transform: scale(1.1);
}

/* Chat Window */
.chat-window {
  display: none;
  flex-direction: column;
  width: 250px;
  height: 380px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  position: fixed;
  bottom: 120px;
  right: 20px;
  z-index: 999;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-window.open {
  display: flex;
}

/* Header */
.chat-header {
  background-color: #347ff8;
  color: white;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.close-chat {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
}

/* Messages Area */
.chat-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background-color: #f9f9f9;
}

.message {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
}

.message.user {
  align-items: flex-end;
}

.message.bot {
  align-items: flex-start;
}

.message-content {
  padding: 10px 15px;
  border-radius: 15px;
  max-width: 80%;
  font-size: 14px;
  line-height: 1.4;
}

.message.user .message-content {
  background-color: #347ff8;
  color: white;
  border-bottom-right-radius: 2px;
}

.message.bot .message-content {
  background-color: #e9ecef;
  color: #333;
  border-bottom-left-radius: 2px;
}

.message-time {
  font-size: 10px;
  color: #999;
  margin-top: 4px;
}

/* Input Area */
.chat-input-area {
  padding: 15px;
  border-top: 1px solid #eee;
  display: flex;
  background-color: white;
}

.chat-input-area input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 20px;
  margin-right: 10px;
  outline: none;
  font-size: 14px;
}

.chat-input-area input:focus {
  border-color: #347ff8;
}

.chat-send-btn {
  background-color: #347ff8;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.chat-send-btn:hover {
  background-color: #347ff8;
}

/* Responsive */
@media (max-width: 480px) {
  .chat-window {
    width: 90%;
    right: 5%;
    bottom: 90px;
    height: 60vh;
  }
}
