/* Conversation attachments (plan M14-22): the files under a person's message, in the composer's file chip language (app.css
   `.file-chip`: 1px line, surface-2, 8px radius, 12px text), and their group in the workspace's Files tab (`.ws-files`).
   13px body, 32.5px controls; nothing inflated. */

/* The paperclip when attachments are not served or the conversation is full: a click says why. */
.cmp-attach[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.cmp-attach[aria-disabled="true"]:hover { background: none; }

.att-group { display: grid; justify-items: end; gap: 4px; max-width: min(760px, 100%); margin-top: 2px; }
.att-list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin: 0; padding: 0; list-style: none; }
.att-list > li { display: flex; min-width: 0; max-width: 100%; }
.att-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; width: 264px; max-width: 100%;
  min-height: 40px; padding: 5px 8px 5px 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink); font-size: 12px; line-height: 1.35; text-decoration: none;
}
a.att-card:hover { border-color: var(--line-strong); background: var(--sunken); }
a.att-card:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 1px; }
.att-card.failed { border-color: color-mix(in oklab, var(--crit) 40%, var(--line)); }
.att-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--surface); color: var(--ink-3); }
.att-card.failed .att-ic { color: var(--crit); }
.att-card.pending .att-ic { color: var(--accent); }
.att-thumb { display: block; width: 40px; height: 40px; overflow: hidden; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); }
.att-thumb img, .att-ws-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.att-text { display: grid; min-width: 0; }
.att-name { overflow: hidden; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.att-meta, .att-note, .att-state { overflow: hidden; color: var(--ink-3); font-size: 11.5px; white-space: nowrap; text-overflow: ellipsis; }
.att-note { white-space: normal; }
.att-card.failed .att-state { color: var(--crit); white-space: normal; }
.att-bar { margin-top: 3px; }
.att-dl { color: var(--ink-3); }
.att-x { width: 22px; height: 22px; }
.att-summary { margin: 0; font-size: 11.5px; color: var(--ink-3); text-align: right; }
.att-group:has(.att-card.failed) .att-summary { color: var(--crit); }
.att-link { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
.att-link:hover { text-decoration: underline; }

/* Workspace › Files: the attachments group above the documents. */
.att-ws-head { margin: 4px 0 -2px; font-weight: 600; text-transform: none; }
.att-ws-head:first-child { margin-top: 0; }
.att-ws li { grid-template-columns: 28px minmax(0, 1fr) auto; }
.att-ws li > .icon { justify-self: center; }
.att-ws-thumb { display: block; width: 28px; height: 28px; overflow: hidden; border-radius: 5px; border: 1px solid var(--line); background: var(--surface); }
.att-ws .icon-btn { display: grid; place-items: center; }

@media (max-width: 640px) {
  .att-card { width: min(264px, 100%); }
}
