/* Claude in Cut: the chat drawer (js/chat.js). Tokens only (tokens.css). */
.chatbtn { width: auto; padding: 0 10px; gap: 4px; }
.chatbtn.on { color: var(--hot); }
.chat { position: fixed; top: var(--bar-h); right: 0; bottom: 0; width: min(420px, 100vw); z-index: 40; display: flex; flex-direction: column;
  background: var(--panel); border-left: 1px solid var(--groove); box-shadow: var(--shadow-menu);
  transform: translateX(105%); transition: transform var(--t-panel) var(--ease); }
.chat.on { transform: none; }
.chathead { display: flex; align-items: center; gap: 8px; height: var(--tab-h); padding: 0 10px; border-bottom: 1px solid var(--groove); background: var(--body-lo); }
.chathead .title { color: var(--bright); font-weight: var(--fw-on); }
.chathead .dim { color: var(--dim); font-size: var(--fs-s); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.chathead .sp { flex: 1; }
.chatlog { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs); }
.chathello { color: var(--muted); line-height: 1.5; }
.chathello .dim { color: var(--dim); margin-top: 8px; font-size: var(--fs-s); }
.cmsg { padding: 8px 11px; border-radius: var(--r-l); line-height: 1.5; max-width: 92%; overflow-wrap: anywhere; }
.cmsg.me { align-self: flex-end; background: var(--sel); color: var(--blue-text); white-space: pre-wrap; }
.cmsg.ai { align-self: flex-start; background: var(--panel2); color: var(--text); }
.cmsg.ai p { margin: 0 0 6px; } .cmsg.ai p:last-child { margin: 0; }
.cmsg.ai ul, .cmsg.ai ol { margin: 4px 0; padding-left: 18px; }
.cmsg.ai table { border-collapse: collapse; font-size: var(--fs-s); } .cmsg.ai td, .cmsg.ai th { border: 1px solid var(--edge); padding: 2px 6px; }
.cmsg code, .ctool code { font-family: var(--mono); font-size: var(--fs-xs); }
.ctool { display: flex; align-items: center; gap: 7px; color: var(--dim); font-size: var(--fs-s); min-width: 0; }
.ctool code { color: var(--faint); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.ctool .cdot { flex: none; width: var(--led); height: var(--led); border-radius: 50%; background: var(--led-off); transition: background var(--led-fade); }
.ctool.ok .cdot { background: var(--ok); } .ctool.bad .cdot { background: var(--reject); }
.ctool.write { color: var(--text); }
.capprove { border: 1px solid var(--hot); border-radius: var(--r-l); padding: 10px 11px; background: var(--body-lo); display: flex; flex-direction: column; gap: 6px; }
.capprove .cq { color: var(--hot); font-size: var(--fs-s); font-weight: var(--fw-on); }
.capprove .cwhat { color: var(--bright); line-height: 1.45; overflow-wrap: anywhere; }
.capprove .cdet { color: var(--muted); margin-top: 4px; white-space: pre-wrap; font-size: var(--fs-s); }
.capprove .dim { color: var(--dim); font-size: var(--fs-s); }
.capprove .cbtns { display: flex; gap: 6px; color: var(--dim); font-size: var(--fs-s); }
.capprove.allowed { border-color: var(--ok); } .capprove.allowed .cbtns { color: var(--ok-text); }
.capprove.denied { border-color: var(--edge); opacity: .7; }
.cwait { color: var(--faint); font-size: var(--fs-s); }
.cwait::after { content: ""; display: inline-block; width: 1em; animation: cdots 1.2s steps(4) infinite; text-align: left; }
@keyframes cdots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.cerr { color: var(--danger-text); background: var(--danger-bg); border-radius: var(--r-m); padding: 6px 9px; font-size: var(--fs-s); }
.cmeta { color: var(--faint); font-size: var(--fs-xs); align-self: flex-start; }
.chatin { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--groove); background: var(--body-lo); }
.chatin textarea { flex: 1; resize: none; background: var(--well); color: var(--text); border: 1px solid var(--edge); border-radius: var(--r-m); padding: 7px 9px; font: inherit; }
.chatin textarea:focus { outline: none; border-color: var(--blue); }
.chatin .btn { align-self: flex-end; }
