/*
 * TERRA ICON theme-independent print contract.
 *
 * This file intentionally uses black and white print colours rather than the
 * screen-theme tokens. It loads after all page styles and only for print.
 */

@media print {
    :root,
    :root[data-theme="dark-gold"],
    :root[data-theme="light-gold"] {
        color-scheme: light;
    }

    *,
    *::before,
    *::after {
        text-shadow: none !important;
        box-shadow: none !important;
    }

    html,
    body {
        color: #000 !important;
        background: #fff !important;
        scroll-behavior: auto;
    }

    body {
        min-height: auto;
    }

    .site-header,
    .site-footer,
    .mobile-menu,
    .app-bottom-nav,
    .site-glow,
    .theme-toggle,
    .admin-nav,
    .admin-topbar-actions,
    .journal-detail-toolbar,
    .journal-related,
    [role="dialog"],
    [data-mobile-menu] {
        display: none !important;
    }

    .site-main,
    .container,
    .admin-shell,
    .admin-page .container {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .premium-card,
    .admin-page .premium-card,
    .journal-article,
    .journal-detail-shell,
    .journal-article-content,
    table,
    thead,
    tbody,
    tr,
    th,
    td,
    input,
    select,
    textarea {
        color: #000 !important;
        background: #fff !important;
    }

    .premium-card,
    .admin-page .premium-card,
    table,
    th,
    td,
    input,
    select,
    textarea {
        border-color: #777 !important;
    }

    .premium-card::before,
    .premium-card::after {
        display: none !important;
    }

    a,
    a:visited {
        color: #000 !important;
        text-decoration: underline;
    }

    img,
    svg,
    video,
    .premium-card,
    table,
    tr {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    img,
    video {
        max-height: 240mm;
        object-fit: contain;
    }

    thead {
        display: table-header-group;
    }

    tfoot {
        display: table-footer-group;
    }

    @page {
        margin: 14mm;
    }
}
