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

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

/* Template variants – scoped to #agreement-preview */
#agreement-preview.tpl-formal #agr-accent-bar   { height: 4px; }
#agreement-preview.tpl-minimal #agr-accent-bar  { display: none; }
#agreement-preview.tpl-minimal { border-radius: 0.5rem; }

#agreement-preview.tpl-formal > .p-8  { padding: 2.5rem; }
#agreement-preview.tpl-minimal > .p-8 { padding: 2rem; }

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

    /* Hide non-agreement chrome */
    .no-print,
    header,
    footer,
    nav,
    .cookie-consent,
    .toast-container,
    #command-palette {
        display: none !important;
    }

    /* Keep ancestor chain visible */
    body,
    .agreement-generator-page,
    .agreement-generator-page > .container-custom,
    .agreement-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 */
    .agreement-generator-page .sticky {
        position: static !important;
        display: block !important;
        width: 100% !important;
    }

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

    /* Ensure accent bar and colored blocks print */
    #agr-accent-bar,
    #preview-parties-card,
    .preview-clause-number {
        -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: 12mm 16mm;
    }

    /* Avoid breaking inside clauses */
    .preview-clause-item {
        page-break-inside: avoid;
    }

    /* Signature block stays together */
    .preview-signatures {
        page-break-inside: avoid;
    }
}
