/* ============================================================
   Invoice Generator – Print Stylesheet
   NovaTools Hub
   ============================================================ */

/* ── Screen helpers ── */
.invoice-preview-card {
    transition: box-shadow 0.2s;
}

/* Template variants */
.tpl-classic #inv-accent-bar  { height: 4px; }
.tpl-minimal #inv-accent-bar  { display: none; }
.tpl-minimal #invoice-preview { border-radius: 0.5rem; }

.tpl-classic .p-8  { padding: 2.5rem; }
.tpl-minimal .p-8  { padding: 2rem; }

/* ── Print ── */
@media print {

    /* Hide non-invoice chrome */
    .no-print,
    header,
    footer,
    nav {
        display: none !important;
    }

    /* Keep the ancestor chain from body down to the preview visible */
    body,
    .invoice-generator-page,
    .invoice-generator-page > .container-custom,
    .invoice-generator-page > .container-custom > .grid:not(.no-print) {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
        width: 100% !important;
    }

    /* The sticky wrapper around the preview */
    .invoice-generator-page .sticky {
        position: static !important;
        display: block !important;
        width: 100% !important;
    }

    /* Show only the invoice preview */
    #invoice-preview {
        display: block !important;
        width: 100%;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        margin: 0;
        padding: 0;
    }

    /* Ensure the accent bar prints */
    #inv-accent-bar {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Table header background prints */
    #preview-table-header,
    #preview-bill-to-card,
    #preview-bank-block {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Typography */
    body {
        font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        color: #1a1a2e;
    }

    /* Page setup */
    @page {
        size: A4 portrait;
        margin: 10mm 14mm;
    }
}
