/* Print Stylesheet for Orchestrator Documentation */
/* Optimized for clean, readable printed documentation */

@media print {
    /* Page setup */
    @page {
        margin: 2cm;
        size: A4;
    }

    /* Reset colors to black and white */
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Use serif fonts for better print readability */
    body {
        font-family: Georgia, 'Times New Roman', Times, serif !important;
        font-size: 12pt;
        line-height: 1.5;
    }

    /* Hide interactive and navigation elements */
    .site-header,
    .sidebar,
    .right-sidebar,
    .header-search,
    button,
    input,
    .notice,
    .cards-grid,
    .infobox-image {
        display: none !important;
    }

    /* Main content takes full width */
    .main-container {
        display: block !important;
        max-width: 100% !important;
    }

    .content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Typography */
    h1 {
        font-size: 24pt;
        margin-bottom: 12pt;
        page-break-after: avoid;
    }

    h2 {
        font-size: 18pt;
        margin-top: 18pt;
        margin-bottom: 9pt;
        page-break-after: avoid;
    }

    h3 {
        font-size: 14pt;
        margin-top: 12pt;
        margin-bottom: 6pt;
        page-break-after: avoid;
    }

    h4, h5, h6 {
        font-size: 12pt;
        margin-top: 9pt;
        margin-bottom: 6pt;
        page-break-after: avoid;
    }

    p {
        margin-bottom: 9pt;
        orphans: 3;
        widows: 3;
    }

    /* Links - show URLs after link text */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        font-weight: normal;
    }

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

    /* Code blocks */
    pre, code {
        font-family: 'Courier New', Courier, monospace;
        font-size: 10pt;
        border: 1px solid #000;
        page-break-inside: avoid;
    }

    pre {
        padding: 6pt;
        margin: 9pt 0;
        background: #f5f5f5 !important;
        white-space: pre-wrap;
        word-wrap: break-word;
    }

    code {
        padding: 1pt 3pt;
        background: #f5f5f5 !important;
    }

    pre code {
        border: none;
        padding: 0;
    }

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

    th, td {
        border: 1px solid #000;
        padding: 6pt;
        text-align: left;
    }

    th {
        background: #e0e0e0 !important;
        font-weight: bold;
    }

    /* Lists */
    ul, ol {
        margin: 9pt 0;
        padding-left: 24pt;
    }

    li {
        margin-bottom: 3pt;
    }

    /* Infobox - simplified for print */
    .infobox {
        float: right;
        width: 40%;
        margin: 0 0 9pt 12pt;
        border: 2px solid #000;
        padding: 6pt;
        page-break-inside: avoid;
    }

    .infobox-header {
        font-weight: bold;
        font-size: 14pt;
        text-align: center;
        margin-bottom: 6pt;
        border-bottom: 1px solid #000;
        padding-bottom: 3pt;
    }

    .infobox-row {
        display: flex;
        border-top: 1px solid #000;
        padding: 3pt 0;
    }

    .infobox-row:first-of-type {
        border-top: none;
    }

    .infobox-label {
        width: 40%;
        font-weight: bold;
    }

    .infobox-value {
        width: 60%;
    }

    /* TOC - keep but simplify */
    .toc {
        border: 1px solid #000;
        padding: 9pt;
        margin: 12pt 0;
        page-break-inside: avoid;
        background: #f5f5f5 !important;
    }

    .toc-title {
        font-weight: bold;
        text-align: center;
        margin-bottom: 6pt;
    }

    /* Page breaks */
    .content-header {
        page-break-after: avoid;
    }

    blockquote {
        page-break-inside: avoid;
        border-left: 3px solid #000;
        padding-left: 12pt;
        margin: 9pt 0;
    }

    /* Breadcrumbs - show but simplify */
    .breadcrumb {
        font-size: 10pt;
        margin-bottom: 9pt;
        padding-bottom: 6pt;
        border-bottom: 1px solid #000;
    }

    .breadcrumb a:after {
        content: "";
    }

    /* Last updated timestamp */
    .last-updated {
        font-size: 10pt;
        font-style: italic;
        margin-top: 12pt;
        padding-top: 6pt;
        border-top: 1px solid #000;
    }

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

    /* Cards - convert to simple list for print */
    .card {
        border: 1px solid #000;
        padding: 6pt;
        margin-bottom: 9pt;
        page-break-inside: avoid;
    }

    .card-icon {
        display: none;
    }

    /* Version badges */
    .version-badge {
        border: 1px solid #000;
        padding: 2pt 6pt;
        font-weight: bold;
    }

    /* Avoid breaking these elements across pages */
    ul, ol, dl, table, pre, blockquote, .card, .infobox {
        page-break-inside: avoid;
    }

    /* Ensure headings stay with following content */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }

    /* Add page breaks before major sections */
    h2 {
        page-break-before: auto;
    }

    /* First heading should not break */
    h1:first-child,
    h2:first-child {
        page-break-before: avoid;
    }
}
