/* Additions for the Blade port: elements the original mockup did not need
   because it never uploaded a file or showed a real processing state. */
.upload-fields{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;max-width:720px;margin:0 auto 15px;text-align:left}
.upload-fields input,.upload-fields select{border:1px solid #dfe6ec;border-radius:8px;padding:9px;background:#fff;color:#334b60;font-size:10px;width:100%}
.upload-fields input[type=file]{grid-column:1/-1;padding:8px;background:#fbfcfd}
.upload-zone form,.upload-zone{position:relative}
.status.draft{color:#7b6a25;background:#fdf5e2;padding:5px 7px;border-radius:20px}
.status.processing{color:#1f6a92;background:#e9f3fb;padding:5px 7px;border-radius:20px}
.status.failed{color:#a8342b;background:#fdeceb;padding:5px 7px;border-radius:20px}
.row-menu.publish{color:#268a61;background:#eaf7f0;border-radius:8px;width:25px;height:25px;font-size:12px}
.not-available{padding:42px;text-align:center;color:#8a98a6}
.not-available .icon{margin:0 auto}
.not-available strong{display:block;color:#354b5f;font-size:13px;margin-top:10px}
.not-available p{font-size:11px;max-width:520px;margin:8px auto 0;line-height:1.7}
.source-chip{cursor:help;text-align:left}
.messages{scroll-behavior:smooth}
[dir="rtl"] .upload-fields{text-align:right}
@media(max-width:780px){.upload-fields{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.upload-fields{grid-template-columns:1fr}}
/* RTL corrections for the ported theme */
[dir="rtl"] .stat-card>div,[dir="rtl"] .file-main,[dir="rtl"] .setup-item>div,[dir="rtl"] .empty-activity>div{text-align:right}
[dir="rtl"] .table-row>span,[dir="rtl"] .table-empty,[dir="rtl"] .upload-zone{text-align:right}
[dir="rtl"] .upload-zone{text-align:center}
[dir="rtl"] .chat-launch,[dir="rtl"] .composer>div,[dir="rtl"] .card-heading{direction:rtl}
[dir="rtl"] .source-chip{text-align:right;direction:rtl}
[dir="rtl"] .bubble{border-radius:13px 4px 13px 13px}
[dir="rtl"] .message.user .bubble{border-radius:4px 13px 13px 13px}
[dir="rtl"] .budget-head,[dir="rtl"] .table-toolbar{direction:rtl}
[dir="rtl"] .context-card label,[dir="rtl"] .settings-card label{text-align:right}
/* Attachment controls in the chat composer */
.composer-actions{display:flex;align-items:center;gap:7px}
.attach-button{border:1px solid #d6e0e7;background:#fff;color:#2b6a8c;width:34px;height:34px;border-radius:9px;display:grid;place-items:center}
.attach-button:hover{background:#f2f8fa;border-color:#b9d2df}
.attach-chip{display:inline-flex;align-items:center;gap:7px;background:#eef6f9;border:1px solid #d5e6ee;color:#1f5878;border-radius:8px;padding:5px 8px;margin-bottom:8px;font-size:10px;max-width:100%}
.attach-chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:280px}
.attach-chip button{border:0;background:none;color:#5b7d92;display:grid;place-items:center;padding:0}
.bubble-file{display:inline-flex;align-items:center;gap:5px;font-size:9px;color:#2b6a8c;background:#fff;border:1px solid #dbe7ee;border-radius:6px;padding:3px 6px;margin-bottom:7px}
.message.user .bubble-file{background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.3);color:#dbe9f5}
[dir="rtl"] .attach-chip,[dir="rtl"] .bubble-file{direction:rtl}
/* Rendered answer body: markdown headings, lists and KaTeX formulas */
.rich{font-size:12px;line-height:1.75}
.rich p{margin:0 0 9px}
.rich p:last-child{margin-bottom:0}
.rich h4,.rich h5,.rich h6{margin:14px 0 7px;font-size:12.5px;color:#16324e;font-weight:800}
.rich h4:first-child,.rich h5:first-child{margin-top:0}
.rich ul,.rich ol{margin:0 0 9px;padding-inline-start:20px}
.rich li{margin:3px 0}
.rich hr{border:0;border-top:1px solid #e2eaef;margin:12px 0}
.rich code{background:#eef3f6;border:1px solid #e0e8ee;border-radius:5px;padding:1px 5px;font-size:11px;color:#1f5878}
.rich strong{color:#12314c}
.message.user .rich strong{color:#fff}
.math-inline{display:inline-block;vertical-align:middle;margin:0 2px}
.math-block{display:block;overflow-x:auto;overflow-y:hidden;margin:11px 0;padding:9px 11px;background:#f7fafc;border:1px solid #e4ecf1;border-radius:9px;text-align:center}
.message.user .math-block{background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.25)}
.katex{font-size:1.02em}
.katex-display{margin:0}
[dir="rtl"] .rich{text-align:right}
[dir="rtl"] .rich ul,[dir="rtl"] .rich ol{padding-inline-start:20px}
/* Conversation history in the chat sidebar */
.history-card{max-height:330px;display:flex;flex-direction:column}
.history-empty{font-size:10px;color:#8a97a5;margin:9px 0 0;line-height:1.6}
.history-list{list-style:none;margin:9px 0 0;padding:0;overflow-y:auto}
.history-item{display:grid;grid-template-columns:1fr 22px;align-items:center;gap:4px;border-radius:8px;padding:2px}
.history-item:hover{background:#f4f8fa}
.history-item.current{background:#eaf4f8;box-shadow:inset 2px 0 #2fa9b5}
[dir="rtl"] .history-item.current{box-shadow:inset -2px 0 #2fa9b5}
.history-open{border:0;background:none;text-align:start;padding:7px 8px;display:grid;gap:2px;min-width:0}
.history-open strong{font-size:10.5px;color:#22415d;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-open small{font-size:9px;color:#8a97a5}
.history-delete{border:0;background:none;color:#9fb0be;display:grid;place-items:center;border-radius:6px;padding:3px}
.history-delete:hover{color:#c0483d;background:#fdeceb}
