﻿/* Print-friendly styles for Profiler Knowledge Base articles */

@media print {
    /* Hide navigation, buttons, scripts, and non-essential elements */
    header,
    nav,
    .navbar,
    .btn,
    .card-footer,
    footer,
    script,
    [class*="bi-arrow-left"],
    .mb-2.text-muted.small > br {
        display: none !important;
    }

    /* Remove background color, borders, unnecessary shadows */
    body, .card, .bg-light, .container, .box-shadow, .shadow-sm {
        background: #fff !important;
        box-shadow: none !important;
        border: none !important;
    }

    /* Set up the article layout */
    main, .article-content, .card-body {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Make headings bold and clear */
    h1, h2, h3, h4, h5, h6, .kb-title {
        color: #222 !important;
        font-weight: bold !important;
        page-break-after: avoid;
    }

    /* Improve paragraph legibility */
    p, li, .fs-5 {
        color: #222 !important;
        font-size: 1rem !important;
        line-height: 1.7 !important;
        margin-bottom: 1rem;
    }

    /* Print images at full available width, avoid page break in images */
    img {
        max-width: 100% !important;
        height: auto !important;
        page-break-inside: avoid;
        margin: 1rem 0;
        border: 1px solid #ddd;
    }

    /* Keywords bar at the bottom of the article section */
    .card-footer {
        display: block !important;
        border-top: 1px solid #ccc !important;
        background: #fff !important;
        color: #555 !important;
        margin-top: 2rem;
        font-size: 0.95rem;
    }

    /* Article metadata: published date and article # */
    .mb-2.text-muted.small, .article-content .small {
        color: #555 !important;
        font-size: 0.93rem !important;
        margin-bottom: 0.5rem;
        font-style: italic;
    }

    /* Blockquotes/messages styled as info blocks */
    .wp-block-hb-message--withicon,
    .is-style-info,
    .wp-block-ht-blocks-messages {
        border-left: 4px solid #5bc0de !important;
        background: #f8f9fa !important;
        padding: 0.75em 1em 0.75em 1.2em !important;
        font-size: 1rem !important;
        color: #1c4a62 !important;
        margin-bottom: 1rem !important;
    }

    /* Remove unnecessary spacing from containers/rows/columns */
    .container, .row, .col-12, .col-lg-12, .mx-auto, .py-3, .py-4, .mb-3, .mb-2 {
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Remove URL display after links for clean print */
    a[href]:after {
        content: "";
    }

    /* Avoid page breaks inside article card, headings, images */
    .card, .card-body, h1, h2, img {
        page-break-inside: avoid;
    }

    /* Optional: Add copyright in print footer bottom right */
    @page {
        margin: 1cm;
    }

    body:after {
        content: "© Profiler Software, 2008 - 2025";
        display: block;
        position: fixed;
        bottom: 10px;
        right: 10px;
        color: #aaa;
        font-size: 0.9em;
    }
}
