/*
 * dont add fonts that are not embeted into dompdf -> this will unvalidate zugpferd pdf
 */

html, body,
p, div, span,
h1, h2, h3, h4, h5, h6,
table, tr, td, th,
ul, ol, li,
strong, b, em, i {
    font-family: "DejaVu Sans", sans-serif !important;
}
@font-face {
    font-family: "Barcode";
    src: url(../fonts/3OF9_NEW.TTF) format("truetype");
}

body {   
    font-size: 10pt;
    color: var(--main-font-color);
    line-height: 1.3;
    margin: 0;
    padding: 0;
    background-color: var(--scheme-color-overall-background-color);
}

a {
    color: var(--text-link-color);
}

.page-break {
    margin: 20px;
    max-width: 21cm;
    margin-left: auto;
    margin-right: auto;
}

.hidden {
  display: none;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px; 
}

.logo {
    max-width: 350px;
}

.logo img {
    max-width: 100%;
    height: auto;
}

.header-right {
    text-align: right;
}

.barcode {
    margin-bottom: 1px;
    font-size: 25pt;
    font-family: "Barcode" !important;
}

.addresses {
    display: table;
    width: 100%;
    margin-bottom: 10px;
    margin-top: 15mm;
}

.addresses>div {
    display: table-cell;
    vertical-align: top;
    width: 28%;
}

.addresses>div:first-child {
    width: 41%;
}

.addresses > .waDeal {
    display: none;
}

.waDeal {
    border: 1px solid var(--scheme-color-neutral-borders);
    margin-right: 5px;
    display: flex;
    max-height: 33mm;
}

.waDeal img {
    width: 20mm;
    height: 20mm;
    aspect-ratio: 1/1;
    margin: 5px;
}

.addresses > .recipient:last-child {
  text-align: right;
}

.sender-envelope {
    font-size: 7pt;
    line-height: 1.0;
    margin-bottom: 10px;
}

.sender-envelope p {
    margin: 0; 
    padding-top: 0;
    text-decoration: underline;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
}

.sender-envelope span {
    margin-right: 5px; 
}

.recipient {
    position: relative;
    line-height: 11pt;
}

.stretch {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stretch h1 {
    margin-bottom: 0;
    bottom: 0;
    position: absolute;
}


.recipient h3 {
    margin-top: 0;
    margin-bottom: 5px;   
}

.recipient p {
    margin-top: 0px;
}

.tableFlex{
    display: table;
    width: 100%;
}

.tableFlex div{
    display: table-cell;
    vertical-align: top;
}

.items {
    width: 100%;
    margin-bottom: 20px;
}

.items table {
    width: 100%;
    border-collapse: collapse;
}

.items th, .items td {
    padding: 1mm 3mm 1mm 1mm;
    text-align: left;
    font-size: 10pt;
}

.items th {
    font-weight: bold;
    text-align: center;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    background-color: var(--scheme-color-highlight-background-color);
}

.items th:first-child, .items td:first-child {
    width: 8mm;
    padding-right: 5mm;
}


.subtotal td, .vat td, .total td {
    font-weight: bold;
    text-align: right;
}

.subtotal .amount {
    text-align: right;
}

.payment-terms, .notes {
    margin-bottom: 20px;
}

.payment-terms h3, .notes h3 {
    margin-top: 0;
    margin-bottom: 5px;
}

.customsValue {
    border: 3px solid var(--scheme-color-dark-borders);
    padding: 3px;
}


.notes {
    margin-top: 1mm;
    border: 3px solid var(--scheme-color-dark-borders);
    padding: 1mm;
}

.error {
    font-style: bold;
    color: var(--error-font-color);
    border: 3px solid var(--error-font-color);
    padding : 5mm;
}


.menue {
    font-style: bold;
    color: var(--text-link-color);
    border: 3px solid var(--text-link-color);
    padding : 5mm;
}

.item td {
    text-align: right;
}

.item.customs>td {
    font-size: 7pt;
    padding-top: 1px;
}

.itemName {
    text-align: left !important;
    position: relative;
}

.itemName .giftwrap {
    position: absolute;
    top: 2px;
    left: -17px;
}

.itemName ul {
    margin-top: 0;
}

.baselineflex {
    display:flex;
    justify-content: flex-start;
}

.baselineflex span {
    display: block;
}

.offerpic {
    width: 50px;
    margin-right: 5px;
}

.thumbnail {
    max-width: 50px;
    max-height: 40px;
}

.pricePt1, 
.pricePt2,
.pricePt3,
.pricePt4 {
    font-weight: normal;
}

.pricePt3,
.pricePt4 {
    font-size: 9pt;
}

.amount .pricePt1, 
.amount .pricePt2,
.amount .pricePt3,
.amount .pricePt4 {
    font-weight: bolder;
}

.reminder {
    font-weight: bold;
}

tfoot tr {
    border-top: 1px solid var(--scheme-color-neutral-borders);
}

tfoot, thead {
    border-bottom: 1px double var(--scheme-color-neutral-borders);
}


footer {
    font-size: 8pt;
    color: #777;
    border-top: 1px solid var(--scheme-color-neutral-borders);
    padding-top: 10px;
}

.physicalItemQuantity {
    font-size: 18pt;
}

/* Druckspezifische Styles */
@media print {
    body {
        margin: 0;
    }

    .error, .menue {
        display: none;
    }
    
    .addresses > .waDeal {
      display: block;
      margin-left: 3px;
      min-width: 222px;
      min-height: 160px;
      height: auto;
    }

    .page-break {
        margin: 0;
        max-width: 21cm;
        width: 100%;
        margin: 0 auto;
        border: none;
    }

    .page-break::after {
        content: "";
        display: block;
        page-break-after: always;
    }

    .addresses, .payment-terms, .notes, footer, header {
        page-break-inside: avoid;
    }

    .sender-envelope {
        font-size: 7pt;
        line-height: 1.0;
        margin-bottom: 5px;
    }

    .sender-envelope p {
        margin: 0;
        text-decoration: underline;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sender-envelope span {
        margin-right: 3px; /* Etwas weniger Abstand im Druck */
    }

}