/* Print-specific styles */
@media print {
    /* General print settings */
    body {
        margin: 0;
        padding: 0;
        font-family: 'Arial', sans-serif;
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background-color: #fff;
    }
    
    /* Hide non-printable elements */
    .no-print, .sidebar, header, footer, nav, button,
    .button-container, .search-container {
        display: none !important;
    }
    
    /* Main content adjustments */
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    .content {
        padding: 0 !important;
    }
    
    /* Page breaks */
    h1, h2, h3, h4 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }
    
    p, li {
        page-break-inside: avoid;
    }
    
    table, img, figure {
        page-break-inside: avoid;
    }
    
    /* Link handling */
    a {
        color: #000 !important;
        text-decoration: none !important;
    }
    
    a:after {
        content: " (" attr(href) ")";
        font-size: 90%;
        color: #333;
    }
    
    /* Internal links or references don't need URL printed */
    a[href^="#"]:after {
        content: "";
    }
    
    /* Print background colors and images */
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Improve table readability */
    table {
        border-collapse: collapse;
        width: 100%;
        margin-bottom: 1.5em;
    }
    
    th, td {
        border: 1px solid #333;
        padding: 8px;
        text-align: left;
    }
    
    th {
        background-color: #f0f0f0 !important;
        font-weight: bold;
    }
    
    /* Add a header with page title */
    @page {
        margin: 2cm;
    }
    
    /* Ensure that background colors are printed */
    .instructions, .section-header, .interpretation {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
