/* public/terminal.css — the participant surface.
 *
 * Communication software from the same operating system: a resident chat
 * window in the Windows Live Messenger idiom. Calm and legible, because
 * people sit with this for a long time. Nothing pulses or demands attention. */

.workspace.chat { align-items: stretch; height: 100%; padding: 16px 14px 18px; }
.win.chat { width: min(860px, 100%); max-height: 100%; }

#log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msg { max-width: 78%; }
.msg.sent { align-self: flex-end; }
.msg.received { align-self: flex-start; }

.msg .from {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}
.msg.sent .from { color: #2f6a92; text-align: right; }
.msg.received .from { color: #3f7a26; }

.msg .body {
  padding: 9px 14px;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 4px;
  border: 1px solid;
}
.msg.sent .body {
  color: #14384c;
  border-color: #a9cee5;
  background: linear-gradient(180deg, #ffffff 0%, #eaf5fd 46%, #dcedfa 47%, #f0f8fe 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 1px 2px rgba(20, 70, 100, 0.10);
}
.msg.received .body {
  color: #1d3f18;
  border-color: #b7d99a;
  background: linear-gradient(180deg, #ffffff 0%, #f0f9e6 46%, #e3f4d2 47%, #f4fbec 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 1px 2px rgba(50, 90, 30, 0.10);
}

.msg.system {
  align-self: center;
  max-width: none;
  font-size: 11.5px;
  color: #5f7480;
  font-style: italic;
}
.msg.system .body { border: none; background: none; box-shadow: none; padding: 2px 0; font-size: 11.5px; }

#composer {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 14px;
  background: linear-gradient(180deg, #f6fafc 0%, #eaf1f6 100%);
  border-top: 1px solid #d6dee4;
}

#input {
  flex: 1;
  min-height: 26px;
  max-height: 32vh;
  padding: 7px 10px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  color: #101010;
  background: #fff;
  border: 1px solid #a7b4bd;
  border-radius: 2px;
  box-shadow: inset 0 1px 2px rgba(30, 60, 80, 0.16);
  resize: none;
  outline: none;
}
#input:focus {
  border-color: var(--ctl-edge-hot);
  box-shadow: inset 0 1px 2px rgba(30,60,80,0.14), 0 0 5px var(--ctl-glow);
}
#input::placeholder { color: #93a3ad; }

#send { flex: none; height: 32px; min-width: 78px; }

@media (max-width: 620px) {
  .workspace.chat { padding: 8px 8px 10px; }
  .msg { max-width: 90%; }
  #log { padding: 14px; }
}
