.pdf-layout {
  page: pdf;
  font-family: var(--font-sans);
  font-size: 9pt;
  color: #111;
  background: #fff;
  line-height: 1.4;

  height: initial;
  min-height: initial;
  width: initial;
  min-width: initial;
  padding: 0;
  margin: 0;

  h1,
  h2,
  h3 {
    margin-bottom: 0.7em;
    font-weight: 700;
  }

  /* h1 {
    font-size: 18pt;
    font-weight: 700;
    margin-bottom: 4pt;
  }

  h2 {
    font-size: 13pt;
    font-weight: 700;
    margin-top: 16pt;
    margin-bottom: 6pt;
    padding-bottom: 2pt;
  }

  h3 {
    font-size: 10pt;
    font-weight: 700;
    margin-top: 10pt;
    margin-bottom: 4pt;
  } */

  .pdf-header {
    margin-bottom: var(--block-space);

    .header-top {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        grid-template-areas: "headline logo";
        margin-bottom: 1em;
    }

    .location {
        text-align: center;
        grid-area: headline;
    }
    .logo {
      grid-area: logo;
      min-width: 10vw;
      min-height: 8ch;
      background-color: white;
      background-image: url("/assets/rack_attack-d7a51141.svg");
      background-repeat: no-repeat;
      background-position: top right;
      background-size: contain;
    }
  }

  .pdf-header-meta {
    font-size: 12pt;

    span + span::before {
      content: " · ";
    }
  }

  .rider-status {
    display: inline-block;
    font-size: 8pt;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2pt 6pt;
    border-radius: 3pt;
    margin-top: 4pt;
    background: #eee;
    color: #333;
  }

  .show {
    margin-block-end: calc(var(--block-space) * 2);
  }

  table {
    width: 100%;
    border-collapse: collapse;

    .align-right {
      text-align: right;
    }
  }

  .location-materials-table {
    table-layout: fixed;

    th:first-child,
    td:first-child {
      width: 10%;
    }

    th:last-child,
    td:last-child {
      width: 90%;
    }
  }

  th {
    font-family: var(--font-mono);
    font-size: 0.9em;
    font-weight: 700;
    text-align: left;
    padding: 0.2em 0.6em;
    /* border-bottom: 2px solid #111; */
    background: #000;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  td {
    padding: 3pt 5pt;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
  }

  tr:last-child td {
    border-bottom: none;
  }

  .primary {
    font-weight: 900;
    font-size: 1.1em;
  }

  .data {
    font-family: var(--font-mono);
    text-transform: uppercase;
  }
  .category{
    margin-top: 2em;
    font-weight: bold;
  }
  .gear-category-row td {
    font-family: var(--font-mono);
    background: #eee;
    /* color: #fff; */
    font-weight: 700;
    padding: 3pt 5pt;
    border-bottom: 2px solid #000;
  }

  .gear-amount {
    font-family: var(--font-mono);
    font-weight: 700;
    white-space: nowrap;
    max-width: 40ch;
  }

  .material-item-name {}

  .no-data {
    color: #888;
    font-style: italic;
    padding: 4pt 0;
  }

  .page-break {
    page-break-before: always;
  }

  #bullet-footer {
    display: none;
  }

}

.keep-together-in-print {
  page-break-inside: avoid;
}

#generated-on {
  position: running(generatedOn);
  font-size: 8pt;
  color: #888;
  margin-block-end: var(--block-space);
  text-align: right;
}

@page pdf {
  size: A4 portrait;
  margin: 10mm 10mm 15mm 10mm;

  @bottom-right {
    content: "Page " counter(page) " of " counter(pages);
    font-size: 8pt;
    color: #888;
  }

  @bottom-center {
    content: element(generatedOn);
  }



}

@media screen {
  .pdf-layout {
    padding: 15mm 10mm;
  }
}
