/* Acknowledgement receipt layout fix.
   Keep property fields compact, then give Amount in Words a full readable row. */

.receipt-page .receipt-property {
  display: grid !important;
  grid-template-columns:
    max-content minmax(72px, 1fr)
    max-content minmax(54px, .7fr)
    max-content minmax(54px, .7fr) !important;
  column-gap: 6px !important;
  row-gap: 4px !important;
  align-items: end !important;
  justify-content: stretch !important;
}

.receipt-page .receipt-property > :nth-child(1) { grid-column: 1; grid-row: 1; }
.receipt-page .receipt-property > :nth-child(2) { grid-column: 2; grid-row: 1; }
.receipt-page .receipt-property > :nth-child(3) { grid-column: 3; grid-row: 1; }
.receipt-page .receipt-property > :nth-child(4) { grid-column: 4; grid-row: 1; }
.receipt-page .receipt-property > :nth-child(5) { grid-column: 5; grid-row: 1; }
.receipt-page .receipt-property > :nth-child(6) { grid-column: 6; grid-row: 1; }

.receipt-page .receipt-property > :nth-child(7) {
  grid-column: 1;
  grid-row: 2;
  white-space: nowrap;
}

.receipt-page .receipt-property > :nth-child(8) {
  grid-column: 2 / 5;
  grid-row: 2;
  min-width: 0 !important;
  width: 100% !important;
  white-space: normal !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  line-height: 1.25 !important;
}

.receipt-page .receipt-property > :nth-child(9) {
  grid-column: 5;
  grid-row: 2;
  white-space: nowrap;
}

.receipt-page .receipt-property > :nth-child(10) {
  grid-column: 6;
  grid-row: 2;
  min-width: 0 !important;
  width: 100% !important;
}

@media (max-width: 650px) {
  .receipt-page .receipt-property {
    grid-template-columns: max-content 1fr max-content 1fr !important;
  }

  .receipt-page .receipt-property > :nth-child(1) { grid-column: 1; grid-row: 1; }
  .receipt-page .receipt-property > :nth-child(2) { grid-column: 2; grid-row: 1; }
  .receipt-page .receipt-property > :nth-child(3) { grid-column: 3; grid-row: 1; }
  .receipt-page .receipt-property > :nth-child(4) { grid-column: 4; grid-row: 1; }
  .receipt-page .receipt-property > :nth-child(5) { grid-column: 1; grid-row: 2; }
  .receipt-page .receipt-property > :nth-child(6) { grid-column: 2; grid-row: 2; }
  .receipt-page .receipt-property > :nth-child(7) { grid-column: 1; grid-row: 3; }
  .receipt-page .receipt-property > :nth-child(8) { grid-column: 2 / 5; grid-row: 3; }
  .receipt-page .receipt-property > :nth-child(9) { grid-column: 1; grid-row: 4; }
  .receipt-page .receipt-property > :nth-child(10) { grid-column: 2 / 5; grid-row: 4; }
}

@media print {
  .receipt-page .receipt-property > :nth-child(8) {
    font-size: 8.5pt !important;
    line-height: 1.15 !important;
  }
}
