:root {
    --jlt-label-box-width: 100mm;
    --jlt-label-box-height: 40mm;
    --jlt-label-unit-width: 100mm;
    --jlt-label-unit-height: 40mm;
    --jlt-label-shipping-width: 100mm;
    --jlt-label-shipping-height: 40mm;
    --jlt-label-print-width: var(--jlt-label-box-width, 100mm);
    --jlt-label-print-height: var(--jlt-label-box-height, 40mm);
    --jlt-label-print-font-family: Arial, Helvetica, sans-serif;
}

.jlt-print-label {
    box-sizing: border-box;
    display: block;
    page-break-after: always;
    break-after: page;
    overflow: hidden;
    padding: 1.4mm 2mm 1mm;
    border: 0;
    background: #ffffff;
    color: #000000;
    width: var(--jlt-label-print-width);
    height: var(--jlt-label-print-height);
    margin: 0 auto 12px;
    font-family: var(--jlt-label-print-font-family);
}

.jlt-print-label *,
.jlt-print-label *::before,
.jlt-print-label *::after {
    box-sizing: inherit;
}

.jlt-label {
    display: grid;
    grid-template-rows: auto auto minmax(0, auto);
    gap: 0.55mm;
    width: 100%;
    height: 100%;
    overflow: hidden;
    color: #000000;
}

.jlt-label__header {
    display: grid;
    grid-template-columns: 11mm minmax(0, 1fr) auto;
    gap: 1.5mm;
    align-items: center;
    min-height: 8.5mm;
    border-bottom: 0.3mm solid #000000;
    padding-bottom: 0.8mm;
}

.jlt-label__header--compact {
    grid-template-columns: 11mm minmax(0, 1fr);
}

.jlt-label__header--unit {
    grid-template-columns: 11mm minmax(0, 1fr) 30mm;
    align-items: start;
}

.jlt-label--box {
    grid-template-rows: auto auto 1fr;
}

.jlt-label__header--box {
    grid-template-columns: 11mm minmax(0, 1fr) 42mm;
    align-items: start;
}

.jlt-label__brand {
    width: 10.5mm;
    height: 7mm;
    border: 0.25mm solid #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 7pt;
    font-weight: 900;
}

.jlt-label__brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(1) contrast(1.35);
    background: #ffffff;
}

.jlt-label__headline {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3mm;
}

.jlt-label__primary {
    font-size: 9.3pt;
    line-height: 1.02;
    font-weight: 900;
    text-transform: uppercase;
}

.jlt-label__primary--truncate,
.jlt-label__truncate,
.jlt-label__meta,
.jlt-label__company-line {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jlt-label__meta,
.jlt-label__kicker,
.jlt-label__company-line {
    font-size: 6.6pt;
    line-height: 1;
    font-weight: 800;
    text-transform: uppercase;
}

.jlt-label__body {
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.8mm;
}

.jlt-label__body--box {
    justify-content: start;
}

.jlt-label__body--unit {
    justify-content: start;
    gap: 0.35mm;
}

.jlt-label__description {
    font-size: 7pt;
    line-height: 1.05;
    min-height: 2.3mm;
}

.jlt-label__attributes,
.jlt-label__totals,
.jlt-label__unit-grid {
    display: grid;
    gap: 0.45mm 1.5mm;
    min-height: 0;
}

.jlt-label__attributes--box {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.jlt-label__totals--box {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-content: end;
}

.jlt-label__unit-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
}

.jlt-label__attributes div,
.jlt-label__totals div,
.jlt-label__unit-grid div,
.jlt-label__composition,
.jlt-label__recipient,
.jlt-label__carrier,
.jlt-label__box-code,
.jlt-label__unit-details {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15mm;
}

.jlt-label span {
    font-size: 5.6pt;
    line-height: 1;
    font-weight: 900;
    text-transform: uppercase;
}

.jlt-label strong {
    min-width: 0;
    font-size: 7pt;
    line-height: 1.02;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jlt-label__quantity strong,
.jlt-label__total-highlight strong,
.jlt-label__volume strong {
    font-size: 9.4pt;
}

.jlt-label__composition {
    padding-top: 0;
}

.jlt-label__footer {
    min-height: 0;
    display: grid;
    gap: 1.2mm;
    align-items: end;
}

.jlt-label__footer--box,
.jlt-label__footer--unit {
    grid-template-columns: 1fr;
    min-height: 7mm;
}

.jlt-label__footer--unit {
    min-height: 7mm;
    align-items: start;
}

.jlt-label__footer--box {
    grid-template-columns: 1fr;
    min-height: 0;
    align-items: start;
}

.jlt-label__footer--shipping {
    grid-template-columns: 58mm minmax(0, 1fr);
    align-items: start;
    border-top: 0.25mm solid #000000;
    padding-top: 0.35mm;
    min-height: 6mm;
}

.jlt-label__barcode {
    min-width: 0;
    min-height: 12mm;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #000000;
}

.jlt-label__barcode--box,
.jlt-label__barcode--pv {
    justify-content: flex-start;
}

.jlt-label__header--box .jlt-label__barcode--box,
.jlt-label__header--unit .jlt-label__barcode--unit {
    min-height: 10.5mm;
    align-self: start;
    justify-content: flex-end;
}

.jlt-label__header--box .ean13-barcode svg,
.jlt-label__header--unit .ean13-barcode svg {
    height: 10.5mm !important;
}

.jlt-label__shipping-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 19mm;
    gap: 1.5mm;
    min-height: 0;
    align-items: start;
}

.jlt-label__shipping-data {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.9mm;
}

.jlt-label__shipping-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.8mm;
    align-items: baseline;
}

