/* src/Modules/Insights/Insights.UI/wwwroot/css/insights.print.css */
@media print {
    @page {
        size: A4;
        margin: 12mm;
    }

    /* Hide app shell and chrome that doesn't belong on paper. */
    aside.sidebar,
    nav.app-nav,
    header.app-header,
    .app-footer,
    .breadcrumb,
    .tabs__nav,
    .export-xls,
    button:not(.print-keep) {
        display: none !important;
    }

    /* Promote the customer/location header to a prominent title. */
    .page-title,
    .trends-panel__head h2,
    h1.detail-page__title {
        font-size: 18pt;
        font-weight: 700;
        margin: 0 0 8mm 0;
        page-break-after: avoid;
    }

    /* Keep the chart on a single page when possible. */
    .trend-chart,
    .apexcharts-canvas {
        break-inside: avoid;
        page-break-inside: avoid;
        max-width: 100%;
    }

    /* KPI grid wraps to A4 width. */
    .insight-kpi-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 6mm;
    }
    .insight-kpi-grid > * {
        flex: 1 1 30%;
        min-width: 50mm;
        break-inside: avoid;
    }

    /* Force backgrounds for legibility (delta badges etc.). */
    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* Body width override — Blazor / Fluent layouts often constrain to viewport. */
    body, .app-shell, .content-area {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
    }
}
