@layer components {
  /* Export: the cards on the left, the numbers of the thesis beside them; below each other in a narrow window */
  .export-layout {
    display: grid;
    gap: var(--space-3);
    align-items: start;

    & .card-panel {
      margin-block-end: 0;
    }
  }

  @media (min-width: 60rem) {
    .export-layout {
      grid-template-columns: minmax(0, 1fr) 18rem;
    }
  }

  /* A step after the download: the whole of it ticks it, with a round check */
  .export-step {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    /* The grey on hover reaches a little beyond the text, which stays in line with the card's */
    inline-size: calc(100% + 2 * var(--space-2));
    margin-inline: calc(-1 * var(--space-2));
    padding: var(--space-2);
    border: 0;
    border-radius: var(--radius-md);
    background: none;
    color: inherit;
    text-align: start;

    &:hover {
      background-color: var(--color-surface-soft);
    }

    /* Turbo disables it while the tick is saved: no grey flash */
    &:disabled {
      color: inherit;
      cursor: progress;
    }

    &[aria-pressed="true"] .export-step__title {
      color: var(--color-muted);
      text-decoration: line-through;
    }
  }

  .export-step__check {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    inline-size: 1.5rem;
    block-size: 1.5rem;
    border: var(--border-width-2) solid var(--color-border);
    border-radius: 50%;
    background-color: var(--color-surface-raised);
    color: transparent;
    --icon-size: 0.9rem;
    transition:
      background-color 0.2s ease,
      border-color 0.2s ease;

    .export-step:hover & {
      border-color: var(--color-blue-accent);
    }

    .export-step[aria-pressed="true"] & {
      border-color: var(--color-positive);
      background-color: var(--color-positive);
      color: var(--color-ink-inverted);
    }
  }

  /* How the file is set up: the term beside its value from a width on */
  @media (min-width: 40rem) {
    .export-setup-row {
      display: grid;
      grid-template-columns: 10rem minmax(0, 1fr);
      gap: var(--space-3);
    }
  }

  /* The numbers of the thesis: label and number in a row, a note below */
  .export-stats > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    column-gap: var(--space-2);
  }

  .export-stats__note {
    grid-column: 1 / -1;
  }
}
