/* NAISAR Print Stylesheet */
.print-body {
    background: white;
    color: #1a1a1a;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.7;
    padding: 0;
    margin: 0;
}

.print-page {
    max-width: 210mm;
    margin: 0 auto;
    padding: 20mm 25mm;
}

/* Print header */
.print-header {
    border-bottom: 2px solid #0a1628;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.print-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.print-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.print-brand-text {
    display: flex;
    flex-direction: column;
}

.print-brand-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0a1628;
    letter-spacing: 0.05em;
}

.print-brand-sub {
    font-size: 0.65rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.print-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem 1.5rem;
}

.print-meta-row {
    display: flex;
    gap: 0.5rem;
}

.print-meta-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    min-width: 70px;
}

.print-meta-value {
    font-size: 0.8rem;
    color: #333;
    font-weight: 500;
}

/* Print content */
.print-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #0a1628;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.print-abstract {
    font-size: 0.95rem;
    font-style: italic;
    color: #555;
    border-left: 3px solid #d4af37;
    padding-left: 1rem;
    margin-bottom: 2rem;
}

.print-article-body {
    font-size: 0.95rem;
    line-height: 1.75;
    color: #222;
}

.print-article-body h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    color: #0a1628;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.3rem;
}

.print-article-body h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    color: #1a2332;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.print-article-body p {
    margin-bottom: 0.75rem;
}

.print-article-body ul,
.print-article-body ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.print-article-body li {
    margin-bottom: 0.3rem;
}

.print-article-body blockquote {
    border-left: 3px solid #d4af37;
    padding-left: 1rem;
    margin-left: 0;
    font-style: italic;
    color: #444;
}

.print-article-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.print-article-body th,
.print-article-body td {
    border: 1px solid #ccc;
    padding: 0.4rem 0.6rem;
    text-align: left;
}

.print-article-body th {
    background: #f5f5f5;
    font-weight: 600;
}

/* Citations in print */
.print-article-body sup.citation {
    font-size: 0.65em;
    color: #b8953a;
}

.print-article-body sup.citation a {
    color: #b8953a;
    text-decoration: none;
}

/* Print references section */
.print-references {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ddd;
}

.print-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    color: #0a1628;
    margin-bottom: 1rem;
}

.print-reference-list {
    padding-left: 0;
    list-style: none;
    counter-reset: ref-counter;
}

.print-reference-item {
    counter-increment: ref-counter;
    margin-bottom: 0.75rem;
    padding-left: 2rem;
    position: relative;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #333;
}

.print-reference-item::before {
    content: "[" counter(ref-counter) "]";
    position: absolute;
    left: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #888;
}

.print-ref-key {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: #b8953a;
    margin-right: 0.3rem;
}

.print-ref-title {
    font-weight: 600;
}

.print-ref-detail {
    color: #555;
}

.print-ref-url {
    display: block;
    color: #666;
    font-size: 0.75rem;
    word-break: break-all;
    margin-top: 2px;
}

/* Print footer */
.print-footer {
    margin-top: 3rem;
    padding-top: 1rem;
}

.print-footer-line {
    height: 1px;
    background: #ddd;
    margin-bottom: 1rem;
}

.print-footer-text {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.print-footer-legal {
    font-size: 0.7rem;
    color: #888;
    font-style: italic;
    line-height: 1.5;
}

/* Print actions (screen only) */
.print-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0a1628;
    padding: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

/* Hide actions when actually printing */
@media print {
    .print-actions {
        display: none !important;
    }

    body {
        background: white !important;
    }

    .print-page {
        padding: 0;
        max-width: none;
    }

    .print-header {
        page-break-after: avoid;
    }

    .print-content {
        page-break-before: auto;
    }

    .print-references {
        page-break-before: auto;
    }

    .print-footer {
        page-break-inside: avoid;
    }

    h2, h3 {
        page-break-after: avoid;
    }

    p, li {
        orphans: 3;
        widows: 3;
    }

    table {
        page-break-inside: avoid;
    }

    .citation a {
        text-decoration: none;
        color: inherit;
    }

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

    a[href^="/"]::after {
        content: " (https://naisar.org.au" attr(href) ")";
    }
}