/* A thread's preview in its dialog over Mail (email_threads/previews/show;
   docs/planning/email-ux.md, ruling 13): the frame, a column, fills the
   dialog's one height, and its action row — or its reply's — stands at the
   foot: in reach however long the thread, and in the same place whatever
   thread J brings. The row's paper hides the words scrolling under it. */
@layer components {
  .mail-preview {
    min-block-size: 100%;

    > .actions,
    .mail-composer .actions {
      position: sticky;
      inset-block-end: calc(-1 * var(--block-space-double));
      margin-block-start: auto;
      padding-block: var(--block-space);
      background-color: var(--color-canvas);
    }

    /* A reply written in it fills the rest of the height, down through the
       fold and the form — both stacks already — so its foot, Send outermost,
       stands at the bottom as the preview's own row does, while the words
       and their T stay at the top of it (owner, 2026-11-03). */
    > .accordion[open] {
      display: flex;
      flex: 1;
      flex-direction: column;

      &::details-content {
        display: flex;
        flex: 1;
        flex-direction: column;
      }

      .mail-composer,
      .mail-composer > form {
        flex: 1;
      }
    }
  }
}
