/* Nexcor V222 — Shared browser print/PDF pagination repair.
   Applies only to browser printing. Keeps specialised badge/ID-card layouts intact.
   No JavaScript, database, or application functionality is modified. */
@media print {
  html, body {
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }
  body .workspace,
  body.nx-admin-modern .workspace {
    display: block !important;
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  body .workspace > main,
  body.nx-admin-modern .workspace > main,
  body #main,
  body.nx-admin-modern #main {
    display: block !important;
    position: static !important;
    visibility: visible !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }
  #main.nx-ack-payment-layout > #paymentGateway,
  body > #delegateWelcome {
    display: none !important;
  }
  /* Hide only global navigation and controls, not content. */
  body > header, #topnav, #sidebar, body > footer, #portal-footer,
  .nx89-shellbar, .nx89-backdrop, #toast, #menu,
  .actions, .noprint, button, .toolbar button {
    display: none !important;
  }
  /* Critical: long form/report cards must be allowed to split across sheets. */
  #main .card:not(.idcard):not(.abstract-presenter-card):not(.nx158-faculty-card),
  #main .receipt,
  #main .notice,
  #main .tablewrap,
  #main .table-responsive,
  #main .table-scroll,
  #main .table-wrap {
    break-inside: auto !important;
    page-break-inside: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  /* Keep specialised badge/ID-card layouts owned by their own styles. */
  #main .idcard,
  #main .abstract-presenter-card,
  #main .nx158-faculty-card {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  #main table { page-break-inside: auto; }
  #main thead { display: table-header-group; }
  #main tfoot { display: table-footer-group; }
  #main tr { break-inside: avoid; page-break-inside: avoid; }
  #main img, #main svg, #main canvas { max-width: 100%; }
}
