/* PlushPulse Print Stylesheet
   ============================
   Optimised for printing articles. Removes navigation,
   sidebar, social elements. Keeps article body clean.
*/

@media print {
    /* Hide non-content elements */
    header,
    footer,
    nav,
    .pp-nav,
    .pp-footer,
    .pp-subscribe-banner,
    .pp-newsletter-form,
    .pp-language-switcher,
    .pp-social-share,
    .pp-related-articles,
    .pp-breaking-ticker,
    .pp-reading-progress,
    .pp-comments,
    #pp-slide-capture,
    #pp-exit-overlay,
    [data-members-form] {
        display: none !important;
    }

    /* Reset background and colors for print */
    body,
    main,
    article {
        background: white !important;
        color: #1C1917 !important;
        font-size: 11pt;
        line-height: 1.6;
        margin: 0;
        padding: 0;
    }

    /* Article title */
    h1 {
        font-size: 18pt;
        font-weight: 700;
        margin-bottom: 0.5em;
        color: #1C1917 !important;
    }

    /* Section headings */
    h2 {
        font-size: 14pt;
        font-weight: 700;
        margin-top: 1.5em;
        margin-bottom: 0.5em;
        page-break-after: avoid;
    }

    h3 {
        font-size: 12pt;
        font-weight: 600;
        margin-top: 1.2em;
        margin-bottom: 0.4em;
        page-break-after: avoid;
    }

    /* Body text */
    p {
        margin-bottom: 0.7em;
        orphans: 3;
        widows: 3;
    }

    /* Links — show URL in brackets */
    a {
        color: #1C1917 !important;
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #78716C;
        word-break: break-all;
    }

    /* Don't show URLs for internal/anchor links */
    a[href^="#"]::after,
    a[href^="javascript"]::after {
        content: "";
    }

    /* Images */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    /* Tables */
    table {
        border-collapse: collapse;
        width: 100%;
        page-break-inside: avoid;
    }

    th, td {
        border: 1px solid #D6D3D1;
        padding: 6px 8px;
        font-size: 10pt;
    }

    th {
        background: #F5F5F4 !important;
        font-weight: 600;
    }

    /* Code blocks */
    pre, code {
        font-size: 9pt;
        background: #F5F5F4 !important;
        border: 1px solid #E7E5E4;
        padding: 2px 4px;
    }

    pre {
        padding: 8px;
        page-break-inside: avoid;
    }

    /* Blockquotes */
    blockquote {
        border-left: 3px solid #7C3AED;
        padding-left: 12px;
        margin-left: 0;
        font-style: italic;
    }

    /* Page breaks */
    h1, h2, h3 {
        page-break-after: avoid;
    }

    article {
        page-break-before: avoid;
    }

    /* PlushPulse branding in print footer */
    @page {
        margin: 2cm;
    }

    /* Add source attribution */
    article::after {
        content: "Printed from PlushPulse (plushpulse.net). © " attr(data-year) " PlushPulse. All rights reserved.";
        display: block;
        margin-top: 2em;
        padding-top: 1em;
        border-top: 1px solid #D6D3D1;
        font-size: 9pt;
        color: #78716C;
    }
}
