@media print {
  @page {
    size: letter;
    margin: 0.55in;
  }

  body:has(.ehr-print-page) {
    background: var(--color-surface) !important;
    color: var(--color-fg-primary) !important;
  }

  body:has(.ehr-print-page) > header,
  body:has(.ehr-print-page) .ehr-print-toolbar {
    display: none !important;
  }

  body:has(.ehr-print-page) main {
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  body:has(.ehr-print-page) .ehr-print-page {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  body:has(.ehr-print-page) .ehr-print-header {
    border-bottom: 1px solid var(--color-fg-primary) !important;
    break-after: avoid;
    margin-bottom: 0.25in !important;
    padding-bottom: 0.18in !important;
  }

  body:has(.ehr-print-page) .ehr-print-section {
    break-inside: avoid;
  }

  body:has(.ehr-print-page) .ehr-print-pending {
    background: var(--color-surface) !important;
    border: 1px solid var(--color-stone-300) !important;
  }

  body:has(.ehr-print-page) a[href]::after {
    content: "";
  }
}
