/* index.chat.css — public terminal site (index.html): terminal chat. One of the index.*.css files, linked in order from index.html. */
/* Two layers, so it is never a question of which rule wins: "page" holds the normal stylesheet rules, "element" holds exact
   styles for single elements. Anything in "element" beats anything in "page", whatever the selectors look like. */
@layer page, element;

@layer page {
/* ─────────────────────────────────────────
   TERMINAL CHAT
   ───────────────────────────────────────── */
.terminal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  font-size: 13px;
  max-height: 500px;
  display: flex;
  flex-direction: column;
}

.terminal-header {
  background: var(--bg-elevated);
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.terminal-status { display: flex; align-items: center; gap: 6px; }

.status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.terminal-body {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
  min-height: 200px;
  max-height: 400px;
}

.terminal-line { margin-bottom: 8px; word-wrap: break-word; white-space: pre-wrap; }
.terminal-line.visitor { color: var(--text); }
.terminal-line.visitor .visitor-name { color: var(--accent); margin-right: 2px; }
.terminal-line.host { color: var(--text-dim); padding-left: 2px; }
.terminal-line.system { color: var(--accent-dim); font-style: italic; font-size: 11px; }

.terminal-line.drop {
  color: var(--text-bright);
  font-size: 12px;
  padding: 6px 8px;
  margin: 6px 0;
  border-left: 2px solid var(--accent);
  background: rgba(139, 154, 60, 0.06);
  animation: dropFlash 1.5s ease;
}

@keyframes dropFlash {
  0% { background: rgba(139, 154, 60, 0.2); }
  100% { background: rgba(139, 154, 60, 0.06); }
}

.terminal-line.typing::after {
  content: '█';
  animation: blink 0.8s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.terminal-input-wrap {
  display: flex;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.terminal-prompt { padding: 10px 0 10px 12px; color: var(--accent); user-select: none; }

.terminal-input {
  flex: 1; background: none; border: none; color: var(--text);
  font-family: var(--font-mono); font-size: 13px; padding: 10px 8px; outline: none;
}

.terminal-input::placeholder { color: var(--text-dim); opacity: 0.5; }
}
