/* op_modal_a4.css - CHG-20260730-066, narrowed by CHG-20260730-067
 *
 * op_modal_page.js now chooses the page per dialog (portrait 794x1123 or landscape
 * 1123x794) and scales to fit, because a fixed width cannot honour "no scrolling" -
 * the New Quotation line table is ~900 px wide and needs landscape, while narrow
 * tall dialogs need portrait. This file keeps only the parts that must be CSS:
 *
 *  - backdrops must stretch. Those .modal elements carry inline position:fixed;
 *    inset:0 but no inline width, so the shell's .modal{width:560px} won and the dark
 *    overlay rendered 560 px wide on a 1916 px window. Pre-existing bug, fixed here.
 *  - a sane portrait default before the script's first pass, so nothing flashes at
 *    560 px or at 1100 px on open.
 *  - print uses real millimetres rather than pixels.
 */

.modal[style*="inset:0"],
.modal[style*="inset: 0"] {
  width: auto !important;
  max-width: none !important;
}

.modal-overlay .modal,
.modal-box {
  box-sizing: border-box;
  flex-shrink: 0;
}

@media print {
  .modal-overlay .modal,
  .modal-box {
    max-width: 297mm !important;
    transform: none !important;
  }
}
