/* AI Chatbot Styles */

.chat_list {
  background: #f8f9fa;
  padding: 10px;
}

.message-container {
  margin: 10px 0;
  display: flex;
  width: 100%;
}

.message-container.message-left {
  justify-content: flex-start;
}

.message-container.message-right {
  justify-content: flex-end;
}

.message-content {
  display: flex;
  align-items: flex-end;
  max-width: 70%;
}

.message-right .message-content {
  flex-direction: row-reverse;
}

.user-avatar, .ai-avatar {
  font-size: 24px;
  margin: 0 8px;
  flex-shrink: 0;
}

.message-bubble {
  position: relative;
  padding: 12px 16px;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  word-wrap: break-word;
}

.user-message {
  background: #007bff;
  color: white;
  border-bottom-right-radius: 6px;
}

.ai-message {
  background: white;
  color: #333;
  border: 1px solid #e1e8ed;
  border-bottom-left-radius: 6px;
}

.message-text {
  line-height: 1.4;
  margin-bottom: 4px;
}

.message-text code {
  background: rgba(0, 0, 0, 0.1);
  padding: 2px 4px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.user-message .message-text code {
  background: rgba(255, 255, 255, 0.2);
}

.message-time {
  font-size: 11px;
  opacity: 0.7;
  text-align: right;
}

.user-message .message-time {
  color: rgba(255, 255, 255, 0.8);
}

.ai-message .message-time {
  color: #666;
}

/* Settings panel */
.webix_form .webix_control {
  margin-bottom: 10px;
}

.webix_form .webix_slider .webix_slider_handle {
  background: #007bff;
  border-color: #007bff;
}

/* Toolbar styles */
.webix_toolbar .webix_button {
  margin: 2px;
}

/* Loading animation */
.mdi-spin {
  animation: mdi-spin 1s infinite linear;
}

@keyframes mdi-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .message-container {
    max-width: 90%;
  }

  .message-content {
    max-width: 100%;
  }
}

/* Chat input area */
.webix_textarea textarea {
  resize: none;
  font-family: inherit;
}

/* Enhanced button styles */
.webix_button.webix_disabled {
  opacity: 0.6;
}

/* Session label styling */
.webix_form .webix_label {
  font-weight: 500;
  color: #666;
  padding: 8px 0;
}