/* Page-specific layout only — colors, radii and component styles come from
   defuss-shadcn's tokens (core.css) and components (all.css). */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans, system-ui, sans-serif);
}

main.container { --layout-max: 48rem; }

.steps-list { margin: 0; padding-inline-start: 1.2rem; }

/* .alert sets display:flex, which would override the hidden attribute. */
.alert[hidden] { display: none; }

/* Rooms + connections: simple divided lists. */
.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}
.item-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
}
.item-list li + li { border-top: 1px solid var(--border); }
.item-list li.empty { color: var(--muted-foreground); }

/* Chat transcript. */
#messages {
  height: 20rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--muted);
}
#messages .empty { color: var(--muted-foreground); font-size: 0.875rem; }

.message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  align-self: flex-start;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--card-foreground);
}
.message.own {
  align-self: flex-end;
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.message .meta { font-size: 0.75rem; opacity: 0.7; }
.message .text { white-space: pre-wrap; word-break: break-word; }

#log {
  margin: 0;
  max-height: 12rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}
