/* /assets/css/nap-print.css */

@media print {

    /* --- General Resets & Hiding Unwanted Elements --- */
    body {
        background-color: #fff !important;
        font-size: 11pt;
        line-height: 1.3;
    }

    /* Hide theme elements, admin bar, and the print button itself */
    header,
    footer,
    #secondary, /* Common sidebar ID */
    .sidebar,
    #wpadminbar,
    .print-button,
    #print-pdf-container,
    .shimmer-container,
    .shimmer-message-overlay,
    .site-header, /* Common theme header class */
    .site-footer,  /* Common theme footer class */
    .popup-container /* Hide the info icon on print */
    {
        display: none !important;
    }

    /* --- Cover Page Styling --- */
    .print-cover-page {
        display: flex !important; /* Use important to override screen styles */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        height: 95vh; /* Use vh to approximate a full page */
        text-align: center;
        page-break-after: always; /* CRITICAL: This creates the page break */
    }

    .print-cover-page .print-logo {
        max-width: 200px;
        max-height: 150px;
        margin-bottom: 40px;
    }

    .print-cover-page .print-report-title {
        font-size: 24pt;
        margin-bottom: 20px;
    }

    .print-cover-page .print-site-title {
        font-size: 16pt;
        color: #555 !important;
    }

    /* --- Report Content Styling --- */
    #primary,
    #main,
    .wp-members-nap-report-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background-color: #fff !important;
    }

    /* Hide the main H1 from single-nap-report.php as it's redundant */
    .content-area > main > h1 {
        display: none;
    }

    /* Make all text black for better print readability */
    * {
        color: #000 !important;
        background-color: transparent !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Style links for print */
    a, a:visited {
        text-decoration: underline;
    }

    /* Avoid breaking tables and lists across pages if possible */
    .nap-citation-table, .nap-row {
        page-break-inside: avoid;
    }

    .nap-citation-table th, .nap-citation-table td, .nap-summary-cards, #key-citation-score {
        border: 1px solid #ccc !important;
    }
}