/* TR Global v432 - Order Summary PDF fit + print image containment.
   Loaded after v431. Screen layout stays unchanged; print overrides only. */
@media print{
  @page{size:A3 landscape;margin:6mm}

  html.tr-order-summary-printing,
  html.tr-order-summary-printing body[data-order-summary-page],
  html.tr-order-summary-printing body[data-order-summary-page] .order-summary-content,
  html.tr-order-summary-printing body[data-order-summary-page] .order-summary-sheet,
  html.tr-order-summary-printing body[data-order-summary-page] .order-summary-table-wrap,
  body.tr-order-summary-print-only,
  body.tr-order-summary-print-only .order-summary-print-document,
  body.tr-order-summary-print-only .order-summary-sheet,
  body.tr-order-summary-print-only .order-summary-table-wrap{
    width:100%!important;min-width:0!important;max-width:100%!important;
    box-sizing:border-box!important;overflow:visible!important;
  }

  /* Critical fix: v431's 1980px desktop minimum must never survive into print. */
  html.tr-order-summary-printing body[data-order-summary-page] .order-summary-table,
  body.tr-order-summary-print-only .order-summary-table{
    width:100%!important;min-width:0!important;max-width:100%!important;
    table-layout:fixed!important;border-collapse:collapse!important;box-sizing:border-box!important;
    font-size:6.2pt!important;
  }
  html.tr-order-summary-printing body[data-order-summary-page] .order-summary-table th,
  html.tr-order-summary-printing body[data-order-summary-page] .order-summary-table td,
  body.tr-order-summary-print-only .order-summary-table th,
  body.tr-order-summary-print-only .order-summary-table td{
    box-sizing:border-box!important;min-width:0!important;max-width:none!important;
    padding:3px 2.5px!important;overflow:hidden!important;overflow-wrap:anywhere!important;word-break:normal!important;
  }

  /* WITH PRICES: explicit 100% column plan. */
  .order-summary-table:not(.order-summary-operational-table) col.order-col-number{width:2%!important}
  .order-summary-table:not(.order-summary-operational-table) col.order-col-picture{width:15%!important}
  .order-summary-table:not(.order-summary-operational-table) col.order-col-style{width:11%!important}
  .order-summary-table:not(.order-summary-operational-table) col.order-col-description{width:15%!important}
  .order-summary-table:not(.order-summary-operational-table) col.order-col-po{width:6.5%!important}
  .order-summary-table:not(.order-summary-operational-table) col.order-col-vendor{width:7%!important}
  .order-summary-table:not(.order-summary-operational-table) col.order-col-origin{width:6%!important}
  .order-summary-table:not(.order-summary-operational-table) col.order-col-colours{width:8.5%!important}
  .order-summary-table:not(.order-summary-operational-table) col.order-col-ratio{width:10%!important}
  .order-summary-table:not(.order-summary-operational-table) col.order-col-qty{width:4.5%!important}
  .order-summary-table:not(.order-summary-operational-table) col.order-col-unit{width:6%!important}
  .order-summary-table:not(.order-summary-operational-table) col.order-col-total{width:8.5%!important}

  /* WITHOUT PRICES: reuse the removed commercial width instead of leaving a clipped table. */
  .order-summary-operational-table col.order-col-number{width:2.5%!important}
  .order-summary-operational-table col.order-col-picture{width:18%!important}
  .order-summary-operational-table col.order-col-style{width:13%!important}
  .order-summary-operational-table col.order-col-description{width:18%!important}
  .order-summary-operational-table col.order-col-po{width:7%!important}
  .order-summary-operational-table col.order-col-vendor{width:8%!important}
  .order-summary-operational-table col.order-col-origin{width:7%!important}
  .order-summary-operational-table col.order-col-colours{width:10%!important}
  .order-summary-operational-table col.order-col-ratio{width:11%!important}
  .order-summary-operational-table col.order-col-qty{width:5.5%!important}

  .order-summary-table col.order-col-open{width:0!important}
  .order-sheet-actions{display:none!important;width:0!important;max-width:0!important;padding:0!important;border:0!important}

  .order-sheet-image-cell{width:auto!important;min-width:0!important;max-width:none!important;overflow:hidden!important;padding:2px!important}
  .order-sheet-master-visuals{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:1mm!important;
    width:100%!important;min-width:0!important;max-width:100%!important;overflow:hidden!important;
  }
  .order-sheet-master-visuals .order-sheet-image-link{
    display:flex!important;flex-direction:column!important;width:100%!important;min-width:0!important;max-width:100%!important;
    height:auto!important;overflow:hidden!important;box-sizing:border-box!important;
  }
  .order-sheet-master-visuals img,
  .order-sheet-master-visuals .is-primary img{
    display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;
    height:21mm!important;min-height:21mm!important;max-height:21mm!important;padding:.5mm!important;
    object-fit:contain!important;box-sizing:border-box!important;
  }
  .order-sheet-master-visuals small{
    display:block!important;width:100%!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
    font-size:5pt!important;line-height:1.1!important;padding:.5mm .2mm!important;box-sizing:border-box!important;
  }
  .order-sheet-style-cell,.order-sheet-description-cell{min-width:0!important;max-width:none!important;overflow:hidden!important}
}

/* Specificity lock: older print rules also use !important with body-scoped selectors. */
@media print{
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-table:not(.order-summary-operational-table) col.order-col-number{width:2%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-table:not(.order-summary-operational-table) col.order-col-picture{width:15%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-table:not(.order-summary-operational-table) col.order-col-style{width:11%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-table:not(.order-summary-operational-table) col.order-col-description{width:15%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-table:not(.order-summary-operational-table) col.order-col-po{width:6.5%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-table:not(.order-summary-operational-table) col.order-col-vendor{width:7%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-table:not(.order-summary-operational-table) col.order-col-origin{width:6%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-table:not(.order-summary-operational-table) col.order-col-colours{width:8.5%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-table:not(.order-summary-operational-table) col.order-col-ratio{width:10%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-table:not(.order-summary-operational-table) col.order-col-qty{width:4.5%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-table:not(.order-summary-operational-table) col.order-col-unit{width:6%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-table:not(.order-summary-operational-table) col.order-col-total{width:8.5%!important}

  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-operational-table col.order-col-number{width:2.5%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-operational-table col.order-col-picture{width:18%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-operational-table col.order-col-style{width:13%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-operational-table col.order-col-description{width:18%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-operational-table col.order-col-po{width:7%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-operational-table col.order-col-vendor{width:8%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-operational-table col.order-col-origin{width:7%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-operational-table col.order-col-colours{width:10%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-operational-table col.order-col-ratio{width:11%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-summary-operational-table col.order-col-qty{width:5.5%!important}

  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-sheet-image-cell{width:auto!important;min-width:0!important;max-width:none!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-sheet-master-visuals{grid-template-columns:repeat(3,minmax(0,1fr))!important;width:100%!important;min-width:0!important;max-width:100%!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-sheet-master-visuals .order-sheet-image-link{width:100%!important;min-width:0!important;max-width:100%!important;height:auto!important}
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-sheet-master-visuals img,
  :is(html.tr-order-summary-printing body[data-order-summary-page],body.tr-order-summary-print-only[data-order-summary-page]) .order-sheet-master-visuals .is-primary img{width:100%!important;max-width:100%!important;height:21mm!important;min-height:21mm!important;max-height:21mm!important}
}
