.hodhod-answer-card{border:1px solid var(--border,#c4d9e433);border-inline-start:3px solid #28b7d5;background:linear-gradient(135deg,#20bfe908,transparent);border-radius:16px;padding:16px 20px;margin:14px 0}.hodhod-answer-card h1,.hodhod-answer-card h2,.hodhod-answer-card h3,.hodhod-answer-card h4,.hodhod-response-form h3{display:flex;align-items:center;gap:10px;margin-top:0;font-size:1.06em}.hodhod-answer-card svg,.hodhod-response-form svg{color:#1fa9c9;flex-shrink:0}.markdown-body>ol>li{padding:9px 12px;margin:7px 0;border-radius:10px;background:#20bfe90a}.hodhod-response-form{font:inherit;color:inherit;background:var(--card,var(--panel,#20bfe90a));border:1px solid #28b7d544;border-radius:18px;padding:20px;margin:18px 0;direction:rtl;white-space:normal}.hodhod-form-field{margin:16px 0}.hodhod-form-field>label{display:block;margin-bottom:7px;font-weight:600}.hodhod-form-field input:not([type=checkbox]):not([type=radio]),.hodhod-form-field textarea,.hodhod-form-field select{font:inherit;color:inherit;background:var(--bg,#20bfe908);border:1px solid var(--border,#28b7d555);border-radius:10px;padding:10px 12px;width:100%;box-sizing:border-box}.hodhod-form-field select option{background:var(--bg,#fff);color:var(--text,#172d40)}.hodhod-form-field textarea{resize:vertical}.hodhod-form-field fieldset{border:0;padding:0;display:flex;gap:10px;flex-wrap:wrap}.hodhod-form-field legend{font-weight:600;margin-bottom:8px}.hodhod-form-field fieldset label{display:flex;align-items:center;gap:8px;padding:10px 12px;border:1px solid var(--border,#28b7d533);border-radius:10px;cursor:pointer}.hodhod-form-field input[type=checkbox],.hodhod-form-field input[type=radio]{width:18px;height:18px;accent-color:#1fa9c9}.hodhod-form-error{color:var(--danger,#d24a4a)}.hodhod-response-form button{font:inherit;border-radius:10px;cursor:pointer}.lab-messages{display:grid;gap:12px;margin-bottom:18px;max-height:520px;overflow:auto}.lab-message{white-space:pre-wrap;line-height:1.9;padding:16px;border:1px solid var(--border,#ddd);border-radius:14px}.lab-message.user{background:#20bfe90c}.lab-message.assistant{border-inline-start:3px solid #28b7d5}#labPreview textarea,#labPreview input{font:inherit;width:100%;box-sizing:border-box;margin-top:10px}#labPreview .draft-card{margin-top:12px}[hidden]{display:none!important}@media(max-width:600px){.hodhod-response-form,.hodhod-answer-card{padding:14px}.hodhod-form-field fieldset label{flex:1 1 100%}}

/* Compact message actions, keyboard accessible in both themes. */
.message-actions,.copy-actions{display:flex;align-items:center;gap:4px;}
.message-actions .hodhod-action-button,.copy-actions .hodhod-action-button{position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;min-width:32px;padding:7px;border:0;border-radius:9px;background:transparent;color:var(--muted,#8493a6);cursor:pointer;box-shadow:none;transition:background .15s,color .15s;}
.message-actions .hodhod-action-button:hover,.copy-actions .hodhod-action-button:hover{background:var(--soft,rgba(128,145,166,.12));color:var(--text,#9cacc0);}
.hodhod-action-button svg{display:block;flex:none;pointer-events:none;}
.hodhod-action-button:focus-visible{outline:2px solid var(--primary,#39a5d8);outline-offset:2px;}
.hodhod-action-button::after{content:attr(data-tooltip);position:absolute;bottom:calc(100% + 7px);left:50%;transform:translateX(-50%);padding:5px 9px;border-radius:7px;background:#18212e;color:#fff;font:12px/1.5 Vazirmatn,Tahoma,sans-serif;white-space:nowrap;pointer-events:none;opacity:0;visibility:hidden;z-index:20;}
.hodhod-action-button:hover::after,.hodhod-action-button:focus-visible::after{opacity:1;visibility:visible;}
@media(prefers-reduced-motion:reduce){.hodhod-action-button{transition:none;}}

/* Readable rich answers and horizontally scrollable tables. */
.lab-messages,.lab-message,.markdown-body,.hodhod-answer-card{min-width:0;}
.markdown-body{line-height:1.95;overflow-wrap:anywhere;}
.markdown-body p{margin:10px 0;}
.hodhod-table-scroll{display:block;width:100%;max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;margin:16px 0;border:1px solid var(--line,var(--border,#cbd5e1));border-radius:14px;background:var(--panel,var(--surface,#fff));}
.markdown-body .hodhod-table-scroll table{display:table;width:100%;min-width:440px;border-collapse:collapse;table-layout:auto;margin:0;background:transparent;color:inherit;font-size:.94em;line-height:1.8;}
.markdown-body .hodhod-table-scroll th,.markdown-body .hodhod-table-scroll td{padding:12px 16px;text-align:start;vertical-align:top;border:0;border-bottom:1px solid var(--line,var(--border,#dbe5ef));white-space:normal;overflow-wrap:anywhere;min-width:100px;max-width:420px;}
.markdown-body .hodhod-table-scroll th{font-weight:700;background:#e8f0fc;color:#1f4770;}
.markdown-body .hodhod-table-scroll tr:nth-child(even) td{background:#f2f7fc;}
.markdown-body .hodhod-table-scroll tbody tr:hover td{background:#e8f4fa;}
.markdown-body .hodhod-table-scroll tbody tr:last-child td{border-bottom:0;}
[data-theme=dark] .markdown-body .hodhod-table-scroll th{background:#17324b;color:#c8ecff;}
[data-theme=dark] .markdown-body .hodhod-table-scroll tr:nth-child(even) td{background:#112235;}
[data-theme=dark] .markdown-body .hodhod-table-scroll tbody tr:hover td{background:#173046;}
.hodhod-answer-card{color:inherit;background:linear-gradient(115deg,rgba(42,149,196,.07),transparent);border-color:var(--line,var(--border,#d2e0eb));}
.hodhod-answer-card:nth-of-type(3n+2){border-inline-start-color:#8b78d9;}.hodhod-answer-card:nth-of-type(3n+3){border-inline-start-color:#27ae96;}
.hodhod-answer-card h1,.hodhod-answer-card h2,.hodhod-answer-card h3,.hodhod-answer-card h4{color:var(--text,inherit);line-height:1.7;}
.markdown-body blockquote{margin:16px 0;padding:12px 18px;border-inline-start:3px solid #9a83de;border-radius:10px;background:rgba(134,110,192,.07);}
.lab-message.assistant,.message.assistant,.msg.assistant{animation:hodhod-message-in .24s ease-out;}
@keyframes hodhod-message-in{from{opacity:.35;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.lab-message.assistant,.message.assistant,.msg.assistant{animation:none;}}

/* Main website dark tables: explicit colors, independent of admin variables. */
[data-theme=dark] .chat-main .hodhod-table-scroll{background:#102235;border-color:#2b435c;}
[data-theme=dark] .chat-main .markdown-body .hodhod-table-scroll table{color:#e6eff9;background:#102235;}
[data-theme=dark] .chat-main .markdown-body .hodhod-table-scroll td{background:#102235;color:#e6eff9;border-bottom-color:#2b435c;}
[data-theme=dark] .chat-main .markdown-body .hodhod-table-scroll th{background:#1b3a53;color:#d4efff;border-bottom-color:#35576e;}
[data-theme=dark] .chat-main .markdown-body .hodhod-table-scroll tr:nth-child(even) td{background:#152b40;}
[data-theme=dark] .chat-main .markdown-body .hodhod-table-scroll tbody tr:hover td{background:#1b3850;}

.markdown-body code.hodhod-persian-inline{font-family:Vazirmatn,Tahoma,Arial,sans-serif;direction:rtl;unicode-bidi:isolate;font-size:inherit;letter-spacing:normal;white-space:normal;}
