.knowledge-map-print-sheet {
    display: none;
}

@media print {
    @page {
        size: A4 landscape;
        margin: 6mm;
    }

    body.knowledge-map-printing {
        background: #fff !important;
    }

    body.knowledge-map-printing > :not(.knowledge-map-print-sheet) {
        display: none !important;
    }

    body.knowledge-map-printing > .knowledge-map-print-sheet {
        position: fixed;
        top: 0;
        left: 0;
        display: flex !important;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        background: #fff;
    }

    .knowledge-map-print-sheet[data-knowledge-map-print-orientation="portrait"] {
        width: 194mm;
        height: 267mm;
    }

    .knowledge-map-print-sheet[data-knowledge-map-print-orientation="portrait"] img {
        width: 194mm;
        height: auto;
        max-width: 194mm;
        max-height: 267mm;
    }

    .knowledge-map-print-sheet[data-knowledge-map-print-orientation="landscape"] {
        width: 285mm;
        height: 198mm;
    }

    .knowledge-map-print-sheet img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

@media print and (orientation: landscape) {
    .knowledge-map-print-sheet[data-knowledge-map-print-orientation="portrait"] {
        width: 267mm;
        height: 194mm;
    }

    .knowledge-map-print-sheet[data-knowledge-map-print-orientation="portrait"] img {
        width: auto;
        height: 194mm;
        max-width: 267mm;
        max-height: 194mm;
    }
}

@media print and (orientation: portrait) {
    .knowledge-map-print-sheet[data-knowledge-map-print-orientation="landscape"] {
        width: 198mm;
        height: 285mm;
    }
}
