/* Attaching images and files in the chats (web/attach.js): the paperclip, the files waiting to go, and the files a
   sent message carries. */
.mc-compose.has-attach textarea, .bot-compose.has-attach textarea { padding-left: 44px; }
.at-clip {
  position: absolute; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer;
}
.mc-compose .at-clip { left: 6px; bottom: 6px; }
.bot-compose .at-clip { left: 18px; bottom: 18px; }
.at-clip svg { width: 19px; height: 19px; }
.at-clip:hover:not(:disabled) { color: var(--fg); background: var(--surface-2); }
.at-clip:disabled { opacity: .4; cursor: default; }
.at-dropping textarea { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }

/* Waiting to go, above the box. */
.at-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.at-list[hidden] { display: none; }
.at-chip, .at-file {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 220px; box-sizing: border-box;
  padding: 4px 4px 4px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  font-size: 12.5px; line-height: 1.3; color: inherit; text-decoration: none;
}
.at-file { padding-right: 10px; }
.at-chip img { width: 36px; height: 36px; flex: none; border-radius: 6px; object-fit: cover; background: var(--surface-2); }
.at-ico { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.at-ico svg { width: 18px; height: 18px; }
.at-meta { display: grid; min-width: 0; }
.at-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.at-size { color: var(--muted); font-size: 11.5px; }
.at-chip.is-failed { border-color: color-mix(in srgb, var(--bad) 50%, var(--line)); }
.at-chip.is-failed .at-size { color: var(--bad); }
.at-chip.is-uploading img { opacity: .6; }
.at-x {
  width: 24px; height: 24px; flex: none; padding: 0; border: 0; border-radius: 50%; background: transparent;
  color: var(--muted); font-size: 17px; line-height: 1; cursor: pointer;
}
.at-x:hover { color: var(--fg); background: var(--surface-2); }

/* Sent with a message, above its words. */
.mc-user, .bot-me { flex-direction: column; align-items: flex-end; gap: 6px; }
.at-files { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-end; gap: 6px; max-width: 85%; }
.at-shot { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); line-height: 0; }
.at-shot img { display: block; max-width: 220px; max-height: 220px; width: auto; height: auto; object-fit: cover; }
.at-file:hover .at-name { text-decoration: underline; }
