.chat-document-chip { position: relative; display: inline-flex; max-width: 100%; border: 1px solid #64748b55; border-radius: 10px; background: #64748b12; }
.chat-document-open { min-width: 0; padding: 12px 38px 12px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 0; background: transparent; color: inherit; cursor: pointer; text-align: left; }
.chat-document-remove { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; }
.chat-document-remove, .chat-document-close { border: 0; border-radius: 6px; background: transparent; color: inherit; font-size: 24px; cursor: pointer; }
.chat-document-remove:hover, .chat-document-close:hover, .chat-document-open:hover { background: #64748b20; }
.chat-document-dialog { margin: auto; box-sizing: border-box; width: min(860px, calc(100vw - 24px)); max-height: 85dvh; padding: 20px; border: 1px solid #64748b55; border-radius: 14px; background: var(--bg-primary, #fff); color: var(--text-primary, #1e293b); box-shadow: 0 20px 60px #0004; }
.chat-document-dialog[open] { display: flex; flex-direction: column; }
.chat-document-dialog::backdrop { background: #0008; }
.chat-document-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.chat-document-dialog-header strong { overflow-wrap: anywhere; min-width: 0; }
.chat-document-close { flex-shrink: 0; width: 36px; height: 36px; }
.chat-document-dialog p { margin: 10px 0; flex-shrink: 0; opacity: .65; font-size: 12px; }
.chat-document-dialog pre { overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; min-height: 80px; margin: 0; line-height: 1.65; font-size: 14px; user-select: text; }
