.order-receipt-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 4px 0 12px;
    background: #f4f5f7;
}

@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url("../fonts/atkinson-hyperlegible/AtkinsonHyperlegible-Regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url("../fonts/atkinson-hyperlegible/AtkinsonHyperlegible-Bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

.order-receipt {
    box-sizing: border-box;
    width: 80mm;
    max-width: 100%;
    padding: 4mm;
    background: #fff;
    color: #111;
    font-family: "Atkinson Hyperlegible", Arial, Helvetica, sans-serif;
    font-size: 17px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.order-receipt-preview .order-receipt {
    box-shadow: 0 4px 18px rgba(0, 0, 0, .14);
}

.order-receipt__header {
    text-align: center;
}

.order-receipt__logo {
    display: block;
    width: 46mm;
    max-width: 100%;
    height: auto;
    margin: 0 auto 8px;
}

.order-receipt__date {
    font-size: 15px;
}

.order-receipt__number {
    margin-top: 12px;
    font-size: 24px;
    font-weight: 700;
}

.order-receipt__section {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px dashed #222;
}

.order-receipt__section-title {
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .09em;
}

.order-receipt__field {
    display: grid;
    grid-template-columns: 95px minmax(0, 1fr);
    gap: 5px;
    margin: 5px 0;
}

.order-receipt__note span {
    color: #444;
}

.order-receipt__field strong,
.order-receipt__note strong,
.order-receipt__item-line strong {
    font-weight: 700;
}

.order-receipt__note {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 7px;
}

.order-receipt__item {
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    break-inside: avoid;
}

.order-receipt__item:last-child {
    border-bottom: 0;
}

.order-receipt__total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.order-receipt__total-row span:last-child,
.order-receipt__total-row strong:last-child {
    flex-shrink: 0;
    white-space: nowrap;
    text-align: right;
    margin-left: auto;
}

.order-receipt__item-line strong {
    display: block;
}

.order-receipt__item-line strong:last-child {
    margin-top: 3px;
    text-align: right;
}

.order-receipt__item-detail {
    margin-top: 3px;
    color: #333;
    font-size: 15px;
}

.order-receipt__item-detail--product {
    color: inherit;
    font-size: inherit;
}

.order-receipt__total-row {
    margin-top: 6px;
}

.order-receipt__total-row--grand {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #111;
    font-size: 21px;
}

.order-receipt__payment {
    margin-top: 8px;
}

.order-receipt__qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #222;
    font-size: 15px;
    text-align: center;
    break-inside: avoid;
}

.order-receipt__qr-graphic {
    width: 54mm;
    height: 54mm;
}

.order-receipt__qr-graphic svg {
    display: block;
    width: 100%;
    height: 100%;
    shape-rendering: crispEdges;
}

.order-receipt-print-root {
    display: none;
}

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

    body > :not(.order-receipt-print-root) {
        display: none !important;
    }

    html, body {
        width: 80mm !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .order-receipt-print-root {
        display: block !important;
        width: 80mm;
        margin: 0;
        padding: 0;
    }

    .order-receipt-print-root .order-receipt {
        max-width: none;
        box-shadow: none;
    }
}
