button:disabled,
.primary:disabled {
    opacity: .58;
    cursor: not-allowed;
}

.print-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 28px;
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 4px 9px;
    background: #ffffff;
    color: var(--blue);
    font-size: .82rem;
    font-weight: 800;
}

.print-chip:hover {
    border-color: var(--blue);
}

.print-state {
    display: inline-flex;
    width: fit-content;
    min-height: 24px;
    align-items: center;
    border-radius: 999px;
    margin-top: 6px;
    padding: 3px 8px;
    font-size: .78rem;
    font-weight: 850;
}

.print-state.printed {
    background: #e4f7ec;
    color: var(--green);
}

.print-state.unprinted {
    background: #fff2d6;
    color: var(--amber);
}

.receipt-body {
    margin: 0;
    background: #edf1f5;
    color: #000000;
}

.receipt-wrap {
    width: 80mm;
    min-height: 100vh;
    margin: 0 auto;
    padding: 4mm;
    background: #ffffff;
    box-shadow: 0 0 18px rgba(15, 23, 42, .16);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    line-height: 1.28;
}

.receipt {
    display: grid;
    gap: 7px;
}

.receipt + .receipt {
    margin-top: 10mm;
    page-break-before: always;
    break-before: page;
}

.receipt-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.receipt-actions > * {
    flex: 1 1 auto;
    min-height: 32px;
    padding: 6px 8px;
    font-size: 12px;
}

.receipt-title,
.receipt-subtitle,
.receipt-code,
.receipt-footer {
    text-align: center;
}

.receipt-title {
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
}

.receipt-subtitle {
    font-size: 12px;
    font-weight: 800;
}

.receipt-code {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0;
}

.receipt-rule {
    border-top: 1px dashed #000000;
    margin: 2px 0;
}

.receipt-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.receipt-row span,
.receipt-block span {
    color: #333333;
    font-weight: 700;
}

.receipt-row strong {
    text-align: right;
    font-weight: 900;
}

.receipt-block {
    display: grid;
    gap: 2px;
}

.receipt-block strong {
    font-size: 13px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.receipt-section-title {
    font-size: 14px;
    font-weight: 900;
    text-transform: uppercase;
}

.receipt-item {
    display: grid;
    gap: 3px;
    padding: 5px 0;
    border-bottom: 1px dotted #777777;
    break-inside: avoid;
}

.receipt-item-line {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 5px;
    align-items: start;
}

.receipt-check {
    font-weight: 900;
}

.receipt-item-line strong {
    font-size: 14px;
    font-weight: 900;
    overflow-wrap: anywhere;
}

.receipt-item small {
    margin-left: 33px;
    color: #333333;
}

.receipt-item-money,
.receipt-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.receipt-total {
    font-size: 15px;
    font-weight: 900;
}

.receipt-footer {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 800;
}

@media print {
    body.receipt-body {
        width: 80mm;
        margin: 0;
        background: #ffffff;
    }

    .receipt-wrap {
        width: 80mm;
        min-height: auto;
        margin: 0;
        padding: 3mm;
        box-shadow: none;
    }

    .receipt-actions {
        display: none !important;
    }

    .receipt + .receipt {
        margin-top: 0;
    }
}
