/* file-attach.css -- OCA Team Dashboard v2
   Attachment chip style and chips tray inside the composer.
   No em-dashes.
*/

/* ---- Chips tray (sits above the textarea inside .composer-card) ---- */
.file-attach__chips-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 0 2px;
  /* Hidden when empty -- flex with no children collapses naturally */
}

.file-attach__chips-tray:empty {
  display: none;
}

/* ---- Individual chip ---- */
.file-attach__chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-1);
  font-family: Manrope, sans-serif;
  font-size: 12px;
  color: var(--ink-2);
  max-width: 220px;
  transition: border-color 0.15s, background 0.15s;
}

.file-attach__chip.is-uploading {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
  animation: file-attach-pulse 1.2s ease-in-out infinite;
}

.file-attach__chip.is-uploaded {
  border-color: var(--border);
  background: var(--surface-0);
  color: var(--ink-1);
}

.file-attach__chip.is-error {
  border-color: var(--red);
  background: rgba(159, 10, 55, 0.06);
  color: var(--red);
}

@keyframes file-attach-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}

/* ---- Chip filename ---- */
.file-attach__chip-name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
  flex-shrink: 1;
}

/* ---- Chip size ---- */
.file-attach__chip-size {
  font-size: 10.5px;
  color: var(--ink-3);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Remove button ---- */
.file-attach__chip-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.1s, color 0.1s;
}

.file-attach__chip-remove:hover {
  background: var(--hover-strong);
  color: var(--ink-1);
}
