.rag-chat-launcher { position: fixed; z-index: 1000; right: 24px; bottom: 24px; display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 18px; border: 0; border-radius: 30px; color: #fff; background: #122b49; box-shadow: 0 10px 30px #122b4938; font: 650 14px/1.2 'DM Sans', sans-serif; cursor: pointer; }
.rag-chat-launcher:hover { background: #087579; }
.rag-chat-launcher-icon { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: #122b49; background: #feb51a; font-size: 17px; }
.rag-chat-panel { position: fixed; z-index: 1001; right: 24px; bottom: 24px; display: flex; width: min(390px, calc(100vw - 28px)); height: min(570px, calc(100vh - 40px)); flex-direction: column; overflow: hidden; border: 1px solid #d5e0e1; color: #243542; background: #fff; box-shadow: 0 18px 55px #122b4930; font: 14px/1.5 'DM Sans', sans-serif; }
.rag-chat-panel[hidden], .rag-chat-launcher[hidden] { display: none; }
.rag-chat-header { display: flex; align-items: center; justify-content: space-between; min-height: 70px; padding: 13px 17px; color: white; background: #122b49; }
.rag-chat-header strong, .rag-chat-header small { display: block; }
.rag-chat-header strong { font-size: 15px; }
.rag-chat-header small { color: #c5d2d9; font-size: 11px; }
.rag-chat-close { width: 34px; height: 34px; border: 1px solid #668092; color: white; background: transparent; font-size: 23px; line-height: 1; cursor: pointer; }
.rag-chat-thread { display: flex; min-height: 0; flex: 1; flex-direction: column; gap: 12px; overflow-y: auto; padding: 16px; background: #fbfcfc; }
.rag-chat-empty { margin: auto; max-width: 230px; color: #6a7a83; text-align: center; }
.rag-chat-message { max-width: 90%; padding: 10px 12px; border: 1px solid #e0e8e8; background: white; }
.rag-chat-message-user { align-self: flex-end; border-color: #c2e2df; background: #eaf6f4; }
.rag-chat-message-label { display: block; margin-bottom: 3px; color: #087579; font-size: 10px; font-weight: 700; }
.rag-chat-message-body { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.rag-chat-citations { margin: 8px 0 0; padding: 7px 0 0 16px; border-top: 1px solid #e4eaea; color: #596b76; font-size: 11px; }
.rag-chat-error { align-self: flex-start; margin: 0; color: #873f3f; font-size: 12px; }
.rag-chat-retry { margin-left: 5px; padding: 3px 8px; border: 1px solid #c88d8d; color: #873f3f; background: white; cursor: pointer; }
.rag-chat-form { padding: 12px 14px 14px; border-top: 1px solid #e0e8e8; background: #fff; }
.rag-chat-form textarea { display: block; width: 100%; min-height: 56px; padding: 10px; border: 1px solid #cbd6d8; color: #172b39; background-color: #fff; color-scheme: light; caret-color: #087579; opacity: 1; resize: vertical; }
.rag-chat-form textarea::placeholder { color: #687984; opacity: 1; }
.rag-chat-form-footer { display: flex; min-height: 37px; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; }
.rag-chat-form-footer span { color: #667680; font-size: 11px; }
.rag-chat-form-footer button { min-height: 34px; padding: 7px 15px; border: 0; color: white; background: #087579; font-weight: 650; cursor: pointer; }
.rag-chat-form-footer button:disabled { opacity: .55; cursor: wait; }
.rag-chat-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.rag-chat-launcher:focus-visible, .rag-chat-close:focus-visible, .rag-chat-form button:focus-visible, .rag-chat-retry:focus-visible { outline: 3px solid #feb51a; outline-offset: 3px; }
@media (max-width: 520px) { .rag-chat-launcher { right: 15px; bottom: 15px; } .rag-chat-panel { right: 0; bottom: 0; width: 100vw; height: min(680px, 100dvh); border-right: 0; border-bottom: 0; } }
@media (prefers-reduced-motion: reduce) { .rag-chat-launcher, .rag-chat-panel { scroll-behavior: auto; transition: none; } }
