/* web/chat-widget.css */
#cj-chat-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 9998;
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: #0078d4; color: #fff; font-size: 26px; cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); transition: transform .15s ease;
}
#cj-chat-fab:hover { transform: scale(1.05); }
#cj-chat-panel {
  position: fixed; right: 20px; bottom: 90px; z-index: 9999;
  width: 360px; max-width: calc(100vw - 40px); height: 520px; max-height: 70vh;
  background: #1e1e1e; color: #f1f1f1; border-radius: 12px;
  display: none; flex-direction: column; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
#cj-chat-panel.open { display: flex; }
#cj-chat-header { padding: 12px 14px; background: #0078d4; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
#cj-chat-header button { background: transparent; color: #fff; border: none; font-size: 18px; cursor: pointer; }
#cj-chat-log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.cj-msg { padding: 8px 12px; border-radius: 10px; max-width: 85%; line-height: 1.4; font-size: 14px; white-space: pre-wrap; word-wrap: break-word; }
.cj-msg.user { background: #0078d4; color: #fff; align-self: flex-end; border-bottom-right-radius: 2px; }
.cj-msg.bot  { background: #2d2d2d; color: #f1f1f1; align-self: flex-start; border-bottom-left-radius: 2px; }
.cj-msg.bot .cj-cite { opacity: .6; font-size: 11px; }
#cj-chat-form { display: flex; border-top: 1px solid #333; padding: 8px; gap: 8px; }
#cj-chat-input { flex: 1; background: #2d2d2d; color: #fff; border: 1px solid #444; border-radius: 6px; padding: 8px 10px; font-size: 14px; }
#cj-chat-input:focus { outline: 2px solid #0078d4; outline-offset: -2px; }
#cj-chat-send { background: #0078d4; color: #fff; border: none; border-radius: 6px; padding: 0 14px; cursor: pointer; font-weight: 600; }
#cj-chat-send:disabled { opacity: .5; cursor: not-allowed; }
.cj-typing::after { content: '▍'; animation: cj-blink 1s steps(2, start) infinite; }
@keyframes cj-blink { to { visibility: hidden; } }
