/* =====================================================================
   Navigator Broking - calculator print layout (shared)

   What you see on the page is what comes out of the printer. The compact
   NavCalcPrint summary (calculator-print.js) re-typesets the numbers into
   a different document; a client who prints their own scenario should get
   back the layout they were just looking at.

   Everything in the print block below is scale, not redesign: the base
   font drops so the on-screen shell fits an A4 column, and each page adds
   its own grid overrides beneath this file.

   Used by: bridging-loan-calculator.html, calculators.html
   Load AFTER styles.css - the brand custom properties come from there.
   ===================================================================== */

/* ---- screen: the print card that sits under a calculator's result ---- */
.print-card {
    text-align: center;
    align-self: start;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}
/* The page's own button style carries; the card only supplies the spacing. */
.print-card > button:first-child { margin-top: 0 !important; }
.print-card .print-note {
    font-size: 0.8rem;
    color: var(--gray);
    margin: 0.7rem 0 0;
}
.print-card .print-alt {
    background: none;
    border: 0;
    padding: 0;
    margin-top: 0.6rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    color: var(--primary-teal);
    text-decoration: underline;
}

/* ---- print-only furniture, hidden on screen ---- */
.print-head, .print-foot { display: none; }

@media print {
    @page { size: A4 portrait; margin: 11mm 9mm 12mm; }

    /* Backgrounds and brand colour are the design, not decoration. */
    *, *::before, *::after {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Scale the whole rem-based layout down to an A4 column instead of
       restyling it. One knob controls print density: 11.5px keeps body
       text at ~7.3pt and stays readable - a client is meant to read this,
       not file it. */
    html { font-size: 11.5px; }
    body { background: #fff !important; }

    /* Site chrome, marketing and interactive-only blocks come off. */
    .header, .calc-hero, .calc-tabs, .explain, .lead-cta, .cta-section,
    .site-footer, .footer, .floating-cta, .floating-cta-left,
    #introBlock, #printCard, .print-card, .print-pdf-btn,
    .disclaimer, .breadcrumb, .vcta, .no-print { display: none !important; }

    .print-head, .print-foot { display: block !important; }

    /* Shadows do not print; a hairline keeps the surface boundary readable. */
    .card, .result-box {
        box-shadow: none !important;
        border: 1px solid #dde3e8 !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* Inputs print as the values they hold, not as form furniture. */
    input[type=number] { -moz-appearance: textfield; appearance: textfield; }
    input[type=number]::-webkit-outer-spin-button,
    input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

    /* ---- masthead: repeats nothing, sits once at the top ---- */
    .print-head {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 16pt;
        border-bottom: 3px solid var(--primary-teal);
        padding-bottom: 6pt;
        margin-bottom: 9pt;
    }
    .print-head img { height: 34px; width: auto; }
    .print-head .ph-r { text-align: right; font-size: 8.5pt; line-height: 1.45; color: #444; }
    .print-head .ph-r .ph-nm { display: block; font-weight: 700; font-size: 10pt; color: #003366; }
    .print-head .ph-r .ph-ph { display: block; font-weight: 700; font-size: 10.5pt; color: var(--primary-teal); }
    .print-head .ph-t { display: block; font-size: 12pt; font-weight: 700; color: #003366; }
    .print-head .ph-d { display: block; font-size: 8.5pt; color: #666; font-weight: 400; }
    .print-head .callout { margin: 0.5rem 0 !important; }

    /* ---- compliance footer: has to travel with the page ---- */
    .print-foot {
        margin-top: 10pt;
        padding-top: 7pt;
        border-top: 1px solid #e5e7eb;
        font-size: 8pt;
        line-height: 1.55;
        color: #777;
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
