/**
 * Print Stylesheet for orthodox-resources.com
 * Optimized for printing scholarly patristic texts
 */

@media print {
    /* ==========================================================================
       Hide non-essential elements
       ========================================================================== */
    .sidebar,
    .sidebar-toggle,
    .sidebar-overlay,
    .page-nav,
    .breadcrumbs,
    .note-trigger .arrow,
    .site-footer {
        display: none !important;
    }

    /* ==========================================================================
       Reset layout for print
       ========================================================================== */
    * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    html, body {
        width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
    }

    .site-wrapper {
        display: block;
    }

    .main-wrapper {
        margin-left: 0 !important;
    }

    .main-content {
        padding: 0;
        max-width: 100%;
        width: 100%;
    }

    /* ==========================================================================
       Typography for print
       ========================================================================== */
    body {
        font-family: 'Times New Roman', Times, Georgia, serif;
        font-size: 11pt;
        line-height: 1.6;
    }

    .page-header {
        text-align: center;
        margin-bottom: 24pt;
        padding-bottom: 12pt;
        border-bottom: 1pt solid #333;
    }

    .page-header h1 {
        font-size: 16pt;
        font-weight: bold;
        margin: 0;
        letter-spacing: 0.5pt;
    }

    h2, .chapter-heading {
        font-size: 12pt;
        font-weight: bold;
        margin-top: 18pt;
        margin-bottom: 10pt;
        text-transform: uppercase;
        letter-spacing: 0.5pt;
    }

    p {
        text-align: justify;
        margin-bottom: 10pt;
        orphans: 3;
        widows: 3;
    }

    /* ==========================================================================
       Drop caps for print
       ========================================================================== */
    .drop-cap-illuminated {
        float: left;
        font-size: 36pt;
        line-height: 0.8;
        padding-right: 6pt;
        padding-top: 4pt;
        font-weight: bold;
        color: #000 !important;
    }

    /* ==========================================================================
       Links
       ========================================================================== */
    a {
        text-decoration: none;
    }

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

    /* Print URLs for external links */
    a[href^="http"]:after {
        content: " [" attr(href) "]";
        font-size: 8pt;
        font-style: italic;
    }

    /* ==========================================================================
       Footnotes - expand all and style for print
       ========================================================================== */
    .note-trigger {
        font-size: 9pt;
        font-weight: bold;
        vertical-align: super;
        border: none !important;
        padding: 0 2pt !important;
    }

    .note-trigger span:first-child {
        /* Just show the note number */
    }

    .note-expandable {
        display: block !important;
        max-height: none !important;
        overflow: visible !important;
        margin: 12pt 0 !important;
        padding: 10pt 12pt !important;
        border-left: 2pt solid #666 !important;
        page-break-inside: avoid;
    }

    .note-expandable.open {
        display: block !important;
    }

    .note-header {
        border-bottom: none !important;
        padding-bottom: 4pt !important;
        margin-bottom: 6pt !important;
    }

    .note-number {
        font-weight: bold;
        font-size: 10pt;
    }

    .note-content {
        font-size: 10pt;
        line-height: 1.5;
    }

    .note-content p {
        margin-bottom: 6pt;
    }

    /* Subpoints in footnotes */
    .subpoint {
        margin-top: 8pt;
        padding: 6pt 8pt;
        border-left: 1pt solid #999;
        page-break-inside: avoid;
    }

    .subpoint-label {
        font-weight: bold;
        font-size: 9pt;
        margin-bottom: 4pt;
    }

    /* Footnote citations */
    .footcite {
        font-size: 9pt;
        font-style: italic;
    }

    /* ==========================================================================
       Inline citations
       ========================================================================== */
    .citation {
        display: block;
        margin: 8pt 0;
        padding: 6pt 10pt;
        border-left: 2pt solid #999;
        font-size: 9pt;
        font-style: italic;
    }

    /* ==========================================================================
       Greek text
       ========================================================================== */
    .greek {
        font-style: italic;
    }

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

    h2, .chapter-heading {
        page-break-after: avoid;
    }

    .note-expandable {
        page-break-inside: avoid;
    }

    .subpoint {
        page-break-inside: avoid;
    }

    /* Avoid breaks right after headings */
    h2 + p,
    .chapter-heading + p {
        page-break-before: avoid;
    }

    /* ==========================================================================
       Page margins and headers
       ========================================================================== */
    @page {
        margin: 0.75in;
        size: letter;
    }

    @page :first {
        margin-top: 1in;
    }
}
