/* Attachments in the composer: paperclip button over one tray. */
.composer.att-on { position: relative; }
.att-wrap { display: grid; gap: 6px; }
.att-wrap:has(.att-tray[hidden]):has(.att-hint[hidden]) { display: none; }
.att-tray { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 2px 3px 3px 0; list-style: none; }
.att-tray[hidden] { display: none; }
.att-chip { display: flex; align-items: center; gap: 8px; width: min(244px, 100%); min-width: 0; padding: 6px 6px 6px 7px; border: 1.5px solid var(--tdtu-blue-200); border-radius: var(--radius-md); background: var(--paper); }
.att-thumb { display: grid; place-items: center; flex: none; width: 36px; height: 36px; overflow: hidden; border: 2px solid var(--v-ink); border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--v-ink); }
.att-thumb .ic { width: 17px; height: 17px; }
.att-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.att-body { display: grid; flex: 1; min-width: 0; }
.att-name { overflow: hidden; color: var(--heading); font-size: 13px; line-height: 18px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.att-meta { overflow: hidden; color: var(--gray-700); font-size: 12px; line-height: 16px; white-space: nowrap; text-overflow: ellipsis; }
.att-bar { display: block; height: 6px; margin-top: 3px; overflow: hidden; border: 1px solid var(--v-ink); border-radius: 2px; background: var(--paper); }
.att-bar i { display: block; height: 100%; background: var(--primary); transition: width 150ms linear; }
.att-chip.is-error { width: min(330px, 100%); border-color: var(--tdtu-red-600); background: var(--tdtu-red-100); }
.att-chip.is-error .att-thumb { border-color: var(--tdtu-red-600); color: var(--tdtu-red-600); background: var(--paper); }
.att-chip.is-error .att-meta { color: var(--tdtu-red-600); font-weight: 700; }
.att-err { color: var(--text); font-size: 12px; line-height: 16px; }
.att-retry { flex: none; height: 28px; padding: 0 9px; border: 1.5px solid var(--v-ink); border-radius: var(--radius-sm); background: var(--paper); color: var(--v-ink); font-size: 12.5px; font-weight: 700; transition: background var(--duration-fast); }
.att-retry:hover { background: var(--v-cream); }
.att-x { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: var(--radius-sm); color: var(--v-ink); transition: background var(--duration-fast); }
.att-x:hover { background: var(--v-yellow); }
.att-x .ic { width: 14px; height: 14px; }
.att-hint { margin: 0; color: var(--tdtu-red-600); font-size: 13px; line-height: 18px; font-weight: 500; }
.att-hint[hidden] { display: none; }
.att-btn { transition: transform var(--duration-fast), box-shadow var(--duration-fast), border-color var(--duration-fast), background var(--duration-fast); }
.att-btn { display: grid; place-items: center; flex: none; width: 40px; height: 40px; margin-bottom: 2px; border: 2px solid var(--v-ink); border-radius: var(--radius-md); background: var(--paper); box-shadow: 2px 2px 0 var(--v-ink); color: var(--v-ink); }
.att-btn .ic { width: 19px; height: 19px; }
.att-btn:hover:not(:disabled) { background: var(--v-cream); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--v-ink); }
.att-btn:disabled { border: 1.5px dashed var(--tdtu-blue-300); background: var(--paper); box-shadow: none; color: var(--gray-600); transform: none; cursor: not-allowed; }
.att-drop { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; border: 2px dashed var(--v-ink); border-radius: inherit; background: var(--v-yellow); color: var(--tdtu-blue-800); font-size: 15px; font-weight: 700; pointer-events: none; }
.att-drop[hidden] { display: none; }
.att-sent { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin: 0 0 6px; padding: 0; list-style: none; }
.att-sent li { display: flex; align-items: center; gap: 6px; max-width: 240px; padding: 3px 9px 3px 6px; border: 1.5px solid var(--tdtu-blue-200); border-radius: var(--radius-sm); background: var(--paper); color: var(--heading); font-size: 12.5px; line-height: 18px; font-weight: 600; }
.att-sent li > span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.att-sent .ic { display: block; width: 14px; height: 14px; }
