/* app/web/copilot_iframe.css
 * Explicit light-theme colors so the iframe renders the same regardless of
 * the host page's dark-mode preference (macOS prefers-color-scheme: dark
 * was inverting the body to black + leaving text at the default ~black,
 * making the chat unreadable). Setting both bg AND color removes that
 * dependency. */
:root { color-scheme: light; }
body { font: 14px/1.4 -apple-system, BlinkMacSystemFont, sans-serif; margin: 0;
       background: #ffffff; color: #1f2328; }
#copilot-root { display: flex; flex-direction: column; height: 100vh;
                background: #ffffff; color: #1f2328; }
header { padding: 8px 12px; background: #f4f4f6; border-bottom: 1px solid #ddd;
         color: #1f2328; }
header h1 { margin: 0; font-size: 14px; display: inline; color: #1f2328; }
#patient-banner { margin-left: 12px; color: #555; font-size: 12px; }
main { flex: 1; display: flex; flex-direction: column; padding: 8px;
       background: #ffffff; color: #1f2328; }
#drop-zone { border: 2px dashed #ccc; border-radius: 6px; padding: 16px;
             text-align: center; color: #6a737d; background: #fafbfc;
             transition: background 0.15s; }
#drop-zone[data-state="dragover"] { background: #eef6ff; border-color: #58a; color: #1f2328; }
#drop-zone[data-state="uploading"] { background: #fffce8; border-color: #b80; color: #1f2328; }
#conversation { list-style: none; padding: 0; flex: 1; overflow-y: auto;
                margin: 8px 0; color: #1f2328; }
#conversation li { padding: 8px; border-bottom: 1px solid #eee; color: #1f2328; }
#conversation li.user { font-weight: 600; color: #1f2328; }
#conversation li.system { color: #6a737d; font-style: italic; }
#conversation li.assistant { color: #1f2328; }
.citation-chip { display: inline-block; padding: 1px 6px; margin: 0 2px;
                 background: #e8effa; color: #1f2328; border-radius: 4px;
                 cursor: pointer; font-size: 12px; }
.citation-chip:hover { background: #d6e3f7; }
#chat-form { display: flex; gap: 4px; padding: 4px 0; background: #ffffff; }
#chat-form input[type="text"] { flex: 1; padding: 6px; background: #ffffff;
                                color: #1f2328; border: 1px solid #ccc;
                                border-radius: 4px; }
#chat-form button[type="submit"] { padding: 6px 12px; background: #2da44e;
                                   color: #ffffff; border: 1px solid #2c974b;
                                   border-radius: 4px; cursor: pointer; }
#chat-form button[type="submit"]:hover { background: #2c974b; }
#paperclip { background: #ffffff; color: #1f2328; border: 1px solid #ccc;
             border-radius: 4px; cursor: pointer; padding: 4px 8px; }
dialog#bbox-modal { width: 90vw; height: 90vh; max-width: 1200px; padding: 0;
                    border: 1px solid #888; border-radius: 6px;
                    background: #ffffff; color: #1f2328; }
dialog#bbox-modal header { display: flex; justify-content: space-between;
                           align-items: center; padding: 8px 12px;
                           background: #f4f4f6; color: #1f2328; }
dialog#bbox-modal h2 { margin: 0; font-size: 14px; }
#bbox-modal-close { background: none; border: none; font-size: 20px;
                    cursor: pointer; color: #1f2328; }
#bbox-modal-canvas-wrapper { overflow: auto; height: calc(100% - 40px);
                             background: #ffffff; }
/* W2 KR5: pending-intake banner */
#pending-intakes-banner { background: #fffaeb; color: #5c3d00;
                          border-bottom: 1px solid #f6c662; padding: 6px 12px;
                          font-size: 13px; }
#pending-intakes-toggle { background: none; border: none; color: #5c3d00;
                          cursor: pointer; padding: 0; text-align: left;
                          font: inherit; width: 100%; }
