/* Printing a rendered document or slides (see RenderPrint). Only the print container prints, and
   only while RenderPrint is printing, so printing anything else is unaffected. The pages have no
   margins, which also stops Chrome adding its own headers and footers in them. */

div.text-print {
    display: none;
}

@page text-document {
    size: portrait;
    margin: 0;
}

/* The slides' own size and shape, so each fills a page exactly */
@page text-slides {
    size: 1600px 900px;
    margin: 0;
}

@media print {
    body.text-printing > :not(div.text-print) {
        display: none !important;
    }

    body.text-printing {
        height: auto !important;
        overflow: visible !important;
        background-color: white;
    }

    div.text-print {
        display: block;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* The page margins, as padding, repeated on every page the document breaks across */
    div.qt-render.text-print-document {
        page: text-document;
        min-height: 0;
        padding: 15mm 18mm;
        -webkit-box-decoration-break: clone;
        box-decoration-break: clone;
    }

    /* Laid out as in the Slide View's deck (see text.css), but every slide shows */
    div.qt-render.text-print-slide {
        page: text-slides;
        width: 1600px;
        height: 900px;
        min-height: 0;
        overflow: hidden;
    }

    div.qt-render.text-print-slide + div.qt-render.text-print-slide {
        break-before: page;
    }

    div.qt-render.text-print-slide div.qt-slide {
        display: flex;
    }
}
