@media print {

    @page:first {
    
        @top-right {
            content: none;
        }
        @top-left {
            content: none;
        }
    }
    
    @page {
        margin: 2cm 2.5cm 3cm 2.5cm;
        
        @top-left {
            content: element(headerIdentifier);
            vertical-align: bottom;
        }
        @bottom-left {
            content: element(footerIdentifier);
            vertical-align: top;
            width: 100%;
        }
        @bottom-right {
            content: element(companyIdentifier);
            vertical-align: top;
            margin-top: 4mm;
            width: 100%;
        }
    }
}

@-ro-preferences {
    page-layout: 1 column;
    initial-zoom: fit-page;
}

div.spacing {
    margin-top: 1.2em;
}

div.footer, div.header {
    font: 9pt arial, sans-serif;
    width: 100%;
}

div.footer {
    position: running(footerIdentifier);
}

div.header {
    position: running(headerIdentifier);
}

p.companyinfo {
    position: running(companyIdentifier);
}

div.header table {
    position: relative;
}

div.footer table, div.footer p {
    position: relative;
}


table.header-footer {
    padding: 0pt;
    text-align: right;
    border-collapse: collapse;
    background: #F8F8F8;
    width: 100%;
}

table.header-footer td:first-child {
    text-align: left;
}

table.header-footer td.subtotaltext {
    padding-right: 1.7em;
}

table.header-footer td.subtotaltext {
    position: absolute;
    right: 11.5em;
}

table.header-footer td.currency {
    position: absolute;
    right: 7em;
}

table.header-footer td.subtotal {
    position: absolute;
    right: 1.5em;
}

div.header td.subtotal::before {
    content: string(sum, start);
}

div.header td.invoicetext {
    width: 16cm;
}

div.header td.invoicetext::before {
    content: string(invoice, start);
}

div.header td.subtotaltext::before {
    content: string(subtotaltext, start);
}

div.header td.currency::before {
    content: string(currency, start);
}

div.footer td.subtotaltext::before {
    content: string(subtotaltext, last);
}

div.footer td.currency::before {
    content: string(currency, last);
}


div.footer td.subtotal::before {
    content: string(sum, last);
}

div.footer td.pagecounter::before {
    content: "Page " counter(page) "/" counter(pages);
}

p.companyinfo {
    background: white;
    border: 0.75pt solid white;
}

p.companyinfo {
    font: 6pt arial, sans-serif;
    color: #7F7F7F;
    text-align: center;
}
            
barcode {
    -ro-replacedelement: barcode;
}

img.logo {
    height: 42pt;
    margin-bottom: 20pt;
}

div.companyinformation {
    text-align: right;
    font: 6pt arial, sans-serif;
    color: #7F7F7F;
}

div.addressline {
    font: 6pt arial, sans-serif;
    color: #7F7F7F;
    margin-bottom: 20pt;
    margin-top: -40pt;
}

div.recipient {
    font: 10pt arial, sans-serif;
}

div.descbox {
    float: right;
    width: 160pt;
    font: 8pt arial, sans-serif;
}

div.descboxheader {
    background-color: #F0F0F0;
    border: 0.75pt solid #777;
    text-align: center;
    font: bold 12pt arial, sans-serif;
}

div.descboxcontent {
    border-left: 0.75pt solid #777;
    border-bottom: 0.75pt solid #777;
    border-right: 0.75pt solid #777;
}

div.infotable {
    border: 0.75pt solid #777;
    margin-top: 0.5cm;
    margin-bottom: 0.5cm;
}

table.infotable {
    font: 8pt arial, sans-serif;
    width: 100%;
}

hr.floated {
    visibility: hidden;
    float: left;
}

table.postable {
    font: 9pt arial, sans-serif;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0pt 10pt;
    margin-bottom: 5pt;
}

table.postable tbody tr:not(.postfooter ):nth-child(even) {
    background-color: #FAFAFA;
}

table.postable tr {
    break-inside: avoid;
}

hr.invisible {
    visibility: hidden;
    background: #fff;
    color: #fff;
    clear: both;
    margin: 0;
}

tr.postheader {
    background-color: #F0F0F0;
    padding: 4pt;
}

tr.transfer>td:first-child {
    overflow: hidden;
}

tr.tansfer>td {
    background-color: #F0F0F0;
    padding: 4pt;
}

tr.postheader td {
    white-space: nowrap;
}

tr.postfooter {
    background-color: #F0F0F0;
    padding: 4pt;
}

tr.postfootercontent {
    background-color: white;
}

td {
    vertical-align: top;
}

td.subtotal {
    text-align: right;
    padding-right: 5pt;
    font-weight: bold;
}

td.total {
    background-color: #fff !important;
    border: 0.75pt solid black;
    text-align: right;
    padding-right: 5pt;
    font-weight: bold;
}

td.right {
    text-align: right;
    width: 5em;
    padding-right: 0.5em;
}

p {
    font: 8pt arial, sans-serif;
}

p.terms {
    font-weight: bold;
    text-decoration: underline;
    font-style: italic;
}

body.main {
    string-set: subtotaltext "", sum "", currency "";
    counter-reset: position;
}

div.sum-subtotal {
    string-set: sum self;
    visibility: hidden;
    position: absolute;
}

td.invoice {
    string-set: invoice "Invoice " self;
}

table.postable tbody tr:first-child {
    string-set: subtotaltext "Subtotal", currency "EUR";
}

table.postable tbody tr:last-child {
    string-set: subtotaltext "", sum "", currency "";
}

td.position {
    counter-increment: position;
    text-align: right;
    padding-right: 10pt;
}

td.position::before {
    content: counter(position);
}

div.posttext {
    break-inside: avoid;
    padding-top: 10pt;
}