/**
 * Print Styles
 *
 * Optimized styling for printing
 * @package ROI_Theme
 * @since 1.0.0
 */

/* Hide elements that shouldn't print */
@media print {
    /* Hide navigation, sidebars, and non-essential elements */
    header,
    nav,
    .navbar,
    .sidebar,
    .widget-area,
    .comments,
    .comment-form,
    .footer-widget,
    .pagination,
    .breadcrumb,
    .back-to-top,
    .share-buttons,
    .related-posts,
    button,
    input[type="button"],
    input[type="submit"],
    .btn,
    .modal,
    .overlay,
    .skip-link {
        display: none !important;
    }

    /* Hide footer links and widgets */
    footer {
        display: none !important;
    }

    /* Body styles */
    body {
        margin: 0;
        padding: 0;
        background: white;
        color: #000;
        font-size: 12pt;
        line-height: 1.5;
        font-family: Georgia, serif;
    }

    /* Container and content */
    .container,
    .content,
    main,
    article {
        width: 100%;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }

    /* Headings */
    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        page-break-after: avoid;
        color: #000;
        margin: 0.5em 0;
    }

    h1 {
        font-size: 24pt;
    }

    h2 {
        font-size: 18pt;
    }

    h3 {
        font-size: 16pt;
    }

    /* Paragraphs */
    p {
        orphans: 3;
        widows: 3;
        page-break-inside: avoid;
    }

    /* Links */
    a,
    a:visited {
        text-decoration: underline;
        color: #000;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }

    /* Exclude certain links from showing URL */
    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }

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

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

    table,
    th,
    td {
        border: 1px solid #000;
    }

    th,
    td {
        padding: 8px;
        text-align: left;
    }

    thead {
        display: table-header-group;
        page-break-after: avoid;
    }

    tfoot {
        display: table-footer-group;
        page-break-before: avoid;
    }

    tr {
        page-break-inside: avoid;
    }

    /* Lists */
    ul,
    ol {
        margin: 0.5em 0;
        padding-left: 2em;
    }

    li {
        page-break-inside: avoid;
    }

    /* Code blocks */
    pre,
    code {
        border: 1px solid #999;
        background-color: #f5f5f5;
        padding: 1em;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

    /* Blockquotes */
    blockquote {
        border-left: 5px solid #ccc;
        margin: 0;
        padding-left: 1em;
        page-break-inside: avoid;
    }

    /* Forms */
    form {
        display: none;
    }

    /* Page breaks */
    .page-break,
    .page-break-before {
        page-break-before: always;
    }

    .page-break-after {
        page-break-after: always;
    }

    /* Margins */
    @page {
        margin: 2cm;
        orphans: 3;
        widows: 3;
    }

    /* Print title and date */
    .print-header {
        page-break-after: avoid;
        margin-bottom: 1em;
        border-bottom: 2px solid #000;
        padding-bottom: 0.5em;
    }

    .print-date {
        font-size: 10pt;
        color: #666;
    }
}
