/* Receipt-only styles. Regular list printing keeps its landscape page rule. */
.school-app .receipt-sheet {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    width: 210mm;
    max-width: 100%;
    min-height: 297mm;
    margin: 0 auto;
    padding: 10mm;
    background: #fff;
    color: #111;
    box-shadow: 0 2px 15px #202c4b12;
    font:
        10.5pt/1.45 Arial,
        Helvetica,
        sans-serif;
}
.receipt-sheet * {
    box-sizing: border-box;
}
.receipt-letterhead {
    display: grid;
    grid-template-columns: 60% 35%;
    justify-content: space-between;
    gap: 5%;
    align-items: start;
    margin-bottom: 8mm;
}
.receipt-school-logo {
    display: block;
    width: 100%;
    max-width: 100mm;
    height: auto;
}
.receipt-school-contact {
    display: flex;
    flex-direction: column;
    gap: 1mm;
    font-size: 11pt;
    line-height: 1.45;
    font-weight: 600;
    overflow-wrap: anywhere;
}
.receipt-student-details {
    display: grid;
    grid-template-columns: 60% 35%;
    justify-content: space-between;
    gap: 5%;
    margin-bottom: 4mm;
}
.receipt-student-details dl {
    margin: 0;
}
.receipt-student-details dl > div {
    display: grid;
    grid-template-columns: 36% minmax(0, 1fr);
    gap: 2mm;
    padding: 2mm 0;
}
.receipt-student-details dl:nth-child(2) > div {
    grid-template-columns: 51% minmax(0, 1fr);
}
.receipt-student-details dt {
    font-weight: 700;
}
.receipt-student-details dd {
    position: relative;
    margin: 0;
    padding-left: 3mm;
    overflow-wrap: anywhere;
}
.receipt-student-details dd::before {
    content: ':';
    position: absolute;
    left: 0;
}
.receipt-payment-details {
    display: flex;
    flex-direction: column;
    gap: 0.8mm;
    font-size: 9pt;
    padding: 2mm 0 3mm;
    overflow-wrap: anywhere;
}
.receipt-payment-details strong {
    font-size: 10pt;
}
.receipt-table-scroll {
    width: 100%;
    overflow-x: auto;
}
.receipt-fees {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    color: #111;
    font-size: 10pt;
}
.receipt-fees caption {
    caption-side: top;
    text-align: left;
    color: #666;
    font-size: 8pt;
    padding: 1mm 0 2mm;
}
.receipt-col-number {
    width: 5%;
}
.receipt-col-fee {
    width: 27%;
}
.receipt-col-date {
    width: 14%;
}
.receipt-col-amount {
    width: 14%;
}
.receipt-col-waiver {
    width: 9%;
}
.receipt-col-paid {
    width: 16%;
}
.receipt-col-balance {
    width: 15%;
}
.receipt-fees th,
.receipt-fees td {
    padding: 3mm 1mm;
    border-bottom: 1px solid #c9c9c9;
    text-align: center;
    vertical-align: middle;
    overflow-wrap: anywhere;
}
.receipt-fees th {
    background: #eaf4fb;
    font-size: 9pt;
    font-weight: 500;
}
.receipt-fees td:nth-child(3) {
    font-size: 9pt;
    white-space: nowrap;
}
.receipt-fees tbody tr {
    break-inside: avoid;
}
.receipt-totals {
    width: 40%;
    margin: 4mm 0 0 auto;
    break-inside: avoid;
}
.receipt-totals > div {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 3mm;
    border-bottom: 1px solid #c9c9c9;
    padding: 3mm 0;
}
.receipt-totals span,
.receipt-due > strong:last-child {
    white-space: nowrap;
}
.receipt-due {
    border-top: 1px solid #c9c9c9;
}
.school-app .receipt-account-note {
    font-size: 7.5pt;
    color: #555;
    line-height: 1.5;
    margin: 3mm 0 0;
    max-width: 135mm;
}
.receipt-watermark {
    position: absolute;
    z-index: -1;
    pointer-events: none;
    left: 8%;
    top: 39%;
    width: 84%;
    height: auto;
    opacity: 0.045;
}
.receipt-signature {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 2mm;
    margin-top: auto;
    padding: 14mm 0 18mm 16mm;
    break-inside: avoid;
}
.receipt-signature small {
    font-size: 8pt;
    color: #555;
}
.receipt-contact-footer {
    display: grid;
    grid-template-columns: 56% 40%;
    justify-content: space-between;
    gap: 4%;
    border-top: 2px solid #8b8b8b;
    padding-top: 2mm;
    font-size: 9pt;
    break-inside: avoid;
}
.receipt-contact-footer > div {
    display: flex;
    flex-direction: column;
    gap: 0.5mm;
    overflow-wrap: anywhere;
}
.receipt-void {
    display: flex;
    flex-direction: column;
    gap: 1mm;
    border: 2px solid #a82032;
    color: #a82032;
    padding: 3mm;
    margin-bottom: 3mm;
    overflow-wrap: anywhere;
}
@media screen and (max-width: 700px) {
    .school-app .receipt-sheet {
        width: 100%;
        min-height: auto;
        padding: 18px;
    }
    .receipt-letterhead,
    .receipt-student-details {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }
    .receipt-school-logo {
        width: 100%;
        max-width: 340px;
    }
    .receipt-student-details dl:nth-child(2) > div {
        grid-template-columns: 36% minmax(0, 1fr);
    }
    .receipt-fees {
        min-width: 650px;
    }
    .receipt-totals {
        width: min(100%, 340px);
    }
    .receipt-contact-footer {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    .receipt-signature {
        padding: 35px 0;
    }
    .receipt-watermark {
        top: 44%;
    }
}
@page school-receipt {
    size: A4 portrait;
    margin: 10mm;
}
@media print {
    body.receipt-page {
        page: school-receipt;
        margin: 0 !important;
    }
    .school-app.receipt-page .school-shell,
    .school-app.receipt-page .school-workspace {
        display: block;
        min-height: 0;
        margin: 0;
    }
    .school-app.receipt-page .school-main {
        margin: 0;
        padding: 0;
        width: 100%;
        max-width: none;
    }
    .receipt-page .print-heading,
    .receipt-page .skip-link,
    .receipt-page [data-notice] {
        display: none !important;
    }
    .school-app .receipt-sheet {
        width: 190mm;
        max-width: none;
        min-height: 276mm;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
    .receipt-table-scroll {
        overflow: visible;
    }
    .receipt-fees {
        min-width: 0;
    }
    .receipt-fees thead {
        display: table-header-group;
    }
    .receipt-letterhead,
    .receipt-student-details,
    .receipt-payment-details {
        break-inside: avoid;
    }
    .receipt-sheet {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}
