/* الأستاذ المساعد */
.tchat{padding:10px;display:flex;flex-direction:column;gap:8px}
.tlink{background:none;border:0;padding:0 4px;font:inherit;color:var(--pri2);text-decoration:underline;cursor:pointer}.tlink[hidden]{display:none}
.tlog{position:relative;height:58vh;height:calc(100dvh - 340px);min-height:240px;max-height:640px;overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column;gap:10px;padding:6px 2px;background:#f8fbfb;border:1px solid var(--line);border-radius:12px}
.tmsg{display:flex;gap:6px;align-items:flex-end;max-width:92%;padding:0 6px}
.tme{align-self:flex-end}
.tbot{align-self:flex-start}
.tmsg .tb{padding:9px 12px;border-radius:14px;line-height:1.75;font-size:16px;overflow-wrap:anywhere;white-space:normal}
.tme .tb{background:var(--pri);color:#fff;border-bottom-left-radius:4px;white-space:pre-wrap}
.tbot .tb{background:#fff;border:1px solid var(--line);border-bottom-right-radius:4px}
.twho{font-size:20px;line-height:1;flex:0 0 auto}
.terr .tb{background:#fff7ed;border-color:#fed7aa}
.tspk,.tretry{display:block;margin-top:6px;font-size:13px;padding:4px 10px}
.tspk[aria-pressed=true]{background:#fee2e2;border-color:#fca5a5}
.tdots{display:inline-flex;gap:4px;padding:4px 2px}.tdots i{width:7px;height:7px;border-radius:50%;background:var(--mut);opacity:.35;animation:tdot 1.2s infinite}
.tdots i:nth-child(2){animation-delay:.2s}.tdots i:nth-child(3){animation-delay:.4s}
@keyframes tdot{0%,60%,100%{opacity:.25;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}
@media (prefers-reduced-motion:reduce){.tdots i{animation:none;opacity:.6}}
.tempty .tlog{height:40vh;height:calc(100dvh - 500px);min-height:200px}
.tchips{margin:0}.tchips[hidden]{display:none}
.tform{display:flex;gap:8px;align-items:flex-end}
.tform textarea{flex:1;min-width:0;resize:none;font:inherit;font-size:16px;line-height:1.5;padding:9px 12px;border:1px solid var(--line);border-radius:12px;max-height:140px;background:#fff;color:var(--ink)}
.tform textarea:focus{outline:3px solid #f59e0b;outline-offset:1px}
.tsend{flex:0 0 auto;font-size:15px;padding:9px 14px}.tsend:disabled{opacity:.6;cursor:wait}
.tnote{margin:0;color:var(--mut)}
