/* Image-only messages: intrinsic image dimensions, no attachment card chrome. */
.workspace-shell .chat-msg-bubble:has(>.chat-image-message),.w-message .w-bubble:has(>.w-image){padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;min-width:0!important}
.workspace-shell .chat-msg .chat-image-message,.w-message .w-bubble>.w-image{display:block!important;width:max-content!important;max-width:100%!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;border-radius:8px!important}
.workspace-shell .chat-msg .chat-image-preview,.w-message .w-image>.w-image-preview{display:block!important;width:max-content!important;max-width:100%!important;min-width:0!important;height:auto!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;border-radius:8px!important;overflow:hidden!important;line-height:0!important}
.workspace-shell .chat-msg .chat-image-preview img,.w-message .w-image>.w-image-preview img{display:block!important;width:auto!important;height:auto!important;max-width:min(280px,60vw)!important;max-height:340px!important;margin:0!important;padding:0!important;border:0!important;border-radius:8px!important;background:transparent!important;object-fit:contain!important}

.local-outgoing{position:relative;display:flex;flex-direction:column;align-items:flex-end;gap:6px;margin:16px 0 16px auto;width:max-content;max-width:80%}
.local-outgoing>img{display:block;width:auto;height:auto;max-width:min(280px,60vw);max-height:340px;border-radius:8px}
.local-caption{white-space:pre-wrap;overflow-wrap:anywhere;padding:10px 14px;background:#f3f3f3;border-radius:12px;max-width:100%}
.local-outgoing>small{color:#8994a3;font-size:12px}
.local-pending{position:absolute;right:calc(100% + 10px);top:50%;color:#8994a3}
.local-retry{color:#d93025;background:transparent;border:0;cursor:pointer;font-size:12px}

/* Composer image previews follow the image, rather than a square file tile. */
.draft-file-grid .draft-file-card:has(>img){display:block;width:max-content;height:auto;max-width:180px;min-width:0;padding:0;border:0;border-radius:6px;background:transparent;overflow:visible;margin:4px 6px 2px 0}
.draft-file-grid .draft-file-card>img{display:block;width:auto;height:auto;max-width:180px;max-height:120px;border-radius:6px;object-fit:contain}
.draft-file-grid .draft-file-card:has(>img)>.draft-file-remove{top:-6px;right:-6px;width:20px;height:20px;line-height:18px;font-size:16px;box-shadow:0 1px 4px #0002}
.draft-file-grid .draft-file-card:has(>img)>.draft-file-status{position:static;display:block;width:100%;max-width:180px;margin-top:4px;border-radius:4px;white-space:normal}
