/* NLDemos · chatbot */
@layer components{
/* 3. Chat */
.chat{display:grid;gap:.8rem;border:1px solid var(--line,#dbe2eb);border-radius:.8rem;padding:1rem;background:#f9fafc}
.chat-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:.5rem;align-items:center;color:var(--navy,#1d3557)}
.docs{display:flex;flex-wrap:wrap;gap:.35rem;align-items:center}
.doc{font-size:.72rem;background:white;border:1px solid var(--line,#dbe2eb);border-radius:.3rem;padding:.15rem .45rem}
.doc::before{content:"📄 "}
.chat-log{display:grid;gap:.6rem;align-content:start;min-block-size:16rem;max-block-size:24rem;overflow:auto;padding:.5rem;background:white;border:1px solid var(--line,#dbe2eb);border-radius:.6rem}
.msg{max-inline-size:85%;padding:.65rem .85rem;border-radius:.9rem;font-size:.92rem;line-height:1.5;animation:demo-pop .3s ease-out}
.msg.bot{background:#eef2f8;border-end-start-radius:.25rem;justify-self:start}
.msg.user{background:var(--navy,#1d3557);color:white;border-end-end-radius:.25rem;justify-self:end}
.msg.handoff{background:#fff6e5}
.msg p{margin:0}
.source{display:inline-block;margin-block-start:.45rem;font-size:.75rem;font-weight:650;color:#1a7a58;background:#e3f6ee;border-radius:.3rem;padding:.15rem .5rem}
.source.warn{color:#8a5a00;background:#ffecc7}
.dots{display:inline-flex;gap:.25rem}.dots i{inline-size:.45rem;block-size:.45rem;border-radius:50%;background:#8b99ad;animation:dot 1s infinite}.dots i:nth-child(2){animation-delay:.15s}.dots i:nth-child(3){animation-delay:.3s}
@keyframes dot{0%,80%,100%{opacity:.3;transform:none}40%{opacity:1;transform:translateY(-3px)}}
.chat-form{display:flex;gap:.5rem}.chat-form .button{flex-shrink:0}

}
@layer components{.chat-notice{margin:0;padding:.6rem .8rem;border:1px solid #f0c36d;background:#fff8e6;color:#6b4a00;border-radius:.55rem;font-size:.85rem;line-height:1.45}.chat-notice strong{color:#5a3e00}}
