.view-chat header {
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.view-chat .controls h1 {
  font-size: 1.1rem;
  flex: 1;
  align-self: center;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem;
}

.content {
  flex: 1;
  display: flex;
  min-height: 0;
}

#sidebar {
  width: 16rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem 0.6rem;
  background: var(--surface);
  border-right: 1px solid var(--border);
}

#conversation-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

#conversation-list li {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
}

.conv-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.conv-delete {
  order: -1; /* trashcan sits to the left of the text */
  flex-shrink: 0;
  padding: 0.1rem 0.25rem;
  border: none;
  background: none;
  font-size: 0.85rem;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.12s;
}

#conversation-list li:hover .conv-delete,
.conv-delete:focus-visible {
  opacity: 1;
}

.conv-delete:hover {
  background: none;
  filter: brightness(0.7);
}

#conversation-list li:hover {
  background: var(--hover);
}

#conversation-list li.active {
  background: var(--accent-soft);
}

#conversation-list li.active .conv-title {
  color: var(--accent);
  font-weight: 500;
}

.conv-title {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv-meta {
  font-size: 0.72rem;
  color: var(--muted);
}

.chat-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.view-chat main {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.25rem;
  max-width: 52rem;
  width: 100%;
  margin: 0 auto;
}

#feedback-pane {
  width: 19rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow-y: auto;
}

.feedback-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.feedback-head h2 {
  font-size: 0.95rem;
}

#feedback-empty {
  font-size: 0.85rem;
  color: var(--muted);
}

#feedback-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* Narrow windows: shrink the side panes rather than dropping the feedback
   pane — it holds the only route to the final evaluation. */
@media (max-width: 64rem) {
  #sidebar {
    width: 12rem;
  }

  #feedback-pane {
    width: 14rem;
  }
}

.view-chat footer {
  padding: 0.75rem 1.25rem 1rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

#chat-form {
  display: flex;
  gap: 0.6rem;
  max-width: 52rem;
  margin: 0 auto;
}

#message-input {
  font-size: 1rem; /* the composer stays larger than form controls */
  flex: 1;
  resize: none;
  padding: 0.55rem 0.8rem;
  border-radius: var(--radius);
}

#send-button {
  font-size: 1rem; /* the composer stays larger than form controls */
  align-self: stretch;
  padding: 0 1.1rem;
  border-radius: var(--radius);
}

.view-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#conversation-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

/* Extension slots take no space until a track puts something in them. */
[data-slot]:empty {
  display: none;
}

.composer-actions {
  display: flex;
  align-items: end;
  gap: 0.4rem;
}

.side-panels {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
