/* Files that go out with an email, and the zone they're dropped on. */
.attachments {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.attachments__new {
  display: contents;
}

.attachments__file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-base-300);
  border-radius: 8px;
}

.attachments__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-primary);
}

.attachments__name {
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.attachments__size {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: color-mix(in oklab, var(--color-base-content) 60%, transparent);
}

.attachments__remove {
  margin-left: auto;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-error);
  cursor: pointer;
}

.attachments__zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 24px 16px;
  text-align: center;
  border: 2px dashed color-mix(in oklab, var(--color-base-content) 35%, transparent);
  border-radius: 10px;
}

.attachments__zone--over {
  border-color: var(--color-primary);
  background: color-mix(in oklab, var(--color-primary) 10%, transparent);
}

.attachments__upload {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
}

.attachments__drop-text {
  color: color-mix(in oklab, var(--color-base-content) 80%, transparent);
}

.attachments__drop-another {
  display: none;
}

.attachments__limits {
  font-size: 0.75rem;
  color: color-mix(in oklab, var(--color-base-content) 60%, transparent);
}

/* Once a file is in, the zone shrinks to a line for adding another. */
.attachments__file ~ .attachments__zone,
.attachments__new:not(:empty) ~ .attachments__zone {
  padding: 12px 16px;

  .attachments__upload,
  .attachments__limits,
  .attachments__drop-first {
    display: none;
  }

  .attachments__drop-another {
    display: inline;
  }
}
