/**
 * The post table block (blocks/posttable.php): moved out of blog.css on 2026-11-27 so the
 * block keeps its looks wherever it is placed (the Technical SEO and schema page puts one in
 * its problem section). Linked by the block itself with peanut_page_css().
 */

@layer blocks {
  /* ---------- Post blocks: table ---------- */

  /* Phones: the table scrolls inside its frame. The cue is a line above it
     and a shadow on the side that still has columns behind it (the white
     covers move with the content, the shadows stay with the frame, so a
     shadow shows only where there is more to scroll to). From 48rem up
     nothing scrolls: three and four columns take the wide figure width. */
  .bp-table__frame {
    overflow-x: auto;
    border: var(--border);
    border-radius: var(--radius-sm);
    background:
      linear-gradient(to right, var(--color-white) 30%, transparent) left center / 2.5rem 100% no-repeat local,
      linear-gradient(to left, var(--color-white) 30%, transparent) right center / 2.5rem 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, var(--color-ink-line-faint), transparent) left center / 0.875rem 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, var(--color-ink-line-faint), transparent) right center / 0.875rem 100% no-repeat scroll,
      var(--color-white);
  }

  .bp-table__frame:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
  }

  .bp-table__hint {
    display: none;
    margin-bottom: var(--space-1);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
  }

  .bp-table__hint::after {
    content: "\00a0\2192";
  }

  @media (max-width: 29.99rem) {
    .bp-table__hint {
      display: block;
    }
  }

  @media (max-width: 47.99rem) {
    .bp-table--4 .bp-table__hint {
      display: block;
    }
  }

  .bp-table__table {
    width: 100%;
    min-width: 30rem;
    border-collapse: collapse;
    font-size: var(--step--1);
    line-height: 1.55;
    text-align: left;
  }

  .bp-table__table--4 {
    min-width: 40rem;
  }

  @media (min-width: 48rem) {
    .bp-table--3,
    .bp-table--4 {
      position: relative;
      left: 50%;
      width: min(60rem, calc(100vw - 2 * var(--gutter)));
      max-width: none;
      translate: -50% 0;
    }

    .bp-table__table,
    .bp-table__table--4 {
      min-width: 0;
    }
  }

  /* Paper does not scroll: the whole table fits the printed page (a minimum
     width wider than the page made Chrome shrink every printed page to fit) */
  @media print {
    .bp-table__hint {
      display: none;
    }

    .bp-table__table,
    .bp-table__table--4 {
      min-width: 0;
    }
  }

  .bp-table__caption {
    padding: var(--space-2) var(--space-3);
    border-bottom: var(--border);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: var(--tracking-caps);
    text-align: left;
    text-transform: uppercase;
  }

  .bp-table__table th,
  .bp-table__table td {
    padding: 0.75rem var(--space-2);
    vertical-align: top;
  }

  .bp-table__table thead th,
  .bp-table__table thead td {
    background: var(--color-brand);
    font-weight: 600;
  }

  .bp-table__table tbody th {
    font-weight: 600;
  }

  .bp-table__table tbody tr + tr > * {
    border-top: 1px solid var(--color-ink-line-faint);
  }

  .bp-table__table :is(th, td) + :is(th, td) {
    border-left: 1px solid var(--color-ink-line-faint);
  }
}
