/*
 * Printed documents (invoices, vouchers, receipts, reports, payslips ...).
 * Loaded on every admin page (preview inside modals) and by pxPrint() / the
 * print layout (body.printDivClass). Ported from lac px_assets/css/system/print/print.css.
 * Header / footer markup comes from App\Support\PrintLayout (Setup -> Print Setup).
 */

/* header / footer (screen and print) */
.px-print-header { text-align: center; width: 100%; margin-bottom: 6px; }
.px-print-logo { width: 80px; height: 80px; object-fit: contain; }
.px-print-name { margin: 8px 0 0; font-size: 30px; font-weight: bold; letter-spacing: 1px; color: #000; }
.px-print-tagline { font-size: 14px; font-weight: bold; margin-top: 2px; color: #000; }
.px-print-address, .px-print-contact { margin: 4px 0 0; font-size: 12px; font-weight: bold; color: #000; }
.px-print-header-image { display: block; margin-bottom: 6px; }
.px-print-footer-image { display: block; margin-top: 16px; }
.px-print-footer { margin-top: 16px; padding-top: 6px; border-top: 1px solid #000; text-align: center; font-size: 11px; color: #000; }
.px-print-custom img { max-width: 100%; }

/* document title: the outlined badge of the lac vouchers */
.px-print-title { text-align: center; margin: 8px 0 4px; }
.px-print-title .px-print-title-text { display: inline-block; padding: 4px 14px; border: 1px solid #000; border-radius: 4px; color: #000; font-weight: bold; font-size: 15px; }
.px-print-subtitle { text-align: center; font-size: 12px; margin-bottom: 6px; }

/* last line: "Printed by: X on 08 Oct 2026, 10:12 AM" on the left, "Powered By: AdvoCase" on the right */
.px-print-bottom { display: flex; align-items: flex-end; gap: 8px; }
.px-printed-by { margin-top: 5px; padding-left: 10px; font-size: 12px; color: #555; text-align: left; }
.px-powered-by { margin-top: 5px; margin-left: auto; padding-right: 10px; font-size: 11px; color: #555; text-align: right; white-space: nowrap; }

/* signature lines */
.px-sign-row { display: flex; justify-content: space-between; margin-top: 24px; gap: 8px; }
.px-sign-row > div { flex: 1; text-align: center; }
.px-sign-row .px-sign-line { border-bottom: 1px solid #000; margin-top: 36px; }
.px-sign-row .px-sign-label { margin-top: 6px; font-size: 13px; }

/* the italic notice box (invoice) */
.px-print-notice { box-shadow: 0 0 0 1px #dee2e6; border-radius: 4px; padding: 12px; margin-top: 12px; }
.px-print-notice p { margin: 0; text-align: center; font-size: 15px; font-weight: 500; font-style: italic; line-height: 1.6; color: #000; }

/* standalone print pages (admin.layouts.print-layout) */
body.px-print-page { background: #eef1f5; }
.px-print-toolbar { max-width: 210mm; margin: 12px auto 0; text-align: right; }
.px-print-sheet { background: #fff; max-width: 210mm; min-height: 200mm; margin: 14px auto; padding: 12mm; }
body.px-print-landscape .px-print-toolbar, body.px-print-landscape .px-print-sheet { max-width: 297mm; }

/* the print window / print pages */
body.printDivClass { color: #000; background-color: #fff; font-family: "Arial", Helvetica, sans-serif; }
body.printDivClass .table-bordered,
body.printDivClass .table-bordered thead tr th,
body.printDivClass .table-bordered tbody tr td,
body.printDivClass .table-bordered tfoot tr th,
body.printDivClass .table-bordered tfoot tr td { border: 1px solid #000000; }
body.printDivClass .solid-border td { border: 2px solid #000 !important; }

@media print {
    .noprint, .noprint *, .px-print-toolbar { display: none !important; }
    body.px-print-page { background: #fff; }
    .px-print-sheet { margin: 0; padding: 0; max-width: none !important; min-height: 0; }

    body.printDivClass .tableheader { background-color: #d4d4d4 !important; color: black !important; font-weight: bolder !important; }
    body.printDivClass .mainbase { border: 2px solid black; position: relative; }
    body.printDivClass .bb { border-bottom: 2px solid black; }
    body.printDivClass .bl { border-left: 2px solid black; }
    body.printDivClass .br { border-right: 2px solid black; }
    body.printDivClass .bt { border-top: 2px solid black; }
    body.printDivClass .no-border-table, body.printDivClass .no-border-table tr, body.printDivClass .no-border-table tr td { border: none !important; }
    body.printDivClass table { margin-bottom: 0 !important; }
    body.printDivClass td, body.printDivClass th { padding: 5px !important; }
    body.printDivClass th:not(.text-end):not(.text-center) { text-align: left; }
    body.printDivClass .align-td-text { vertical-align: middle !important; text-align: center !important; }
    body.printDivClass .table > :not(caption) > * > * { background: #fff !important; color: #000 !important; box-shadow: none !important; }
    body.printDivClass .table-light > *, body.printDivClass .table-light { background: #f1f1f1 !important; }
    body.printDivClass .badge { color: #000 !important; background: none !important; border: 1px solid #000; }
    body.printDivClass a { color: #000; text-decoration: none; }
    body.printDivClass tr, body.printDivClass img { page-break-inside: avoid; }
    body.printDivClass .px-print-header, body.printDivClass .px-print-title { page-break-after: avoid; }

    /* lac font scale in print */
    body.printDivClass .fs-10 { font-size: 15px; }
    body.printDivClass .fs-11 { font-size: 16px; }
    body.printDivClass .fs-12 { font-size: 17px; }
    body.printDivClass .fs-13 { font-size: 18px; }
    body.printDivClass .fs-14 { font-size: 19px; }
    body.printDivClass .fs-15 { font-size: 20px; }
    body.printDivClass .fs-16 { font-size: 21px; }
    body.printDivClass .fs-18 { font-size: 23px; }
    body.printDivClass .fs-20 { font-size: 25px; }
    body.printDivClass .fs-30 { font-size: 35px; }
}
