.attachment-preview-open { background:var(--conversation); }
.attachment-preview-open>.messages { display:none; }
.attachment-review { display:flex; flex:1; min-height:0; flex-direction:column; overflow:hidden; }
.attachment-review-heading { position:relative; display:flex; align-items:center; justify-content:center; flex-shrink:0; min-height:74px; padding:12px 64px; text-align:center; }
.attachment-review-heading>button { position:absolute; left:14px; top:14px; width:44px; padding:10px; border:0; background:transparent; }
.attachment-review-heading img { width:24px; height:24px; }
.attachment-review-heading>div { min-width:0; }
.attachment-review-heading strong { display:block; font-size:18px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.attachment-review-heading span { display:block; color:var(--muted); font-size:14px; margin-top:4px; }
.attachment-review-stage { display:flex; align-items:center; justify-content:center; flex:1; min-height:0; padding:12px 32px 24px; overflow:hidden; }
.attachment-review-stage>img { display:block; max-width:100%; max-height:100%; object-fit:contain; border-radius:8px; }
.attachment-document-page { box-shadow:0 2px 14px #0002; }
.attachment-file-details { display:flex; flex-direction:column; align-items:center; gap:14px; max-width:100%; padding:16px; text-align:center; color:var(--muted); overflow-wrap:anywhere; }
.attachment-file-details>img { width:72px; height:72px; }
.attachment-preview-open>.composer { display:flex; align-items:center; margin:0 24px 16px; padding:8px 12px; border:0; border-radius:12px; background:var(--surface); flex-shrink:0; }
.attachment-preview-open>.composer>.spelling-editor { order:1; flex:1; min-width:0; }
.attachment-preview-open>.composer textarea { border:0; background:transparent; min-height:44px; max-height:104px; }
.attachment-preview-open>.composer>.emoji-open { order:2; }
.attachment-preview-open>.composer>.image-attach,.attachment-preview-open>.composer>.composer-tool:not(.emoji-open),.attachment-preview-open>.composer>.composer-submit { display:none; }
.attachment-review-footer { display:flex; align-items:center; justify-content:space-between; gap:20px; border-top:1px solid var(--border); padding:16px 24px; flex-shrink:0; }
.attachment-thumbnails { display:flex; align-items:center; gap:12px; min-width:0; padding:6px; overflow-x:auto; }
.attachment-thumbnail { position:relative; flex:0 0 72px; height:72px; border:2px solid var(--input-border); border-radius:9px; }
.attachment-thumbnail.selected { border:3px solid var(--primary); }
.attachment-select { display:flex; flex-direction:column; align-items:center; justify-content:center; width:100%; height:100%; min-height:0; padding:3px; border:0; border-radius:6px; overflow:hidden; }
.attachment-select>img { width:100%; height:100%; min-height:0; object-fit:contain; }
.attachment-select>img[src$="archive.svg"] { width:30px; height:30px; }
.attachment-select small { font-size:10px; }
.attachment-remove { position:absolute; right:-7px; top:-7px; width:26px; height:26px; min-height:0; padding:4px; border-radius:50%; background:var(--surface); }
.attachment-remove img { width:16px; height:16px; }
.attachment-add { flex:0 0 64px; height:64px; padding:18px; border-radius:9px; background:transparent; }
.attachment-add img { width:26px; height:26px; }
.attachment-send { flex:0 0 64px; height:64px; border-radius:50%; padding:16px; }
.attachment-send svg { width:30px; height:30px; }
:root[data-theme="dark"] .attachment-review img[src$=".svg"],:root[data-theme="dark"] .attachment-review-footer img[src$=".svg"] { filter:invert(1); }
@media(max-width:650px) {
 .attachment-review-heading { min-height:58px; padding:8px 52px; }
 .attachment-review-heading>button { left:4px; top:6px; }
 .attachment-review-heading strong { font-size:15px; }
 .attachment-review-heading span { font-size:12px; }
 .attachment-review-stage { padding:8px 16px 12px; }
 .attachment-preview-open>.composer { margin:0 10px 8px; padding:2px 6px; }
 .attachment-review-footer { padding:8px 10px max(8px,env(safe-area-inset-bottom)); gap:8px; }
 .attachment-thumbnails { gap:10px; }
 .attachment-thumbnail { flex-basis:52px; height:52px; }
 .attachment-add { flex-basis:48px; height:48px; padding:12px; }
 .attachment-send { flex-basis:52px; height:52px; padding:10px; }
}