#pending-intakes-toggle:hover { text-decoration: underline; }
#pending-intakes-count { font-weight: 700; }
#pending-intakes-list { list-style: none; padding: 4px 0 0 0; margin: 6px 0 0 0;
                        border-top: 1px dashed #f6c662; }
#pending-intakes-list li { padding: 3px 0; cursor: pointer; color: #5c3d00; }
#pending-intakes-list li:hover { text-decoration: underline; }
#pending-intakes-list li.acknowledged { color: #6a737d; text-decoration: line-through;
                                        cursor: default; }

/* W2 polish: per-type evidence card for non-DocumentReference citations. */
#bbox-modal-card { padding: 16px; color: #1f2328; font-size: 13px;
                   line-height: 1.5; max-width: 720px; }
#bbox-modal-card h3 { margin: 0 0 8px 0; font-size: 14px; color: #57606a; }
#bbox-modal-card dl { display: grid; grid-template-columns: 140px 1fr;
                      gap: 4px 12px; margin: 0; }
#bbox-modal-card dt { font-weight: 600; color: #57606a; }
#bbox-modal-card dd { margin: 0; color: #1f2328; word-break: break-word; }
#bbox-modal-card pre { background: #f6f8fa; padding: 8px; border-radius: 4px;
                       white-space: pre-wrap; margin: 8px 0 0 0;
                       font-family: ui-monospace, SFMono-Regular, monospace;
                       font-size: 12px; }
#bbox-modal-card .card-rid { color: #6a737d; font-size: 11px;
                             font-family: ui-monospace, SFMono-Regular, monospace;
                             margin-top: 8px; word-break: break-all; }
#bbox-modal-card .card-empty { color: #6a737d; font-style: italic; }

/* W2 Plan B confirm/reject UX (2026-05-08) — modal footer + banner state tags. */
#bbox-modal-footer { display: flex; align-items: center; justify-content: flex-end;
                     gap: 8px; padding: 8px 16px; border-top: 1px solid #d0d7de;
                     background: #f6f8fa; }
#bbox-modal-status { flex: 1; color: #57606a; font-size: 12px; }
#bbox-modal-confirm, #bbox-modal-reject { padding: 6px 14px; border-radius: 4px;
                     border: 1px solid #d0d7de; cursor: pointer; font-size: 13px; }
#bbox-modal-confirm { background: #2da44e; color: #fff; border-color: #2da44e; }
#bbox-modal-confirm:hover { background: #2c974b; }
#bbox-modal-confirm:disabled { background: #94d3a2; cursor: not-allowed; }
#bbox-modal-reject { background: #fff; color: #cf222e; border-color: #cf222e; }
#bbox-modal-reject:hover { background: #ffebe9; }
#bbox-modal-reject:disabled { color: #94a3b8; border-color: #d0d7de; cursor: not-allowed; }

#pending-intakes-list li.confirmed { color: #1a7f37; }
#pending-intakes-list li.confirmed::after { content: " ✓"; }
#pending-intakes-list li.rejected { color: #6a737d; text-decoration: line-through; }

/* W2 modal viewer UX (2026-05-08) — zoom toolbar in the modal header. */
#bbox-modal-toolbar { display: flex; gap: 4px; align-items: center; }
#bbox-modal-toolbar button { padding: 4px 10px; font-size: 13px;
                              background: #fff; color: #1f2328;
                              border: 1px solid #d0d7de; border-radius: 4px;
                              cursor: pointer; min-width: 28px; }
#bbox-modal-toolbar button:hover { background: #f3f4f6; }
#bbox-modal-toolbar button:active { background: #e5e7eb; }
#bbox-modal-toolbar #bbox-modal-zoom-out,
#bbox-modal-toolbar #bbox-modal-zoom-in { font-size: 16px; line-height: 1;
                                          padding: 2px 8px; min-width: 28px; }
