.training-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 60px); /* Adjust based on your nav height */
  padding: 20px;
  gap: 20px;
}

/* Select boxes styling */
.select-container {
  display: flex;
  gap: 20px;
  padding: 10px 0;
}

.select-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.select-wrapper label {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.training-select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background-color: white;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

.training-select:hover {
  border-color: #999;
}

.training-select:focus {
  outline: none;
  border-color: #4b91f1;
  box-shadow: 0 0 0 2px rgba(75, 145, 241, 0.1);
}

/* Chat container styling */
.chat-container {
  flex: 1;
  background-color: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.messages-area {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Message bubbles */

/* Message styles */
.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  transition: opacity 0.3s ease, transform 0.3s ease;
  margin-bottom: 8px;
  position: relative;
}

.user-message {
  align-self: flex-end;
  background-color: var(--primary-color);
  color: white;
  border-bottom-right-radius: 4px;
}

.ai-message {
  align-self: flex-start;
  background-color: white;
  color: var(--text-color);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message-timestamp {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 4px;
  text-align: right;
}

/* Typing indicator */
.typing-indicator {
  align-self: flex-start;
  background-color: white;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 8px;
  display: flex;
  gap: 4px;
}

.typing-indicator .dot {
  width: 8px;
  height: 8px;
  background-color: #ccc;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-4px);
  }
}

/* Textarea auto-resize styles */
.chat-input {
  min-height: 48px;
  max-height: 150px;
  transition: height 0.2s ease;
}

/* Input container styling */
.input-container {
  display: flex;
  gap: 12px;
  padding: 16px;
  background-color: white;
  border-top: 1px solid #eee;
}

.chat-input {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  resize: none;
  font-size: 14px;
  line-height: 1.5;
  color: #666;
}

.chat-input:focus {
  outline: none;
  border-color: #4b91f1;
  box-shadow: 0 0 0 2px rgba(75, 145, 241, 0.1);
}

.send-button {
  width: 48px;
  height: 48px;
  background-color: #f3f4f6;
  color: #333;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.send-button:hover {
  background-color: #e5e7eb;
}

.send-button:active {
  transform: scale(0.95);
}

.send-icon {
  transform: rotate(-45deg);
}

/* Scrollbar styling */
.messages-area::-webkit-scrollbar {
  width: 8px;
}

.messages-area::-webkit-scrollbar-track {
  background: transparent;
}

.messages-area::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.messages-area::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.3);
}

.validate-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  background-color: #3b82f6;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-top: 16px;
}

.validate-button:hover {
  background-color: #2563eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.validate-button:active {
  background-color: #1d4ed8;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transform: translateY(0);
}

.validate-button:disabled {
  background-color: #93c5fd;
  cursor: not-allowed;
  transform: none;
}

.validate-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

.message-content br {
  display: block;
  margin: 10px 0;
  content: '';
}

.message-content p {
  margin-bottom: 10px;
}

/* Add this to your CSS */
.message-content {
  word-wrap: break-word;
}
/* Add to your CSS file */
.ai-message .message-content h1,
.ai-message .message-content h2,
.ai-message .message-content h3 {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  font-weight: bold;
}

.ai-message .message-content h1 {
  font-size: 1.5em;
}
.ai-message .message-content h2 {
  font-size: 1.3em;
}
.ai-message .message-content h3 {
  font-size: 1.1em;
}

.ai-message .message-content code {
  background-color: #f0f0f0;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: monospace;
  font-size: 0.9em;
}

.ai-message .message-content pre {
  background-color: #f0f0f0;
  padding: 0.7em;
  border-radius: 5px;
  overflow-x: auto;
  margin: 0.5em 0;
}

.ai-message .message-content pre code {
  background-color: transparent;
  padding: 0;
}

.ai-message .message-content ul,
.ai-message .message-content ol {
  padding-left: 1.5em;
  margin: 0.5em 0;
}

.ai-message .message-content li {
  margin-bottom: 0.3em;
}

.ai-message .message-content strong {
  font-weight: bold;
}

.ai-message .message-content em {
  font-style: italic;
}

.ai-message .message-content a {
  color: #0366d6;
  text-decoration: none;
}

.ai-message .message-content a:hover {
  text-decoration: underline;
}
