/* Chat widget styles */
#chat-toggle-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #6366f1;
  color: white;
  border: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

#chat-toggle-btn:hover {
  transform: scale(1.05);
  background-color: #4f46e5;
}

#chat-widget {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 350px;
  height: 500px;
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#chat-widget .header {
  padding: 16px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f8fafc;
}

#chat-widget h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
}

#chat-widget button {
  background: none;
  border: none;
  color: #6b7280;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#chat-widget button:hover {
  background-color: #f3f4f6;
  color: #1f2937;
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-message {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-start;
  max-width: 80%;
}

.chat-message.user {
  margin-left: auto;
}

.chat-message.ai {
  margin-right: auto;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 8px 0 0;
}

.chat-avatar.user {
  background-color: #6366f1;
  color: white;
  margin: 0 0 0 8px;
}

.chat-avatar.ai {
  background-color: #f3f4f6;
  color: #6b7280;
  margin: 0 8px 0 0;
}

.chat-content {
  padding: 12px 16px;
  border-radius: 16px 16px 4px 16px;
  background-color: #6366f1;
  color: white;
  line-height: 1.5;
  font-size: 0.95rem;
  word-wrap: break-word;
  max-width: 100%;
}

.chat-content.ai {
  background-color: #f3f4f6;
  color: #1f2937;
  border-radius: 16px 16px 16px 4px;
  margin-right: auto;
}

.chat-input-container {
  padding: 16px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  gap: 12px;
  background-color: #f8fafc;
}

#chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

#chat-input:focus {
  border-color: #6366f1;
}

#chat-input::placeholder {
  color: #9ca3af;
}

#chat-send-btn {
  background-color: #6366f1;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
}

#chat-send-btn:hover {
  background-color: #4f46e5;
}

.typing-indicator {
  display: flex;
  align-items: center;
  max-width: 80%;
  margin-left: auto;
}

.typing-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #6b7280;
}

.typing-content {
  padding: 12px 16px;
  border-radius: 16px 16px 16px 4px;
  background-color: #f3f4f6;
  color: #1f2937;
  line-height: 1.5;
  font-size: 0.95rem;
}

.typing-dots {
  display: inline-block;
}

.typing-dots span {
  display: inline-block;
  width: 2px;
  height: 2px;
  margin: 0 2px;
  background-color: #6b7280;
  border-radius: 50%;
  animation: typing 1.5s infinite;
}

@keyframes typing {
  0%, 60% { transform: translateX(0); }
  30% { transform: translateX(8px); }
}