/* Lists shown a page at a time (application/_pager), swapped in place.
   Phones: where we are on top, the two buttons side by side under it. */

@layer components {
  .pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: -0.25rem 0 1.5rem;

    @media (max-width: 640px) { display: grid; grid-template-columns: 1fr 1fr; }

    .button {
      padding: 0.4rem 1rem;

      @media (max-width: 640px) { justify-content: center; }

      &.disabled {
        opacity: 0.3;
        cursor: default;

        &:hover { background: var(--paper); }
      }
    }
  }
  .pager-where {
    color: var(--muted);
    font-variant-numeric: tabular-nums;

    @media (max-width: 640px) {
      grid-column: 1 / -1;
      grid-row: 1;
      text-align: center;
    }
  }
  turbo-frame.paged {
    display: block;

    &[aria-busy="true"] { opacity: 0.5; transition: opacity 0.15s; }
  }
}
