/* public/assets/css/print_results.css */

@media print {
    body {
        font-family: Arial, sans-serif;
        font-size: 12pt;
        color: #000 !important; /* Ensure all text is black for printing */
        background-color: #fff !important; /* Ensure white background */
        margin: 20mm; /* Add some margins for printing */
        -webkit-print-color-adjust: exact !important; /* Chrome/Safari: Force exact colors for charts */
        print-color-adjust: exact !important; /* Standard: Force exact colors for charts */
    }

    /* Hide elements not relevant for printing */
    .mynav, /* Your footer class */
    .navbar, /* Common Bootstrap navbar class, adjust if yours is different */
    #banner, /* Assuming your banner has an id="banner" or class */
    .menu-partial, /* Assuming your menu partial has a class or id */
    .btn, /* Hide all buttons */
    .alert-info, /* Hide info alerts if not needed */
    .text-primary { /* Reset primary text color to black */
        color: #000 !important;
    }

    header, footer, nav, aside, .no-print {
        display: none !important;
    }

    .container, .container-fluid {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .card {
        border: 1px solid #ccc !important; /* Simple border for cards */
        box-shadow: none !important; /* Remove shadows */
        page-break-inside: avoid !important; /* Try to keep card content on one page */
        margin-bottom: 20px !important;
    }

    .card-header {
        background-color: #f0f0f0 !important; /* Light gray background for headers */
        color: #000 !important;
        border-bottom: 1px solid #ccc !important;
        padding: 8px !important;
    }
    .card-header h1, .card-header h2, .card-header h3, .card-header h4, .card-header h5 {
        color: #000 !important;
    }

    .card-body {
        padding: 10px !important;
    }

    .list-group-item {
        border-color: #ddd !important;
        color: #000 !important;
        background-color: #fff !important;
    }

    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        page-break-after: avoid !important; /* Try to keep headings with their content */
    }
    h1 { font-size: 18pt; margin-bottom: 15px; }
    h2 { font-size: 16pt; margin-bottom: 10px; }
    h3 { font-size: 14pt; margin-bottom: 8px; }


    /* Chart adjustments */
    canvas {
        max-width: 100% !important;
        height: auto !important; /* Let height adjust, or set a fixed print height */
        /* Consider adding a border to charts if needed for clarity */
        /* border: 1px solid #eee; */
        page-break-inside: avoid !important;
    }

    .row {
        display: block !important; /* Simplify layout for printing */
    }
    .col-md-6, .col { /* Make columns full width for simpler print layout */
        width: 100% !important;
        float: none !important;
        display: block !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Add page breaks before major sections for better organization */
    /* Example: if you have a specific class for section titles */
    /* .section-title-for-print {
        page-break-before: always;
    } */

    /* Ensure links are distinguishable (though they won't be clickable) */
    a {
        color: #000 !important;
        text-decoration: underline !important;
    }
    a[href^="http"]:after {
        content: " (" attr(href) ")"; /* Show full URLs for external links */
        font-size: 90%;
    }
}