/* v6.6.9 — Allow a one-finger swipe on the fitted paper to scroll the report modal. */
.report-preview-stage {
  position: relative;
  flex: none;
  width: 210mm;
  height: 297mm;
}
.report-preview-stage > .paper {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
}

@media (max-width: 720px) {
  #report-modal .report-preview-scroller {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 110px);
    padding: 12px 0;
    overflow: auto;
    direction: ltr;
    /* Pass vertical swipes to the outer report page when the preview fits. */
    overscroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
  }
  #report-modal .report-preview-stage {
    margin-right: auto;
    margin-left: auto;
  }
}

/* Print always uses the original unscaled 210 × 297 mm paper. */
@media print {
  #report-modal .report-preview-scroller {
    display: block !important;
    width: 210mm !important;
    max-width: none !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }
  #report-modal .report-preview-stage {
    position: relative !important;
    width: 210mm !important;
    height: 297mm !important;
    margin: 0 !important;
  }
  #report-modal .report-preview-stage > .paper {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
  }
}
