.upload-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* File name and status above a full-width progress bar */
.upload-row {
  display: grid;
  grid-template-columns: minmax(6rem, 1fr) fit-content(65%);
  align-items: center;
  gap: var(--space-1) var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-s);
  background-color: var(--card-bg-color);

  /* A folder can have thousands of rows, so those out of sight aren't laid out */
  content-visibility: auto;
  contain-intrinsic-size: auto 5rem;

  .name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  progress {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    accent-color: var(--button-color);
  }

  .status {
    text-align: right;
  }

  .actions {
    grid-column: 1 / -1;
  }

  &.done .status {
    color: var(--notice-text-color);
  }

  &.failed .status {
    color: var(--alert-text-color);
  }
}

/* Keeps the file input reachable by keyboard while only the label shows */
.upload-queue label.button:focus-within {
  box-shadow: 0 0 var(--focus-glow-size) var(--focus-shadow-color);
}

/* The library or album the chosen files go to, picked beside its label */
.upload-destination {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--meta-text-color);

  select {
    min-width: 0;
    max-width: 100%;
    text-overflow: ellipsis;
  }
}
