/* Minimal Phase 1a chat surface. Plain CSS — no framework. */

* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  background: #f7f7f8;
  color: #222;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: #1f1f23;
  color: #fff;
}
.topbar h1 { font-size: 1.1rem; margin: 0; font-weight: 600; }
.env-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #2f2f36;
  color: #b9b9c2;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 56rem;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
  gap: 1rem;
}

.conversation { flex: 1; display: flex; flex-direction: column; }
.messages {
  flex: 1;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e4e4e8;
  border-radius: 8px;
  padding: 0.75rem;
  min-height: 12rem;
}
.message { margin: 0.5rem 0; padding: 0.5rem 0.75rem; border-radius: 6px; white-space: pre-wrap; }
.message.user { background: #e9eefc; }
.message.assistant { background: #f2f2f4; }
.message.error { background: #fdecea; color: #9b1c1c; }
.message .role { font-size: 0.7rem; text-transform: uppercase; color: #6b6b75; margin-bottom: 0.25rem; }

.composer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid #e4e4e8;
  border-radius: 8px;
  padding: 0.75rem;
}
.composer textarea {
  grid-column: 1 / -1;
  font: inherit;
  resize: vertical;
  padding: 0.5rem;
  border: 1px solid #d0d0d6;
  border-radius: 4px;
  min-height: 4rem;
}
.composer label { display: flex; flex-direction: column; font-size: 0.8rem; gap: 0.15rem; }
.composer select { padding: 0.35rem; border: 1px solid #d0d0d6; border-radius: 4px; }
.actions { grid-column: 1 / -1; display: flex; gap: 0.5rem; justify-content: flex-end; }
button {
  padding: 0.4rem 0.9rem;
  border: 1px solid #d0d0d6;
  border-radius: 4px;
  background: #f7f7f8;
  cursor: pointer;
  font: inherit;
}
button[type="submit"] { background: #2d6cdf; color: white; border-color: #2d6cdf; }
button:disabled { opacity: 0.6; cursor: not-allowed; }
