/* The assistant sidebar: a bubble, a docked panel that pushes the content aside, full screen when narrow. */
.atlas-chat-bubble { position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--atlas-accent); box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.atlas-chat-panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: 380px; display: flex; flex-direction: column; background: var(--atlas-card); border-left: 1px solid var(--atlas-line); box-shadow: -8px 0 30px rgba(0, 0, 0, .08); }
.atlas-chat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--atlas-line); }
.atlas-chat-title { font-weight: 600; font-size: 15px; }
.atlas-chat-sub { font-size: 12px; color: var(--atlas-muted); margin-top: 2px; }
.atlas-chat-icon { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--atlas-line); background: transparent; color: inherit; cursor: pointer; font-size: 16px; line-height: 1; }
.atlas-chat-list { display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto; border-bottom: 1px solid var(--atlas-line); }
.atlas-chat-list button { flex: none; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--atlas-line); background: transparent; color: inherit; cursor: pointer; }
.atlas-chat-list button.active { background: var(--atlas-soft); font-weight: 600; }
.atlas-chat-log { flex: 1; overflow: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.atlas-chat-hint { font-size: 13px; color: var(--atlas-muted); }
.atlas-chat-msg { max-width: 92%; }
.atlas-chat-msg.user { align-self: flex-end; }
.atlas-chat-msg.user .atlas-chat-bubble-text { background: var(--atlas-accent); color: #fff; }
.atlas-chat-msg.error .atlas-chat-bubble-text { border: 1px solid var(--atlas-bad); color: var(--atlas-bad); background: var(--atlas-bad-bg); }
.atlas-chat-bubble-text { font-size: 13.5px; line-height: 1.5; padding: 9px 12px; border-radius: 12px; background: var(--atlas-soft); }
.atlas-chat-bubble-text p { margin: 0 0 .5em; } .atlas-chat-bubble-text p:last-child { margin: 0; }
.atlas-chat-thinking { color: var(--atlas-muted); font-style: italic; }
.atlas-chat-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.atlas-chat-cite { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--atlas-line); background: transparent; color: inherit; cursor: default; }
button.atlas-chat-cite { cursor: pointer; }
.atlas-chat-cite .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--atlas-muted); }
.atlas-chat-cite .dot.measured { background: var(--atlas-ok); } .atlas-chat-cite .dot.provided { background: var(--atlas-info); }
.atlas-chat-tools { width: 100%; font-size: 11.5px; color: var(--atlas-muted); }
.atlas-chat-tools summary { cursor: pointer; }
.atlas-chat-tools ul { margin: 4px 0 0; padding-left: 16px; }
.atlas-chat-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--atlas-line); }
.atlas-chat-form textarea { flex: 1; resize: none; font: 13.5px/1.4 inherit; padding: 8px 10px; border: 1px solid var(--atlas-line); border-radius: 10px; background: var(--atlas-card); color: inherit; }
.atlas-chat-form button { border: 0; border-radius: 10px; padding: 0 14px; background: var(--atlas-accent); color: #fff; font-weight: 600; cursor: pointer; }
.atlas-pointed { outline: 3px solid var(--atlas-accent); outline-offset: 4px; transition: outline-color .6s; }
@media (min-width: 1024px) { body.atlas-chat-open .fi-main-ctn { margin-right: 380px; transition: margin-right .2s; } }
@media (max-width: 1023px) { .atlas-chat-panel { width: 100%; } }
[x-cloak] { display: none !important; }
