/* ai.css — free conversation on the talk card ("Say something") and the memory block in the Rolodex.
   Palette and classes follow style.css: paper card, amber accents, serif for spoken lines. */

/* AI off: one muted line at the bottom of the talk card */
.ai-off{margin-top:14px;padding-top:12px;border-top:1px dashed #cdbfa3;font-style:italic;line-height:1.45}
.ai-off code{font-family:"Courier New",monospace;font-style:normal;background:#e6dcc4;padding:1px 5px;border-radius:2px;font-size:12px}

/* the section */
.ai-chat{margin-top:16px;padding-top:12px;border-top:1px dashed #cdbfa3}
.ai-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:800;color:#8a6a2e;margin-bottom:8px}
.ai-head .ai-left{font-weight:400;letter-spacing:.02em;text-transform:none;color:#6b5a48;font-size:12px;white-space:nowrap}

/* transcript: player lines right-aligned plain, NPC lines in the card's serif .line style */
.ai-log{max-height:230px;overflow:auto;display:flex;flex-direction:column;gap:8px;padding:2px 2px 6px;scroll-behavior:smooth}
.ai-log:empty{display:none}
.ai-you{align-self:flex-end;max-width:82%;font-size:14px;line-height:1.45;color:#241c16;background:#fff8e8;border:1px solid #cdbfa3;padding:8px 12px;border-radius:12px 12px 2px 12px;white-space:pre-wrap;word-break:break-word}
.card-body .ai-log .line.ai-npc{margin:0;font-size:16px;max-width:92%;align-self:flex-start}
.ai-npc .ai-name{display:block;font-family:var(--font);font-style:normal;font-size:10px;letter-spacing:.14em;text-transform:uppercase;font-weight:800;color:#8a6a2e;margin-bottom:2px}
.ai-aside{font-size:12px;color:#6b5a48;font-style:italic;padding-left:15px}
.ai-log .deltas{margin-top:0;padding-left:15px}

/* typing indicator */
.ai-wait{display:flex;gap:4px;padding:6px 0 4px 15px}
.ai-wait i{width:7px;height:7px;border-radius:50%;background:var(--amber);animation:aiblink 1.1s infinite ease-in-out}
.ai-wait i:nth-child(2){animation-delay:.18s}
.ai-wait i:nth-child(3){animation-delay:.36s}
@keyframes aiblink{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}

/* suggested openers */
.ai-chips{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.ai-chip{background:transparent;border:1px solid #cdbfa3;color:#6b5a48;font-size:12px;padding:5px 10px;border-radius:14px;cursor:pointer;transition:.15s;text-align:left}
.ai-chip:hover{border-color:var(--amber);color:#241c16;background:#fff8e8}
.ai-chip[disabled]{opacity:.45;cursor:not-allowed}

/* input row */
.ai-row{display:flex;gap:8px}
.ai-row input{flex:1;min-width:0;font:inherit;font-size:14px;padding:9px 12px;border:1px solid #cdbfa3;background:#fff;color:#241c16;border-radius:3px}
.ai-row input::placeholder{color:#a08f78}
.ai-row input:focus{outline:none;border-color:var(--amber);box-shadow:0 0 0 2px rgba(224,163,67,.25)}
.ai-row input[disabled]{background:#efe6d3;color:#8a7a66}
.ai-row .btn{padding:9px 14px;flex:none}

/* inline notice (errors), never a modal */
.ai-note{margin-top:8px;font-size:12px;line-height:1.4;color:var(--red);border-left:3px solid var(--red);padding:6px 10px;background:rgba(184,58,46,.07)}

/* Rolodex: what they remember, and the last exchanges */
.rolo .ai-mem{margin-top:10px}
.rolo .ai-mh{font-size:10px;letter-spacing:.14em;text-transform:uppercase;font-weight:800;color:#8a6a2e;margin:6px 0 4px}
.rolo .ai-mem ul{margin:0 0 6px;padding-left:18px;font-size:13px;line-height:1.4}
.rolo .ai-ex{font-size:12px;line-height:1.4;margin:3px 0;word-break:break-word}
.rolo .ai-ex.assistant{font-family:var(--serif);font-style:italic}
.rolo .ai-ex .muted{font-size:11px;font-style:normal;font-family:var(--font)}

/* ---- the chat row inside the conversation band (#convo .cv-chat) and the Person tab of the master menu.
   UI-DESIGN §2.5: chatHtml/wireChat moved out of the talk card into the band; the Rolodex became .pt. */
.cv-chat .ai-chat{border-top:1px dashed var(--rule,#cdbfa3)}
.cv-chat .ai-log .line.ai-npc{margin:0;font-size:var(--fs-body,15px);max-width:92%;align-self:flex-start;
  font-family:var(--serif);font-style:italic;border-left:3px solid var(--amber);padding-left:10px}
.cv-chat .ai-head{margin-bottom:6px}
.cv-chat .ai-chips{margin:6px 0}
.cv-chat .ai-chips.hidden{display:none}
.cv-chat .ai-row input{font-size:var(--fs-body,14px);padding:7px 10px}
.cv-chat .ai-row .btn{padding:7px 12px}
.cv-chat .ai-you{font-size:var(--fs-small,13px);padding:6px 10px}
.pt .ai-off{margin-top:0;padding-top:0;border-top:0}
.pt .ai-ex{font-size:var(--fs-small,12px);line-height:1.4;margin:3px 0;word-break:break-word}
.pt .ai-ex.assistant{font-family:var(--serif);font-style:italic}
.pt .ai-ex .muted{font-size:11px;font-style:normal;font-family:var(--font)}
