/* ===========================
   Receipt Paper Style (Ticket Fiscal)
   =========================== */
.receipt-paper {
    background: #fffdf5;
    /* Slightly yellowish/warm paper color */
    padding: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    font-family: 'Courier New', Courier, monospace;
    color: #333;
    border: 1px solid #e5e5e5;
    position: relative;
    font-size: 0.9rem;
    line-height: 1.4;
    max-height: 600px;
    display: flex;
    flex-direction: column;
}

/* Jagged edge effect (top and bottom) - simplified via border for now, 
   or we can add a pseudo-element if valid. sticking to simple clean look first. */
.receipt-paper::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 0;
    width: 100%;
    height: 5px;
    background: radial-gradient(circle, transparent, transparent 50%, #fffdf5 50%, #fffdf5 100%) -7px -8px / 16px 16px repeat-x;
}

.receipt-paper::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 5px;
    background: radial-gradient(circle, transparent, transparent 50%, #fffdf5 50%, #fffdf5 100%) -7px -2px / 16px 16px repeat-x;
    transform: rotate(180deg);
}

.receipt-header {
    text-align: center;
    margin-bottom: 1rem;
}

.receipt-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.separator {
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    margin: 0.5rem 0;
    color: #999;
}

.receipt-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
    padding-right: 5px;
    /* Scrollbar space */
}

/* Custom Scrollbar for receipt */
.receipt-items::-webkit-scrollbar {
    width: 4px;
}

.receipt-items::-webkit-scrollbar-track {
    background: transparent;
}

.receipt-items::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    border-bottom: 1px dashed #eee;
    padding-bottom: 0.25rem;
    animation: printEntry 0.4s ease-out forwards;
}

@keyframes printEntry {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 0.5rem;
}

.item-time {
    font-weight: bold;
}

.receipt-empty {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem 0;
}

.receipt-footer {
    text-align: center;
    margin-top: auto;
}

.total {
    font-size: 1.1rem;
    font-weight: bold;
    margin: 0.5rem 0;
    display: flex;
    justify-content: space-between;
}

.barcode {
    font-family: 'Libre Barcode 128', 'Courier New', monospace;
    /* Fallback */
    font-size: 1.5rem;
    letter-spacing: 2px;
    margin-top: 0.5rem;
    opacity: 0.7;
    transform: scaleX(1.2);
}