/* Agent chat and Marketing → Chat (agent-chat/agent-chat.js; docs/agent-chat.md): the exact design replica (Oct 23, 2026),
   the design's AgentChatPage (src/app/pages.tsx). The page, header, chat card, lines, foot, cost line and rows are the
   shared design pieces (.ds-page--chat, .ds-chat-*, .ds-usage-note, .ds-compact-row in styles.css); this file adds only
   what the Hub has and the design doesn't (a long chat scrolls, the agent's draft note, the suggested questions, the
   working dots, errors) and what makes a textarea sit like the design's one-line box. Loaded after styles.css. Colours
   only from the tokens in styles.css. Every class here starts with ac-. */

/* A long chat scrolls inside the card; the lines still sit at its foot while there are few. */
.ac-list { max-height: calc(62 * var(--vh)); overflow-y: auto; overscroll-behavior: contain; }
.ac-list > :first-child { margin-top: auto; }
.ac-who .ic { width: 18px; height: 18px; }
.ac-say { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.ds-chat-message--user .ac-say { align-items: flex-end; }
.ac-msg p { white-space: pre-line; overflow-wrap: anywhere; }
.ac-msg--note { align-self: center; max-width: 100%; }
.ac-msg--note p { border: 1px solid var(--border); background: none; color: var(--text-3); text-align: center; }

/* A note the agent drafted for its next review: the agent's line, a small label above it and Save note under it. */
.ac-draft-l { padding: 0 4px; color: var(--text-3); font-size: .72rem; }
.ac-msg--draft p { border: 1px solid var(--border-strong); background: none; }
.ac-note { min-height: 36px; padding: 0 12px; }
.ac-saved { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px; color: var(--text-3); font-size: .78rem; }
.ac-saved .ic { width: 16px; height: 16px; }

/* An empty chat: the agent's opening line, then the three suggested questions as chips under it. */
.ac-intro { display: flex; flex-direction: column; gap: 12px; }
.ac-starts { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 44px; }
.ac-start { min-height: 36px; padding: 8px 13px; border: 0; font-size: .78rem; text-align: left; white-space: normal; cursor: pointer; }

/* Working: a soft dot and what the agent is doing. */
.ac-wait p { display: flex; align-items: center; gap: 8px; color: var(--text-3); }
.ac-dots { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); animation: ac-pulse 1.2s ease-in-out infinite; }
@keyframes ac-pulse { 50% { opacity: .25; } }
.ac-err { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ac-err p, .ac-send-err { margin: 0; color: var(--rt-bad); font-size: .84rem; }

/* The foot: a note above the box when there is one, then the box (one line tall, as the design's input) and Send. */
.ac-ask { background: var(--ds-raised); }
.ac-notes:not(:empty) { display: flex; flex-direction: column; gap: 4px; padding: 12px 15px 0; border-top: 1px solid var(--ds-line); }
.ac-notes:not(:empty) + .ds-chat-compose { border-top: 0; }
.ac-notes .meta { margin: 0; font-size: .78rem; }
.ds-page .ac-box { flex: 1; min-width: 0; min-height: 52px; max-height: calc(30 * var(--vh)); line-height: 1.5; resize: none; }
.ac-box::placeholder { color: var(--text-3); opacity: 1; }
.ac-send { flex: none; min-height: 52px; }
.ac-send .ic { width: 16px; height: 16px; }

/* Earlier chats: the design's rows, as buttons. */
.ac-history h2 { margin-bottom: 8px; }
.ac-chats { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.ac-chat { width: 100%; padding: 0; border-right: 0; border-bottom: 0; border-left: 0; border-radius: 0; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ac-chat:hover .ac-chat-t, .ac-chat.on .ac-chat-t { color: var(--link); }
.ac-chat-i { flex: none; width: 24px; height: 24px; }
.ds-compact-row .ac-chat-w { display: flex; flex: 1; flex-direction: column; min-width: 0; color: var(--text); font-size: inherit; }
.ac-chat-t { overflow-wrap: anywhere; }
.ac-chat-go { flex: none; width: 18px; height: 18px; }
.ac-all { margin-top: 6px; }

@media (prefers-reduced-motion: reduce) { .ac-dots { animation: none; } }
@media print { .ac-ask, .ac-history { display: none; } .ac-list { max-height: none; overflow: visible; } }