.jlt-label__volume {
    border: 0.3mm solid #000000;
    padding: 0.8mm 1mm;
    text-align: center;
    min-width: 17mm;
}

.jlt-label__shipping-footer-data {
    min-width: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1mm;
    align-items: end;
}

.jlt-label__qr,
.jlt-label-qr {
    width: 19mm;
    height: 19mm;
    border: 0.25mm solid #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #000000;
    overflow: hidden;
}

.jlt-label__qr .jlt-label-qr {
    border: 0;
    width: 100%;
    height: 100%;
}

.jlt-label-qr svg,
.jlt-label-qr canvas,
.jlt-label-qr img {
    width: 100% !important;
    height: 100% !important;
    display: block;
    image-rendering: pixelated;
}

.jlt-label-qr--text {
    padding: 1mm;
    flex-direction: column;
    gap: 1mm;
    text-align: center;
}

.jlt-label-code-text {
    border: 0.25mm solid #000000;
    padding: 0.6mm;
    text-align: center;
    font-family: monospace;
    font-size: 6.2pt;
    font-weight: 900;
    letter-spacing: 0.2mm;
    overflow-wrap: anywhere;
}

.ean13-barcode {
    align-self: center;
    transform-origin: top center;
    max-width: 100%;
    max-height: 12mm;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.ean13-barcode svg {
    width: 100% !important;
    height: 12mm !important;
    display: block;
}

.jlt-print-label:has(.jlt-label--box) {
    --jlt-label-print-width: var(--jlt-label-box-width, 100mm);
    --jlt-label-print-height: var(--jlt-label-box-height, 40mm);
}

.jlt-print-label:has(.jlt-label--unit) {
    --jlt-label-print-width: var(--jlt-label-unit-width);
    --jlt-label-print-height: var(--jlt-label-unit-height);
}

.jlt-print-label:has(.jlt-label--shipping) {
    --jlt-label-print-width: var(--jlt-label-shipping-width, 100mm);
    --jlt-label-print-height: var(--jlt-label-shipping-height, 40mm);
}

@media screen {
    .jlt-print-label {
        border-color: var(--jlt-border, #d1d5db);
        border-radius: 4px;
        box-shadow: 0 8px 24px rgb(15 23 42 / 12%);
    }
}

@media print {
    @page {
        margin: 0;
    }

    .jlt-print-label {
        max-width: none;
        border-color: #000000;
        border-radius: 0;
        box-shadow: none;
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .jlt-print-label:last-child {
        page-break-after: auto;
        break-after: auto;
    }
}
