/*
  The preview-and-print pages: the A4 sheet on the left, the print panel on the right.
  On paper only the sheet is printed, at its real size (210 x 297 mm), on one page.
  The "whole month" page shows several sheets and prints each on its own page.
*/
@page {
  size: A4;
  margin: 0;
}

.nz-print-page {
  padding-top: 48px;
  padding-bottom: 96px;
}

.nz-print-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 64px;
  align-items: flex-start;
}

.nz-print-sheet {
  flex: 0 1 var(--nz-sheet-width-laptop);
  width: var(--nz-sheet-width-laptop);
  max-width: 100%;
}

.nz-print-panel {
  flex: 1 1 320px;
  min-width: 0;
  max-width: 360px;
  margin-left: auto;
  position: sticky;
  top: calc(var(--nz-topbar-height) + 24px);
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 8px;
}

.nz-print-panel .nz-h2 {
  margin: 14px 0;
  font-size: 2.5rem;
}

.nz-print-panel p {
  margin: 0;
}

.nz-print-modes,
.nz-month-choice,
.nz-test-checklist {
  margin: 0;
  padding: 0;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nz-print-modes legend,
.nz-month-choice legend,
.nz-test-checklist legend {
  padding: 0 0 12px;
  font-size: var(--nz-text-small);
  font-weight: var(--nz-weight-bold);
}

.nz-print-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.nz-print-tip {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--nz-radius-card);
  background: var(--nz-terracotta-light);
  font-size: var(--nz-text-small);
  line-height: 1.5;
}

.nz-print-tip svg {
  flex: none;
  margin-top: 2px;
  color: var(--nz-terracotta-dark);
}

/* Several sheets, one under the other ("print the whole month"). */
.nz-month-sheets {
  display: flex;
  flex-direction: column;
  gap: var(--nz-space-6);
}

.nz-month-choice {
  gap: 0;
}

/* Test print: three short steps and the "what fits?" checklist. */
.nz-test-steps {
  margin: 0;
  padding: 0 0 0 1.4em;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: var(--nz-text-small);
  line-height: 1.5;
}

.nz-test-steps li {
  display: flex;
  flex-direction: column;
}

.nz-test-steps li::marker {
  font-family: var(--nz-font-display);
  font-style: italic;
  color: var(--nz-color-accent);
}

.nz-test-checklist {
  gap: 0;
}

.nz-test-result {
  margin: 8px 0;
  padding: 12px 16px;
  border-radius: var(--nz-radius-card);
  background: var(--nz-lilac);
  font-weight: var(--nz-weight-bold);
}

@media (max-width: 859px) {
  .nz-print-page {
    padding-top: 24px;
    padding-bottom: 48px;
  }

  .nz-print-layout {
    flex-direction: column;
    gap: 32px;
  }

  .nz-print-sheet {
    width: 100%;
  }

  .nz-print-panel {
    position: static;
    max-width: none;
    margin-left: 0;
    order: -1;
  }
}

@media print {
  body {
    background: var(--nz-white);
  }

  .nz-topbar,
  .nz-print-panel,
  .nz-footer {
    display: none;
  }

  .nz-print-page,
  .nz-print-layout,
  .nz-print-sheet {
    display: block;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  /* The sheet at its real size, the only thing on the page. */
  .nz-print-sheet .nz-sheet-frame {
    width: var(--nz-page-width);
    height: var(--nz-page-height);
    aspect-ratio: auto;
    box-shadow: none;
    break-after: page;
  }

  .nz-print-sheet .nz-sheet-frame:last-child {
    break-after: auto;
  }

  .nz-print-sheet .nz-sheet {
    transform: none;
  }
}
