/* Free attachments in private messages. Media always comes from the gated API. */
.message-media-button { display:grid; place-items:center; flex-shrink:0; width:40px; height:42px; min-width:40px; padding:8px; border:1px solid #ded6da; border-radius:6px; background:#fff; color:#713b53; }
.message-media-button:hover,.message-media-button[aria-pressed=true] { background:#f0e9ec; border-color:#a58493; }
.message-media-button .icon { width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:1.7; }
#directForm.chat-composer { grid-template-columns:44px 44px 44px minmax(0,1fr) 44px; }
#directForm.chat-composer>.message-media-button { grid-column:1; grid-row:2; }
#directForm.chat-composer>.emoji-picker-button { grid-column:2; grid-row:2; }
#directForm.chat-composer>.gif-picker-button { grid-column:3; grid-row:2; }
#directForm.chat-composer>.composer-hint { grid-column:4; grid-row:2; }
#directForm.chat-composer>.round-button { grid-column:5; grid-row:2; }
.message-media-draft { display:grid; flex-shrink:0; grid-template-columns:76px minmax(0,1fr); gap:12px; padding:14px 16px; border-top:1px solid #e4e0df; background:#f5f3f1; color:#211d24; }
.message-media-local-preview { display:block; width:76px; height:76px; object-fit:cover; border:1px solid #e3dcdf; border-radius:6px; background:#e8e1e5; }
.message-media-draft-copy { min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:5px; }
.message-media-draft-copy>strong { max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; font-weight:600; color:#352b35; }
.message-media-draft-copy>span { font-size:11px; line-height:1.5; color:#776a74; }
.message-media-remove,.message-media-cancel { padding:4px 0; min-height:32px; border:0; background:none; color:#713b53; font:500 12px/1.5 var(--sans,'DM Sans',sans-serif); text-align:left; text-decoration:underline; text-underline-offset:3px; }
.message-media-consent { grid-column:1/-1; display:flex; align-items:flex-start; gap:9px; font-size:11px; line-height:1.65; color:#6d5d68; }
.message-media-consent>input { flex-shrink:0; width:17px; height:17px; margin:1px 0 0; accent-color:#713b53; }
.message-media-progress { display:grid; flex-shrink:0; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:7px 14px; padding:12px 16px; border-top:1px solid #e4e0df; background:#fff; }
.message-media-status { margin:0; grid-column:1/-1; color:#66525f; font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
.message-media-progress>progress { width:100%; height:6px; accent-color:#713b53; }
.message-media-cancel { min-height:36px; white-space:nowrap; }
.message-attachment { max-width:100%; width:300px; margin:8px 0 3px; }
.message-attachment-open { display:block; width:100%; text-decoration:none; }
.message-attachment img { display:block; width:auto; max-width:100%; height:auto; max-height:340px; object-fit:contain; border-radius:7px; background:#e7e0e4; }
.message-attachment>video { display:block; width:100%; height:auto; max-height:340px; border-radius:7px; background:#211d24; }
.message-attachment-unavailable { display:block; padding:17px; border:1px solid #ddd0d7; border-radius:6px; background:#f4eef1; color:#6c4c60; font-size:12px; line-height:1.7; }
.direct-bubble.mine .message-attachment-unavailable { background:#fff1; border-color:#fff4; color:inherit; }
.call-text-row .message-attachment { width:260px; grid-column:1/-1; }
.message-reported-media { display:inline-flex; align-items:center; min-height:44px; margin-block:5px; color:#713b53; font-size:13px; text-decoration:underline; text-underline-offset:3px; }
@media(max-width:680px) {
  #directForm.chat-composer { column-gap:5px; }
  .message-media-button { width:44px; min-width:44px; padding:9px; }
  .message-media-draft { grid-template-columns:64px minmax(0,1fr); gap:10px; padding:12px; }
  .message-media-local-preview { width:64px; height:64px; }
  .message-media-consent { font-size:11px; }
  .message-media-progress { padding:11px 12px; }
  .message-attachment { width:260px; }
}
