/* ============================================================
   Document Vault (shared by desk staff and participants): placement only.
   The filter is the chips component, the search the search bar, every
   document a pane, the proof ledger rows, and every message a callout.
   This sheet owns the toolbar's stack, the card grid, and the frames the
   preview's media sits in.
   Reads only --t-* and --c-* tokens.
   ============================================================ */

@layer layout {
  /* Preview header: the title block takes the room the way-out leaves. */
  .documents .documents-intro { display: flex; flex-wrap: wrap; align-items: flex-start;
                                 justify-content: space-between; gap: var(--t-space-3); }
  .documents .documents-heading { flex: 1 1 14rem; min-inline-size: 0; }
  .documents .documents-back { flex-shrink: 0; }

  .documents .documents-toolbar { display: grid; gap: var(--t-space-3);
                                   grid-template-columns: minmax(0, 1fr); }

  .documents .documents-list { display: grid; gap: var(--t-space-4); }
  .documents .documents-grid { display: grid; gap: var(--t-space-4);
                                margin: 0; padding: 0; list-style: none;
                                grid-template-columns: 1fr; }
  @container (min-width: 34rem) { .documents .documents-grid { grid-template-columns: repeat(2, 1fr); } }
  @container (min-width: 54rem) { .documents .documents-grid { grid-template-columns: repeat(3, 1fr); } }

  .documents .documents-uploaded,
  .documents .documents-size,
  .documents .documents-author { margin: 0; }

  /* A card's badges label their own value; they hug their words rather than
     filling the card's column. */
  .documents .documents-grid .pane > .body > .badge { justify-self: start; }
  .documents .documents-actions { display: flex; flex-wrap: wrap; gap: var(--t-space-2);
                                   margin-block-start: var(--t-space-2); }

  .documents .documents-upload-form { display: grid; gap: var(--t-space-4); }

  /* The ledger's rows run to the pane's edges, so a message above them and
     a blank slate below keep their own room. */
  .documents .documents-proofs-notice { padding: var(--t-space-4) var(--t-space-5); }
  .documents .documents-proofs-empty { padding: var(--t-space-5); }
  .documents .documents-proof-mark { display: inline-flex; align-items: center;
                                      justify-content: center; flex: none;
                                      inline-size: var(--t-space-8); block-size: var(--t-space-8);
                                      border-radius: var(--t-radius-pill); }

  /* Preview media keeps its own frame inside the card. */
  .documents .documents-preview-image { inline-size: 100%; block-size: auto;
                                         border-radius: var(--t-radius-md); }
  .documents .documents-preview-frame { inline-size: 100%; block-size: 60vh; border: 0;
                                         border-radius: var(--t-radius-md); }
  .documents .documents-preview-action { justify-self: start; }
}

@layer design {
  .documents .documents-uploaded { font-size: var(--t-font-size-sm);
                                    color: var(--c-surface-text-color-muted); }
  .documents .documents-size,
  .documents .documents-author { font-size: var(--t-font-size-xs);
                                  color: var(--c-surface-text-color-muted); }
  .documents .documents-hash { font-family: var(--t-font-family-mono);
                                font-size: var(--t-font-size-xs);
                                color: var(--c-surface-text-color-muted);
                                overflow-wrap: anywhere; }
}
