/*
 * AC 14 — the page has to save to a self-contained PDF good enough to attach to a
 * security-review packet. Link targets are printed inline because a PDF has no hover,
 * and the stacked mobile layout is undone so the table prints as a table regardless of
 * the viewport width the print was issued from.
 *
 * Linked with media="print" and wrapped in @media print as well, so it stays safe if it
 * is ever included unconditionally.
 */

@media print {
  @page {
    margin: 15mm;
  }

  html,
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 10.5pt;
    line-height: 1.4;
    margin: 0;
    padding: 0;
    width: auto;
    overflow: visible;
  }

  /* Nothing may be pinned or clipped: fixed chrome repeats on every sheet and a clipped
     container silently drops content from the PDF. */
  * {
    position: static !important;
    overflow: visible !important;
    max-height: none !important;
    box-shadow: none !important;
  }

  .page-header,
  .page-main,
  .page-footer {
    max-width: none;
    width: 100%;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .page-header {
    padding-top: 0;
    border-bottom: 1pt solid #000000;
  }

  .page-header__title {
    color: #000000;
    font-size: 22pt;
  }

  .page-header__eyebrow,
  .page-header__updated {
    color: #000000;
  }

  .scope-statement {
    background: transparent;
    border: 1pt solid #000000;
    border-left-width: 3pt;
    padding: 6pt 8pt;
    max-width: none;
  }

  a {
    color: #000000;
    text-decoration: underline;
  }

  /* A PDF has no hover, so an unresolved link is an unverifiable citation. */
  a[href^='http']::after {
    content: ' (' attr(href) ')';
    font-size: 8.5pt;
    word-break: break-all;
  }

  /* The mailto address is already printed as the link text; repeating it is noise. */
  a[href^='mailto:']::after {
    content: '';
  }

  /* Undo the stacked-card layout: at print time the viewport width is irrelevant and a
     real table is what a reviewer expects on paper. */
  .subprocessor-table {
    display: table !important;
    width: 100% !important;
    border-collapse: collapse;
    page-break-inside: auto;
  }

  .subprocessor-table thead {
    display: table-header-group !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    clip-path: none !important;
  }

  .subprocessor-table tbody {
    display: table-row-group !important;
  }

  .subprocessor-table tr {
    display: table-row !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .subprocessor-table th,
  .subprocessor-table td {
    display: table-cell !important;
    border: 0.5pt solid #000000 !important;
    padding: 5pt 6pt !important;
    color: #000000;
    vertical-align: top;
  }

  .subprocessor-table td::before {
    content: none !important;
  }

  .subprocessor-table__caption {
    caption-side: top;
    color: #000000;
    padding-bottom: 4pt;
  }

  .state {
    border: 0.5pt solid #000000 !important;
    background: transparent !important;
    color: #000000 !important;
    border-radius: 0;
    padding: 1pt 4pt;
    white-space: normal;
  }

  .state--pending {
    font-weight: 700;
    border-style: dashed !important;
  }

  .state::before {
    display: none;
  }

  .notice-policy,
  .machine-readable {
    max-width: none;
    break-inside: avoid;
  }

  .notice-policy p,
  .machine-readable__list {
    color: #000000;
  }

  .page-footer {
    border-top: 1pt solid #000000;
    color: #000000;
    break-inside: avoid;
  }

  /* The canonical URL is the thing the DPA cites, so it must survive the print. */
  .page-footer::after {
    content: 'Printed from https://subprocessors.gooddaysoftware.com/';
    display: block;
    margin-top: 6pt;
    font-size: 8.5pt;
  }
}
