/* Demo-specific styles. Base: ../assets/site.css */

.field { margin-bottom: 0.9rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.25rem; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.9rem; }

input[type="text"], input[type="password"], textarea {
  width: 100%;
  max-width: 34rem;
  font: inherit;
  padding: 0.5rem 0.6rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}
textarea { max-width: none; resize: vertical; }

.btn-row { display: flex; gap: 0.6rem; margin: 0.75rem 0; flex-wrap: wrap; }

button {
  font: inherit;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  border: 2px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
button:disabled { background: var(--border); border-color: var(--border); color: #3c4250; cursor: not-allowed; }
button.secondary { background: #fff; color: var(--accent); }
button.secondary:hover { background: var(--bg-soft); }

#key-status { font-weight: 600; }
#key-status.connected { color: #14532d; }
#key-status.error { color: #8a1c1c; }

#log {
  border: 2px solid var(--border);
  border-radius: 8px;
  background: var(--bg-soft);
  min-height: 16rem;
  max-height: 28rem;
  overflow-y: auto;
  padding: 0.9rem;
  margin: 0.75rem 0;
}
#log:empty::after {
  content: "The conversation will appear here. Start by telling the tutor what you're working on — it will ask what you've tried.";
  color: var(--muted);
  font-style: italic;
  display: block;
}
#log .msg { margin: 0 0 0.8rem; }
#log .speaker { font-weight: 700; }
#log .msg.tutor .speaker { color: var(--accent-dark); }
#log .msg.user { text-align: left; }
#log .msg.error { color: #8a1c1c; }

#typing-status { min-height: 1.5rem; margin: 0 0 0.4rem; font-style: italic; color: var(--muted); }

@media (max-width: 320px) {
  body { font-size: 0.95rem; }
  #log { padding: 0.5rem; min-height: 12rem; }
  .btn-row button { width: 100%; }
}
