/*
 * THE ATTACHMENT SURFACE: the pictures' grid, the documents' rows, then the host's verbs in a wrapping row.
 * `scroll` exists only when the caller bounds the files' height, so the bar stays pinned.
 */
@layer theme, base, lotics, components, utilities;
@layer lotics.tokens, lotics.reset, lotics.components;

@layer lotics.components {
  /* The value's whole width wherever it stands, so every row's ⋯ stands at the value's end. */
  .lotics-files-editor {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-self: stretch;
    min-width: 0;
    gap: var(--lotics-space-10);
  }

  /* The set holding files takes a drop over its whole height, laid out as the editor lays it. */
  .lotics-files-editor__drop {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    gap: var(--lotics-space-10);
  }

  .lotics-files-editor__scroll {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    max-height: var(--lotics-files-editor-grid-max);
    overflow-y: auto;
    gap: var(--lotics-space-10);
  }

  /* The documents under the pictures, edge to edge at the list's floor, as `FileRows` stands them. */
  .lotics-files-editor__rows {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
  }

  .lotics-files-editor__bar {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--lotics-space-8);
  }

  .lotics-files-editor__spacer {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex: 1;
    min-width: 0;
  }
}
