/* Prompt attachment chips and the file-drop mark, shared by every
   composer that asks the model. */

.attachments {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
}
.attachments:empty { display: none; }
.attachment {
  position: relative;
  display: inline-flex;
}
.attachment-thumb {
  width: 3.4rem;
  height: 3.4rem;
  object-fit: cover;
  border-radius: .5rem;
  border: 1px solid var(--line);
}
.attachment-remove {
  position: absolute;
  top: -.4rem;
  right: -.4rem;
  width: 1.15rem;
  height: 1.15rem;
  border: 0;
  border-radius: var(--control-radius);
  background: var(--failed);
  color: var(--on-danger);
  font-size: .6rem;
  line-height: 1;
  cursor: pointer;
}

/* Non-image attachments have nothing to show but their name. */
.attachment-name {
  display: inline-flex;
  align-items: center;
  max-width: 11rem;
  height: 3.4rem;
  padding: 0 .6rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .78rem;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: .5rem;
}

/* Marks a prompt attachment to be added to the project as well. */
.attachment { flex-direction: column; align-items: center; gap: .2rem; }
.attachment-share {
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface);
  color: var(--muted);
  font-size: .66rem;
  padding: .05rem .4rem;
  cursor: pointer;
}
.attachment-share[aria-pressed="true"] {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

[data-dropping] {
  border-color: var(--accent);
  background: var(--accent-soft);
}
