.chat-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.chat-bubble {
  width: 50px;
  height: 50px;
  background-color: #007bff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s;
  position: relative;
}

.chat-bubble::before {
  content: '';
  position: absolute;
  width: 38px;
  height: 38px;
  background-color: white;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.chat-bubble i {
  color: #007bff;
  font-size: 24px;
  position: relative;
  z-index: 2;
}

.chat-bubble:hover {
  opacity: 0.9;
}

.chat-window {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 30vw;
  height: 70vh;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-window.hidden {
  display: none;
}

.chat-header {
  padding: 15px;
  background: #007bff;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 16px;
}

.mic-button {
  background-color: #f0f0f0;
  border: none;
  border-radius: 50%;
  color: #007bff;
  cursor: pointer;
  font-size: 16px;
  height: 36px;
  margin: 0 8px;
  padding: 0;
  transition: background-color 0.2s;
  width: 36px;
}

.mic-button:hover {
  background-color: #e0e0e0;
}

.mic-button.recording {
  background-color: #ff4d4d;
  color: white;
}

.minimize-button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 5px;
}

.minimize-button:hover {
  opacity: 0.8;
}

.sample-questions {
  padding: 10px;
  border-bottom: 1px solid #eee;
  background: #f8f9fa;
}

.sample-questions-header {
  font-weight: bold;
  margin-bottom: 5px;
}

.sample-question {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px;
  margin: 5px 0;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: white;
  cursor: pointer;
}

.sample-question:hover {
  background: #f0f0f0;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

.message-container {
  margin-bottom: 15px;
}

.ai-message .message-content {
  color: #333; /* Explicitly set the text color for AI messages */
}

.ai-message {
  background: #f0f0f0;
  color: #333;
}

.chat-input {
  padding: 15px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
}

.chat-input textarea {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  resize: none;
}

.send-button {
  padding: 10px 15px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.send-button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.chat-error {
  background: #ff4444;
  color: white;
  padding: 10px;
  margin: 5px 0;
  border-radius: 5px;
  text-align: center;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  font-style: italic;
  color: #666;
}

.markdown-body {
  font-size: 14px;
  line-height: 1.6;
}

.markdown-body code {
  background: #f8f9fa;
  padding: 2px 4px;
  border-radius: 3px;
}

.markdown-body pre {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 5px;
  overflow-x: auto;
}

.markdown-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 10px 0;
}

.markdown-body th,
.markdown-body td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.markdown-body th {
  background: #f8f9fa;
}

.typing-indicator {
  display: flex;
  align-items: center;
  padding: 10px;
  margin: 5px 0;
  background: #f0f0f0;
  border-radius: 10px;
  max-width: 80%;
}

.typing-indicator.hidden {
  display: none;
}

.typing-dots {
  display: flex;
  gap: 4px;
  margin-right: 8px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: #666;
  border-radius: 50%;
  animation: typing-dot 1s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
  animation-delay: 0.1s;
}
.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.typing-dots span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing-dot {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.typing-text {
  color: #666;
  font-size: 14px;
}

.markdown-body table th,
.markdown-body table td {
  padding: 6px 13px;
  border: 1px solid #dfe2e5;
}

.markdown-body table tr:nth-child(2n) {
  background-color: #f6f8fa;
}

.markdown-body blockquote {
  margin: 0;
  padding: 0 1em;
  color: #6a737d;
  border-left: 0.25em solid #dfe2e5;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 2em;
}

.markdown-body hr {
  height: 0.25em;
  padding: 0;
  margin: 24px 0;
  background-color: #e1e4e8;
  border: 0;
}

.message-container .user-message {
  align-self: flex-end;
  background-color: #007bff;
  padding: 8px 12px;
  border-radius: 15px 15px 0 15px;
  max-width: 80%;
  margin-left: auto;
}

/* Explicitly set text color for the content */
.message-container .user-message .message-content {
  color: #333333; /* Dark text color for better visibility */
  word-wrap: break-word;
  line-height: 1.4;
}
