.rowfont {
    font-size: 0.125in;
   }
.rowheight {
  height: 0.1875in;
}
.carCardImage {width: 2.125in;;height: 4in; border: thin solid black; margin: 0.125in; }

#CarCardData .DefaultAction,
#CarCardData .CarDescription {
  white-space: pre-wrap;
}
#CarRoster .button {
  margin-bottom: 0;
}

.Commodities { white-space: pre-wrap; font-size: 8pt; line-height: 1.1; padding: 0 .05in; }
.commodities-section { font-size: 9pt; }
#CarRoster td { white-space: pre-line; }


/* Four cards on portrait Letter: each 4.125in wide including two 1in fold tabs. */
.car-card-sheet { display: grid; grid-template-columns: repeat(2, 4.125in); grid-template-rows: repeat(2, 5in); gap: 0; margin: 1rem 0; }
.car-card-slot { box-sizing: border-box; width: 4.125in; height: 5in; position: relative; }
.car-card-slot .carCardImage { display: block; box-sizing: border-box; width: 2.125in; height: 4in; margin: 0 0 0 1in; }
.car-card-slot .car-card-bottom-tab { position: absolute; box-sizing: border-box; left: 1in; top: 4in; width: 2.125in; height: 1in; border: 1px dashed #777; border-top: none; pointer-events: none; }
.car-card-slot::before, .car-card-slot::after {
  content: ""; position: absolute; top: 0; height: 4in; width: 1in;
  box-sizing: border-box; border: 1px dashed #777; pointer-events: none;
}
.car-card-slot::before { left: 0; border-right: none; }
.car-card-slot::after { left: 3.125in; border-left: none; }
@media print {
  @page { size: letter portrait; margin: 0; }
  html, body { margin: 0 !important; padding: 0 !important; width: 8.5in; }
  body > .app-header, body > footer { display: none !important; }
  article:has(#CarCards) { margin: 0 !important; padding: 0 !important; width: 8.5in !important; max-width: none !important; }
  #CarCards { display: block !important; margin: 0 !important; padding: 0 !important; width: 8.5in !important; }
  .car-card-sheet {
    display: grid !important; grid-template-columns: repeat(2, 4.125in);
    grid-template-rows: repeat(2, 5in); column-gap: 0; row-gap: 0;
    box-sizing: border-box; width: 8.5in; height: 11in;
    margin: 0 !important; padding: .5in 0 0 0 !important;
    break-after: page; page-break-after: always; break-inside: avoid;
  }
  .car-card-sheet:last-child { break-after: auto; page-break-after: auto; }
  .car-card-slot { width: 4.125in; height: 5in; }
  .car-card-slot .carCardImage { margin: 0 0 0 1in !important; width: 2.125in; height: 4in; }
}

/* Same-page print preview, matching the Waybills batch-print flow. */
#car-card-batch { display: none; }
@media print {
  body.printing-car-cards > :not(#car-card-batch) { display: none !important; }
  body.printing-car-cards #car-card-batch { display: block !important; width: 8.5in !important; margin: 0 !important; padding: 0 !important; }
}
