/**
 * Messiah 2027 - Professional Print Styles
 * Optimized for printing calculation pages and documentation
 */

@media print {
    /* Reset and basic setup */
    * {
        background: transparent !important;
        box-shadow: none !important;
        text-shadow: none !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    
    html {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    body {
        background: white !important;
        font-family: "Times New Roman", serif;
        font-size: 12pt;
        line-height: 1.5;
        color: #000 !important;
        margin: 0;
        padding: 20mm;
    }
    
    /* Hide navigation and interactive elements */
    .nav,
    .mobile-toggle,
    .nav-overlay,
    .page-loader,
    .scroll-indicator,
    .btn,
    button,
    .footer-links,
    .error-actions,
    .cta-group,
    .call-to-action {
        display: none !important;
    }
    
    /* Hide non-essential sections for calculations */
    .hero::before,
    .beast-preview::before,
    .confirmation-hero::before {
        display: none !important;
    }
    
    /* Page structure */
    .container {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Headers and typography */
    h1 {
        font-size: 18pt;
        font-weight: bold;
        color: #000 !important;
        margin-bottom: 12pt;
        page-break-after: avoid;
    }
    
    h2 {
        font-size: 16pt;
        font-weight: bold;
        color: #000 !important;
        margin-top: 24pt;
        margin-bottom: 12pt;
        page-break-after: avoid;
    }
    
    h3 {
        font-size: 14pt;
        font-weight: bold;
        color: #000 !important;
        margin-top: 18pt;
        margin-bottom: 9pt;
        page-break-after: avoid;
    }
    
    h4, h5, h6 {
        font-size: 12pt;
        font-weight: bold;
        color: #000 !important;
        margin-top: 12pt;
        margin-bottom: 6pt;
        page-break-after: avoid;
    }
    
    p {
        margin-bottom: 12pt;
        orphans: 3;
        widows: 3;
        color: #000 !important;
    }
    
    /* Special styling for important text */
    .year-display {
        font-size: 24pt !important;
        font-weight: bold !important;
        color: #000 !important;
        text-align: center;
        margin: 24pt 0;
        background: none !important;
        -webkit-text-fill-color: #000 !important;
    }
    
    .sacred-name {
        font-weight: bold !important;
        color: #000 !important;
        text-decoration: underline;
    }
    
    .emphasis,
    strong {
        font-weight: bold !important;
        color: #000 !important;
    }
    
    /* Tables - essential for calculations */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin: 12pt 0 !important;
        font-size: 11pt;
        page-break-inside: avoid;
    }
    
    th {
        background: #f0f0f0 !important;
        border: 1pt solid #000 !important;
        padding: 6pt !important;
        font-weight: bold !important;
        text-align: left !important;
        color: #000 !important;
    }
    
    td {
        border: 1pt solid #000 !important;
        padding: 6pt !important;
        color: #000 !important;
    }
    
    tr.highlight td {
        background: #f5f5f5 !important;
        font-weight: bold !important;
        color: #000 !important;
    }
    
    /* Calculation specific styling */
    .calculation-table {
        background: none !important;
        border: 1pt solid #000 !important;
        margin: 12pt 0 !important;
        padding: 0 !important;
    }
    
    .formula-box {
        border: 1pt solid #000 !important;
        background: #f9f9f9 !important;
        padding: 12pt !important;
        margin: 12pt 0 !important;
        font-family: "Courier New", monospace;
        font-size: 11pt;
    }
    
    .note {
        background: #f0f0f0 !important;
        border-left: 3pt solid #000 !important;
        padding: 6pt 12pt !important;
        margin: 12pt 0 !important;
        font-style: italic;
    }
    
    /* Scripture quotes */
    .scripture-quote,
    .prophetic-verse {
        background: #f9f9f9 !important;
        border-left: 3pt solid #000 !important;
        padding: 12pt !important;
        margin: 12pt 0 !important;
        font-style: italic;
        page-break-inside: avoid;
    }
    
    .scripture-quote blockquote {
        margin: 0 !important;
        color: #000 !important;
    }
    
    .scripture-quote cite,
    .verse-reference {
        display: block !important;
        text-align: right !important;
        margin-top: 6pt !important;
        font-size: 10pt !important;
        color: #666 !important;
    }
    
    /* Cards and sections */
    .point-card,
    .card,
    .confirmation-box,
    .event-card {
        border: 1pt solid #000 !important;
        background: none !important;
        padding: 12pt !important;
        margin: 12pt 0 !important;
        page-break-inside: avoid;
    }
    
    .point-number,
    .confirmation-year,
    .beast-year {
        font-size: 14pt !important;
        font-weight: bold !important;
        color: #000 !important;
        margin-bottom: 6pt !important;
    }
    
    .point-title,
    .calc-title {
        font-weight: bold !important;
        color: #000 !important;
        margin-bottom: 6pt !important;
    }
    
    /* Page breaks */
    .calculation-section,
    .beast-preview,
    section {
        page-break-before: auto;
        page-break-after: auto;
        page-break-inside: auto;
    }
    
    /* Avoid breaks after headings */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    /* Avoid breaks before important elements */
    table, .formula-box, .scripture-quote, .calculation-table {
        page-break-before: avoid;
    }
    
    /* Links */
    a {
        text-decoration: underline !important;
        color: #000 !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666;
    }
    
    /* Don't show URLs for internal links */
    a[href^="/"]:after,
    a[href^="#"]:after,
    a[href="/"]:after {
        content: "";
    }
    
    /* Header for each page */
    @page {
        size: A4;
        margin: 20mm;
        
        @top-center {
            content: "Messiah 2027 - Mathematical Certainty";
            font-family: "Times New Roman", serif;
            font-size: 10pt;
            color: #666;
            border-bottom: 1pt solid #000;
            padding-bottom: 3pt;
        }
        
        @bottom-right {
            content: "Page " counter(page) " of " counter(pages);
            font-family: "Times New Roman", serif;
            font-size: 9pt;
            color: #666;
        }
    }
    
    /* First page header */
    @page :first {
        @top-center {
            content: "";
        }
    }
    
    /* Grid layouts for print */
    .confirmation-grid,
    .points-grid,
    .suggestion-grid {
        display: block !important;
    }
    
    .confirmation-grid > *,
    .points-grid > *,
    .suggestion-grid > * {
        margin-bottom: 12pt !important;
        page-break-inside: avoid;
    }
    
    /* Beast timeline for print */
    .beast-timeline {
        display: block !important;
    }
    
    .beast-date {
        margin-bottom: 12pt !important;
        border-bottom: 1pt solid #000 !important;
        padding-bottom: 6pt !important;
    }
    
    /* Hide animations and transitions */
    *,
    *:before,
    *:after {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
    
    /* Print-specific utility classes */
    .print-only {
        display: block !important;
    }
    
    .no-print {
        display: none !important;
    }
    
    .page-break-before {
        page-break-before: always;
    }
    
    .page-break-after {
        page-break-after: always;
    }
    
    .keep-together {
        page-break-inside: avoid;
    }
    
    /* Footer information */
    footer {
        border-top: 1pt solid #000 !important;
        padding-top: 12pt !important;
        margin-top: 24pt !important;
        text-align: center !important;
        font-size: 10pt !important;
        color: #666 !important;
    }
}