/* Play selected media before sending, without adding duplicate action bars. */
.mg-preview__cell--video video{width:100%;height:100%;object-fit:contain!important;background:#101722}
.mg-preview__cell--audio{display:flex;flex-direction:column;justify-content:center;gap:12px;padding:48px 12px 12px;min-height:160px;background:var(--panel,#fff)}
.mg-preview__cell--audio audio{width:100%;min-width:0;height:44px}
.mg-preview__cell--audio .mg-preview__doc-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.mg-preview__rm{min-width:44px!important;min-height:44px!important;display:grid;place-items:center;z-index:2;background:rgb(12 20 34 / .78)!important;color:#fff!important;border-radius:50%}
.mg-preview__rm:focus-visible{outline:3px solid var(--accent,#2563eb);outline-offset:2px}
#album-upload-summary{line-height:1.5;padding:8px 0}

/* The nested file badge must fit its shell, including the extension label. */
#view-chats #messages .file-chip__icon{
 width:44px;height:44px;flex:0 0 44px;border-radius:10px;
 background:transparent;box-shadow:none;
}
#view-chats #messages .file-chip__icon .file-badge{
 width:44px;height:44px;box-sizing:border-box;
}
#view-chats #messages .file-chip__icon .file-badge__glyph{
 flex:1 1 auto;min-height:0;padding:0;
}
#view-chats #messages .file-chip__icon .file-badge__ext{
 flex:0 0 16px;box-sizing:border-box;min-height:16px;
 padding:0 2px;line-height:16px;
}

/* Compact attachment menu over a softly dimmed chat. */
html .vy-attachment-menu{display:flex;align-items:flex-end;justify-content:flex-start;padding:12px 12px calc(82px + env(safe-area-inset-bottom)) var(--attachment-menu-left,12px);background:transparent!important;backdrop-filter:none!important}
html .vy-attachment-menu .vy-ask__scrim{background:rgb(6 12 24 / .36)!important;backdrop-filter:none!important}
html .vy-attachment-menu .vy-ask__card{position:relative;margin:0;width:280px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 106px);padding:10px;border:1px solid var(--border);border-radius:22px;background:var(--surface);box-shadow:0 14px 45px rgb(0 0 0 / .22);animation:attachment-enter .16s ease-out}
html .vy-attachment-menu .vy-ask__title{font-size:12px;line-height:18px;font-weight:600;color:var(--muted);padding:4px 12px;margin:0}
.vy-attachment-menu__choices{display:grid;gap:2px;margin-top:4px}
html .vy-attachment-menu .vy-ask__btn[data-attachment]{display:flex;align-items:center;gap:12px;min-height:48px;padding:10px 12px;text-align:left;border:0!important;border-radius:12px;background:transparent!important;color:var(--text)!important;box-shadow:none!important}
html .vy-attachment-menu .vy-ask__btn svg{color:var(--muted);width:22px;height:22px}
html .vy-attachment-menu .vy-ask__btn[data-attachment]:is(:hover,:focus-visible){background:var(--surface-2)!important}
html .vy-attachment-menu .vy-ask__btn[data-attachment="cancel"]{border-top:1px solid var(--border)!important;border-radius:0 0 12px 12px;color:var(--muted)!important}
@keyframes attachment-enter{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){html .vy-attachment-menu .vy-ask__card{animation:none}}
html.motion-off .vy-attachment-menu .vy-ask__card{animation:none}
