body {
  font-family: Arial, sans-serif;
  margin: 1rem;
  background: #f9fafb;
  color: #333;
}

.container {
  max-width: 700px;
  margin: auto;
  background: white;
  border-radius: 8px;
  padding: 1rem 2rem 2rem;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.1);
}

h1 {
  text-align: center;
  margin-bottom: 1rem;
}

form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

input[type="text"] {
  flex-grow: 1;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  border: 1px solid #bbb;
  border-radius: 4px;
}

button {
  padding: 0.55rem 1rem;
  font-size: 1rem;
  background: #2563eb;
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
}

button:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

#status {
  margin-bottom: 1rem;
  font-style: italic;
  height: 1.5rem;
}

#chat-history {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.5rem;
  background: #fefefe;
  margin-bottom: 1rem;
}

.chat-message {
  margin: 0.5rem 0;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  max-width: 80%;
  word-wrap: break-word;
}

.chat-message.user {
  background-color: #dbeafe;
  margin-left: auto;
}

.chat-message.bot {
  background-color: #e0e7ff;
  margin-right: auto;
}

#answer {
  border-top: 1px solid #ddd;
  padding-top: 1rem;
  margin-top: 1rem;
  min-height: 80px;
}

.citations {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: #6b7280;
  border-top: 1px dotted #ccc;
  padding-top: 0.5rem;
}

.feedback-container {
  margin-top: 1rem;
  border-top: 1px solid #ddd;
  padding-top: 1rem;
}

.feedback-stars {
  font-size: 24px;
  cursor: pointer;
}

.feedback-stars span {
  user-select: none;
  color: gray;
  margin-right: 0.1rem;
}

.feedback-stars .selected {
  color: gold;
}

.feedback-textarea {
  width: 100%;
  margin-top: 0.5rem;
  font-size: 1rem;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #bbb;
  resize: vertical;
}

.feedback-flag {
  margin-top: 0.5rem;
  user-select: none;
}

.feedback-submit {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  background: #2563eb;
  border-radius: 4px;
  color:white;
  border:none;
  cursor:pointer;
}

.feedback-submit:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.feedback-message {
  margin-top: 0.5rem;
  font-weight: 600;
  color: green;
}
.feedback-error {
  margin-top: 0.5rem;
  color: red;
}