.chat-attachment {margin:3px 0 5px;max-width:100%}
.thread-media-summary {display:inline-flex;align-items:center;gap:5px;vertical-align:middle}
.thread-media-summary .ico {width:15px;height:15px;flex:none;color:inherit}
.chat-attachment figcaption {font-size:12px;line-height:1.35;margin-top:4px;overflow-wrap:anywhere}
.chat-attachment figcaption a {display:inline-block;padding:4px 0}
.compact-media .msg-body:empty {display:none}
.compact-media>.msg-meta {min-height:28px;padding-inline-start:32px;box-sizing:border-box}
.compact-media>.chat-attachment {margin-bottom:0}
.bubble.compact-media>.voice-note-figure {position:static}
.media-sr-only {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.media-options {position:absolute;z-index:2;inset-inline-start:5px;bottom:3px;line-height:1}
.bubble .media-options summary {display:grid;place-items:center;list-style:none;width:30px;height:28px;box-sizing:border-box;cursor:pointer;color:inherit;border-radius:15px}
.media-options summary::-webkit-details-marker {display:none}
.media-options summary svg {width:19px;height:19px}
.media-options summary:is(:hover,:focus-visible),.media-options[open] summary {background:var(--mv-selected);color:var(--mv-text)}
.media-options :is(summary,button,a):focus-visible {outline:2px solid var(--mv-focus-ring,var(--focus));outline-offset:2px}
.media-options-items {position:absolute;bottom:calc(100% + 3px);inset-inline-start:0;z-index:3;display:grid;min-width:154px;padding:4px;box-sizing:border-box;border-radius:9px;background:var(--mv-raised);color:var(--mv-text);border:1px solid var(--mv-border);box-shadow:0 3px 12px rgba(0,0,0,.32)}
.media-options:not([open]) .media-options-items {display:none}
.media-options.open-down .media-options-items {top:calc(100% + 3px);bottom:auto}
.media-options.align-end .media-options-items {inset-inline-start:auto;inset-inline-end:0}
.bubble .media-options-items :is(button,a) {display:flex;align-items:center;gap:8px;min-height:38px;padding:6px 10px;font:inherit;font-size:13px;line-height:1.2;text-decoration:none;color:inherit;background:transparent;border:0;border-radius:5px;cursor:pointer;opacity:1}
.media-options-items :is(button,a):hover {background:var(--mv-selected)}
.media-options-items .ico {width:15px;height:15px}
.msg-row:has(.media-options[open]) {position:relative;z-index:4}
.bubble.photo-stamp:not(:has(.media-load-error)) {padding:4px;min-width:88px}
.bubble.photo-stamp:not(:has(.media-load-error))>.chat-attachment-image {position:relative;margin:0}
.bubble.photo-stamp:not(:has(.media-load-error)) .msg-meta {position:absolute;bottom:8px;inset-inline-end:8px;margin:0;min-height:18px;padding:2px 5px;border-radius:6px;line-height:1.1;color:white;background:rgba(7,16,29,.76);pointer-events:none}
.bubble.photo-stamp:not(:has(.media-load-error)) .msg-meta .ico {color:white}
.bubble.photo-stamp:not(:has(.media-load-error)) .media-options {top:4px;bottom:auto;inset-inline-start:auto;inset-inline-end:4px}
.bubble.photo-stamp:not(:has(.media-load-error)) summary {color:white;background:rgba(7,16,29,.76)}
.photo-stamp .msg-author {padding:2px 4px}
.chat-attachment .media-load-error {margin:4px 0;font-size:12px}
.bubble:has(.chat-attachment-video) {width:min(88%,380px);max-width:100%}
.bubble .chat-attachment video {width:100%;height:auto;max-height:min(54dvh,420px);background:#090c10;object-fit:contain}
.bubble .chat-attachment img {width:auto;height:auto;max-height:min(48dvh,380px);object-fit:contain}
.bubble:has(.chat-attachment-audio) {width:min(88%,314px);max-width:100%}
.bubble .chat-attachment audio {display:block;width:100%;min-width:0}
.chat-audio-shell audio[hidden],.chat-audio-shell button[hidden] {display:none}
.bubble .chat-audio-shell audio[hidden],.composer .chat-audio-shell audio[hidden] {display:none}
.chat-audio-start {display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:7px 14px;border:1px solid currentColor;border-radius:22px;color:inherit;background:transparent;font:inherit;cursor:pointer}
.chat-audio-start::before {content:"▶";font-size:.85em}
:root:not([data-tema="claro"]) .chat-audio-start::before {color:var(--mv-blue)}
.chat-audio-start:disabled {opacity:.7;cursor:wait}
.composer .composer-media {display:block;max-width:100%;margin-block:4px;object-fit:contain}
.composer img.composer-media,.composer video.composer-media {max-height:min(16dvh,106px)}
.composer audio.composer-media {width:100%;height:35px}
