/* Loaded after page styles: shared conversation presentation, preserving IDs. */
.w3m-message { min-width:0; gap:6px; padding-block:10px; color:#252525; }
.w3m-message:not(.chat-message) { display:flex; flex-direction:column; align-items:stretch; }
.w3m-message[hidden],.tool-result.w3m-message:not(.is-visible) { display:none !important; }
.w3m-message .message-body { width:100%; min-width:0; }
.message.user.w3m-message,.assistant-bubble-user.w3m-message,.w3m-message.message-user .message-content { background:#f1f1f1; color:#252525; border-color:#ddd; }
.message.bot.w3m-message,.assistant-bubble-answer.w3m-message { background:#fff; color:#252525; border-color:#e2e2e2; box-shadow:none; }
.w3m-message .w3m-message-footer { display:flex; align-items:center; gap:10px; width:100%; margin:7px 0 0; color:#777; font-size:11px; line-height:1.5; }
.w3m-message-footer .message-avatar,.w3m-message-footer .assistant-avatar { position:static; display:inline-flex; align-items:center; justify-content:center; flex:0 0 22px; width:22px; height:22px; margin:0; border-radius:50%; overflow:hidden; background:#eee; color:#555; font-size:11px; }
.w3m-message-footer .message-avatar img { width:22px; height:22px; object-fit:contain; }
.w3m-message-footer .message-time { margin:0; }
.w3m-copy,.w3m-message-footer .message-copy { min-height:30px; border:0; border-radius:6px; padding:4px 8px; background:transparent; color:#666; font:inherit; cursor:pointer; }
.w3m-copy:hover,.w3m-message-footer .message-copy:hover { background:#eee; color:#222; }
.w3m-copy:focus-visible { outline:2px solid #666; outline-offset:2px; }
.w3m-message .assistant-loading { display:flex; position:static; flex-wrap:wrap; align-items:center; gap:12px; padding:0; }
.w3m-message .assistant-loading-timer { position:static; flex:0 0 auto; margin:0; direction:ltr; }
.w3m-message img,.w3m-message video { max-width:100%; }
.w3m-message audio { max-width:100%; }
.w3m-file-previews { display:flex; flex-wrap:wrap; gap:8px; margin-block:8px; }
.w3m-file-preview { display:flex; align-items:center; gap:6px; max-width:100%; padding:6px; border:1px solid #ddd; border-radius:8px; background:#fafafa; font-size:12px; }
.w3m-file-preview>span { overflow-wrap:anywhere; min-width:0; }
.w3m-file-preview img { width:36px; height:36px; object-fit:cover; border-radius:5px; }
.w3m-file-preview button { border:0; padding:6px; background:transparent; color:#555; font:inherit; }
/* The shared tray owns previews/removal; the legacy renderer still releases its URLs. */
.w3m-legacy-file-previews { display:none !important; }
@media(max-width:575px) { .w3m-message { padding-block:8px; } .w3m-message .w3m-message-footer { gap:8px; } }
@media(prefers-reduced-motion:reduce) { .w3m-message .assistant-loading-text { animation:none; } }
