/* =====================================================================
   RM Packaging — Print (quotation / invoice PDFs)
   ===================================================================== */

@media print {
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 11pt;
        line-height: 1.4;
        margin: 0;
    }

    .no-print,
    .site-header,
    .site-footer,
    .admin-sidebar,
    .admin-topbar,
    .breadcrumb,
    .btn {
        display: none !important;
    }

    a {
        color: #000;
        text-decoration: none;
    }

    .print-page {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    /* Quotation header */
    .quotation-print {
        padding: 0;
    }

    .quotation-print-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        border-bottom: 2px solid #000;
        padding-bottom: 8mm;
        margin-bottom: 8mm;
    }

    .quotation-print-header h1 {
        font-size: 20pt;
        color: #000;
        margin: 0;
    }

    .quotation-print-meta {
        text-align: right;
        font-size: 10pt;
    }

    .quotation-print-customer {
        margin-bottom: 8mm;
    }

    .quotation-print-customer h3 {
        font-size: 11pt;
        margin: 0 0 2mm;
    }

    /* Items table */
    .quotation-print table {
        width: 100%;
        border-collapse: collapse;
        font-size: 10pt;
        margin-bottom: 6mm;
    }

    .quotation-print th,
    .quotation-print td {
        padding: 2.5mm 3mm;
        border: 1px solid #999;
        text-align: left;
    }

    .quotation-print th {
        background: #f1f1f1 !important;
        font-weight: bold;
    }

    .quotation-print td.num,
    .quotation-print th.num {
        text-align: right;
    }

    /* Totals */
    .quotation-print-totals {
        width: 60%;
        margin-left: auto;
        border-collapse: collapse;
    }

    .quotation-print-totals td {
        padding: 2mm 3mm;
        border: 1px solid #999;
    }

    .quotation-print-totals .total-row {
        font-weight: bold;
        background: #f1f1f1 !important;
    }

    /* Terms */
    .quotation-print-terms {
        margin-top: 8mm;
        font-size: 9pt;
        line-height: 1.5;
    }

    .quotation-print-terms h4 {
        font-size: 10pt;
        margin: 0 0 1.5mm;
    }

    /* Signature area */
    .quotation-print-sign {
        display: flex;
        justify-content: space-between;
        margin-top: 20mm;
        font-size: 10pt;
    }

    .quotation-print-sign div {
        border-top: 1px solid #000;
        padding-top: 2mm;
        width: 40%;
        text-align: center;
    }

    /* Page breaks */
    .page-break {
        page-break-after: always;
    }

    .avoid-break {
        page-break-inside: avoid;
    }

    /* Table headers repeat */
    thead {
        display: table-header-group;
    }

    tr {
        page-break-inside: avoid;
    }
}

/* Print styles for quotation / reports */
@media print {
    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .no-print,
    .site-header,
    .site-footer,
    .admin-sidebar,
    .admin-topbar,
    .breadcrumb,
    .btn {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 11pt;
        margin: 0;
    }

    .admin-main {
        margin: 0 !important;
    }

    .admin-content {
        padding: 0;
    }

    a {
        color: #000;
        text-decoration: none;
    }

    table {
        width: 100%;
        border-collapse: collapse;
        font-size: 10pt;
    }

    th,
    td {
        padding: 2mm 3mm;
        border: 1px solid #999;
        text-align: left;
    }

    th {
        background: #f1f1f1 !important;
        font-weight: bold;
    }
}
