.din_page {
    font-size: 9pt;

    .container-fluid & { // center the invoice in portal preview
       margin-left: auto;
       margin-right: auto;
    }
    &.header {
        table {
            width: 100%;
            img, div.h3, td, tr {
                padding: 0;
                margin: 0;
            }
            div.h3 {
                color: $o-default-report-primary-color;
                position: relative;
                top: -10mm;
                margin-bottom: -10mm;
            }
            img {
                padding-top: 10mm;
                float: right;
            }
        }
    }
    &.invoice_note {
        tr {
            td {
                vertical-align: bottom;
            }
            &:nth-child(2) td {
                vertical-align: top;
            }
            .address, .information_block, .shipping_address, .invoice_address {
                margin: 0;
            }
            .address {
                height: 45mm;
            }
            .address, .shipping_address {
                width: 85mm;
                padding-left: 5mm;
                .company_invoice_line {
                    margin-top: 1mm;
                }
                > span {
                    color: $o-default-report-secondary-color;
                    font-size: 0.8em;
                }
            }
            .information_block, .invoice_address {
                width: 75mm;
                min-height: 40mm;
                margin-left: 20mm;
                table {
                    width: 100%;
                }
            }
        }
        h2 {
            margin-left: 5mm;
            margin-right: 10mm;
            margin-top: 8.46mm;
            color: $o-default-report-primary-color;
        }
        > .pt-5 {  // hide hardcoded address from base.template.layout
            display: none;
        }
        .page {
            margin-left: 5mm;
            margin-right: 10mm;
            > h2, h1, #informations, .mt-4 > h2 {
                display: none;
            }
            [name=invoice_line_table], [name=stock_move_table], .o_main_table {
                margin-top: 8.46mm;
                th {
                    color: $o-default-report-secondary-color;
                }
            }

            tr {
                td {
                    vertical-align: bottom;
                }
            }
        }
    }
    &.footer {
        padding-left: 5mm;
        padding-right: 10mm;
        .page_number {
            margin-top: 4.23mm;
            width: 100%;
            height: 4.23mm;
        }
        .company_details {
            margin-top: 4.23mm;
            width: 100%;
            font-size: 0.8em;
            table {
                border-top: solid 1px;
                table-layout: fixed;
                width: 100%;
                td {
                    vertical-align: baseline;
                    padding-right: 3mm;
                    li {
                        font-size: 0.7em;
                    }
                    &:last-child {
                        padding-right: initial;
                    }
                }
            }
        }
    }
}

.din_page_pdf {
    width: 180mm;
    margin-left: -1rem;
}
