/* ThermoFluidCalc — Professional Engineering Calculation Report Print Stylesheet */
@media print {
    /* Reset background and text colors for high-contrast crisp printing */
    *, *::before, *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
        font-size: 11pt !important;
        line-height: 1.5 !important;
        background: #fff !important;
        color: #1e293b !important;
        margin: 0 !important;
        padding: 10mm !important;
    }

    /* Hide non-printable navigation, header, footer, sidebars, buttons */
    .tfc-header,
    .tfc-footer,
    .tfc-col-left,
    .tfc-col-right,
    .tfc-nav,
    .tfc-theme-btn,
    .tfc-mobile-toggle,
    .tfc-btn-calc,
    .tfc-export-toolbar,
    .tfc-preset-bar,
    .tfc-sidebar,
    .tfc-pagination,
    .no-print {
        display: none !important;
    }

    /* Page container layout */
    .tfc-main-wrapper,
    .tfc-calc-container,
    .tfc-3col-layout,
    .tfc-calc-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }

    /* Professional Engineering Header on Printed Document */
    .tfc-print-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        border-bottom: 2px solid #0f172a;
        padding-bottom: 8px;
        margin-bottom: 16px;
    }

    .tfc-print-header h1 {
        font-size: 16pt !important;
        margin: 0 !important;
        font-weight: 800;
        color: #0f172a !important;
    }

    .tfc-print-meta {
        font-size: 9pt;
        color: #475569 !important;
        text-align: right;
    }

    /* Engineering Summary Cards */
    .tfc-results-grid,
    .tfc-kpi-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 15px !important;
    }

    .tfc-kpi-card,
    .tfc-result-card {
        border: 1px solid #cbd5e1 !important;
        border-radius: 4px !important;
        padding: 8px 12px !important;
        background: #f8fafc !important;
        page-break-inside: avoid;
    }

    .tfc-kpi-val {
        font-size: 14pt !important;
        font-weight: 700 !important;
        color: #0f172a !important;
    }

    .tfc-kpi-lbl {
        font-size: 8.5pt !important;
        color: #475569 !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Tables */
    table, .tfc-table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin: 12px 0 !important;
        font-size: 9.5pt !important;
    }

    table th, table td {
        border: 1px solid #cbd5e1 !important;
        padding: 6px 10px !important;
        text-align: left;
    }

    table th {
        background-color: #f1f5f9 !important;
        font-weight: 700 !important;
    }

    /* Canvas and Charts in Print */
    canvas {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
        border: 1px solid #e2e8f0 !important;
        margin: 10px 0 !important;
    }

    .tfc-charts-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 15px !important;
        page-break-inside: avoid;
    }

    /* Calculation Verification Footer */
    .tfc-print-footer {
        display: block !important;
        margin-top: 24px;
        padding-top: 10px;
        border-top: 1px solid #cbd5e1;
        font-size: 8.5pt;
        color: #64748b !important;
        page-break-inside: avoid;
    }

    .tfc-signatures {
        display: flex !important;
        justify-content: space-between;
        margin-top: 30px;
        padding-top: 10px;
    }

    .tfc-sig-box {
        width: 45%;
        border-top: 1px dashed #94a3b8;
        padding-top: 5px;
        font-size: 8.5pt;
    }

    /* Page Breaks */
    .page-break {
        page-break-before: always;
    }
}
