/* talk PWA — minimal dark UI, mobile-first. Adapted from talk2n prototype. */

:root { color-scheme: dark; }

html, body {
  height: 100%;
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #0d0d10;
  color: #e8e8ec;
}

body {
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top) 1rem env(safe-area-inset-bottom);
  box-sizing: border-box;
}

header {
  padding: .8rem 0;
  font-weight: 600;
  opacity: .85;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

#state {
  font-size: .8rem;
  opacity: .7;
  padding: .15rem .5rem;
  border-radius: 4px;
  background: #16161a;
}

.state-idle      { color: #888; }
.state-listening { color: #80b3ff; background: #1a2030; }
.state-waiting   { color: #f0b35e; background: #2a2010; }
.state-speaking  { color: #a5d6a7; background: #1a2820; }
.state-cancel    { color: #ff8080; background: #2a1010; }

.hidden { display: none !important; }

section {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.controls {
  display: flex;
  gap: .5rem;
  padding: .5rem 0;
}

button {
  flex: 1;
  padding: 1rem;
  font-size: 1.05rem;
  border: 1px solid #2a2a30;
  background: #16161a;
  color: #e8e8ec;
  border-radius: 10px;
  touch-action: manipulation;
  cursor: pointer;
}
button:disabled { opacity: .35; cursor: not-allowed; }
button.primary { background: #2962ff; border-color: #2962ff; color: white; }
button.danger  { background: #c62828; border-color: #c62828; color: white; }

#status {
  font-size: .85rem;
  opacity: .7;
  padding: .25rem 0 .5rem;
  min-height: 1.2em;
}

#transcript {
  flex: 1;
  overflow-y: auto;
  background: #131318;
  border: 1px solid #2a2a30;
  border-radius: 10px;
  padding: .75rem;
  font-size: .95rem;
  line-height: 1.4;
  min-height: 8rem;
}

.turn {
  margin: 0 0 .75rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.turn .who { font-weight: 600; opacity: .8; }
.turn.user .who      { color: #80b3ff; }
.turn.assistant .who { color: #a5d6a7; }
.turn.interim .who   { color: #f0b35e; }
.turn.interim        { opacity: .6; font-style: italic; }
.turn.cancelled .who { color: #ff8080; }

.input-row {
  display: flex;
  gap: .5rem;
  padding: .5rem 0 0;
}
.input-row input {
  flex: 1;
  padding: .8rem;
  font-size: 1rem;
  background: #16161a;
  color: #e8e8ec;
  border: 1px solid #2a2a30;
  border-radius: 10px;
}

.hint {
  font-size: .8rem;
  opacity: .6;
  line-height: 1.4;
}
.hint code {
  background: #16161a;
  padding: 1px 4px;
  border-radius: 3px;
}
