/* CHAT ROOM */ .chat-room { display: flex; flex-direction: column; border: 1px solid var(--border); background: var(--light-background); } /* The log scrolls, the composer does not. A fixed height rather than a growing page is what lets the island keep the newest message in view without moving the thing the reader is typing into. */ .chat-log { list-style: none; margin: 0; padding: 0.5rem; height: 60vh; min-height: 15rem; overflow-y: auto; overscroll-behavior: contain; } .chat-message { display: flex; align-items: baseline; gap: 0.4rem; padding: 0.25rem 0.35rem; line-height: 1.45; } .chat-message:hover { background: var(--surface-alt); } .chat-avatar { align-self: center; border-radius: 50%; flex-shrink: 0; } .chat-author { font-weight: bold; color: var(--detail); white-space: nowrap; } .chat-time { font-family: "IBM Plex Mono", monospace; font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; } .chat-body { flex: 1; min-width: 0; overflow-wrap: anywhere; } /* Sent, not yet echoed back by the server. Dimmed rather than hidden: the message is on screen the instant it is typed, and the dimming is the only thing saying it is not confirmed. */ .chat-message.is-pending { opacity: 0.55; } .chat-message.is-failed { opacity: 1; border-left: 2px solid var(--danger); } /* Someone named this reader. A tint and a rule rather than anything louder: chat scrolls, the highlight has to survive being one of forty messages, and there is deliberately no notification behind it. */ .chat-message.is-mention { background: var(--surface-alt); border-left: 2px solid var(--highlight); } .chat-error { color: var(--danger); font-size: 0.85rem; } /* Delete, and the retry on a failed send. Both stay out of the way until the message is under the pointer, and both are always reachable by keyboard. */ .chat-remove, .chat-retry { background: none; border: 1px solid transparent; color: var(--text-muted); cursor: pointer; font-family: "IBM Plex Mono", monospace; font-size: 0.75rem; padding: 0 0.3rem; } .chat-remove { opacity: 0; margin-left: auto; } .chat-message:hover .chat-remove, .chat-remove:focus-visible { opacity: 1; } .chat-remove:hover, .chat-retry:hover { color: var(--danger); border-color: var(--border); } .chat-status { margin: 0; padding: 0.35rem 0.6rem; border-top: 1px solid var(--border); background: var(--surface-alt); color: var(--text-muted); font-size: 0.85rem; } .chat-composer { display: flex; gap: 0.5rem; padding: 0.5rem; border-top: 1px solid var(--border); } .chat-composer input[type="text"] { flex: 1; min-width: 0; background: var(--input-background); border: 1px solid var(--border); color: var(--detail); padding: 0.45rem 0.6rem; } .chat-notice { padding: 0.6rem; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.9rem; }