﻿.hide-print { display: none !important; }
#buttons { display:none; }
.screen { border: none; }
#mainHeader { display: none; }
.buttonHolder { display: none; }
HR { display: none; }
div.page-break  { display:block; page-break-before:always; page-break-inside:avoid; }
#screenOutputComment { background-color: white; }
#screenOutputComment .page-break {
    margin-top: 40px;
}
#dbStatus { display:none; }
#guideLink { display:none; }
#statusHolderOuter { display:none; }
.linkCol { display: none; }
#buttonErrorReport { display: none; }
#company-list { display: none; }
#testStatus { display: none; }
.the-arrow {
    -webkit-print-color-adjust: exact;
}
.v-main, #outer, body { background-color: white; }
.footer {
    position: fixed;
    bottom: 2mm;
}


@media print {
  /* 1) Hide only the dim background, never the overlay itself */
  .v-overlay__scrim { display: none !important; }

  /* 2) Hide the rest of the application by default ... */
  body.printing-door-config * { visibility: hidden !important; }

  /* ... but explicitly allow the overlay chain + dialog + our card to be visible */
  body.printing-door-config .v-overlay,
  body.printing-door-config .v-overlay__content,
  body.printing-door-config .v-dialog,
  body.printing-door-config .door-config-modal,
  body.printing-door-config .v-overlay *,
  body.printing-door-config .v-overlay__content *,
  body.printing-door-config .v-dialog *,
  body.printing-door-config .door-config-modal * {
    visibility: visible !important;
  }

  /* 3) Allow positioning override via JS at print time; keep other flattening */
  body.printing-door-config .v-overlay,
  body.printing-door-config .v-overlay__content,
  body.printing-door-config .v-dialog {
    inset: auto !important;        /* resets top/right/bottom/left */
    transform: none !important;
    z-index: auto !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  /* 4) Remove Vuetify’s scrollable constraints on dialog content */
  body.printing-door-config .v-dialog--scrollable,
  body.printing-door-config .v-card,
  body.printing-door-config .v-card__text {
    display: block !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
  }

  /* 5) Ensure our card prints as a clean page section */
  body.printing-door-config .door-config-modal {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  /* 6) Avoid splitting canvases/images across pages */
  body.printing-door-config .door-config-modal canvas,
  body.printing-door-config .door-config-modal img {
    max-width: 100% !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* 7) Page setup (tune as needed) */
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  /* 8) Hide UI controls and labels that should not appear in PDF */
  body.printing-door-config .door-config-modal .v-toolbar,
  body.printing-door-config .door-config-modal .v-card__actions,
  body.printing-door-config .door-config-modal .v-toolbar-title,
  body.printing-door-config .door-config-modal .v-btn,
  body.printing-door-config .door-config-modal button { display: none !important; }

  /* 9) Double-door pagination: put each canvas on its own page and fit width */
  body.printing-door-config .door-config-modal canvas {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
  /* Ensure the output container flows and isn't scroll-constrained */
  body.printing-door-config .door-config-modal #fd-modal-output {
    display: block !important;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* More specific canvas formatting within the output host */
  body.printing-door-config .door-config-modal #fd-modal-output > canvas {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    /* Account for @page margin: 12mm top and bottom = 24mm total */
    max-height: calc(100vh - 24mm) !important;
    aspect-ratio: 888 / 1257;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    float: none !important;

  /* Print page wrapper rules removed; handled via absolute positioning approach */
  /* (left intentionally empty) */

    clear: both !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  /* Remove break-before rules on canvases to avoid conflicts */
  /* intentionally empty */

}