/* Order Receipt Modal Styles */

.receipt-modal {
    max-width: 420px;
    width: 95%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
}

.dark-mode .receipt-modal {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* Receipt Header with QR Code */
.receipt-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 25px 20px;
    text-align: center;
    color: white;
    position: relative;
}

.receipt-header::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    clip-path: polygon(0 0, 5% 100%, 10% 0, 15% 100%, 20% 0, 25% 100%, 30% 0, 35% 100%,
            40% 0, 45% 100%, 50% 0, 55% 100%, 60% 0, 65% 100%, 70% 0, 75% 100%,
            80% 0, 85% 100%, 90% 0, 95% 100%, 100% 0);
}

.receipt-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.receipt-subtitle {
    font-size: 0.85rem;
    opacity: 0.95;
    margin: 0;
    font-weight: 500;
}

/* QR Code Container */
.receipt-qr-container {
    background: white;
    padding: 15px;
    border-radius: 0;
    display: inline-block;
    margin: 15px 0 10px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.receipt-qr-label {
    font-size: 0.75rem;
    margin-top: 8px;
    opacity: 0.9;
}

/* Receipt Body */
.receipt-body {
    padding: 25px 20px 20px 20px;
}

/* Order Info Section */
.receipt-info-section {
    background: rgba(var(--primary-rgb, 255, 107, 53), 0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px dashed rgba(var(--primary-rgb, 255, 107, 53), 0.2);
}

.dark-mode .receipt-info-section {
    background: rgba(var(--primary-rgb, 255, 107, 53), 0.1);
}

.receipt-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dotted rgba(0, 0, 0, 0.1);
}

.dark-mode .receipt-info-row {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.receipt-info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.receipt-info-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.receipt-info-value {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 700;
    text-align: left;
}

/* Items Section */
.receipt-items-section {
    margin-bottom: 20px;
}

.receipt-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.receipt-item {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease;
}

.dark-mode .receipt-item {
    background: rgba(255, 255, 255, 0.05);
}

.receipt-item:hover {
    transform: translateX(-3px);
}

.receipt-item-info {
    flex: 1;
}

.receipt-item-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.receipt-item-quantity {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.receipt-item-price {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary-color);
    white-space: nowrap;
}

/* Total Section */
.receipt-total {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(var(--primary-rgb, 255, 107, 53), 0.3);
}

.receipt-total-label {
    font-size: 1.1rem;
    font-weight: 700;
}

.receipt-total-value {
    font-size: 1.3rem;
    font-weight: 900;
}

/* Status Badge in Receipt */
.receipt-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Alert Boxes */
.receipt-alert {
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.receipt-alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.15));
    border: 2px solid #10b981;
    color: #10b981;
}

.receipt-alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.15));
    border: 2px solid #3b82f6;
    color: #3b82f6;
}

.receipt-alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.15));
    border: 2px solid #f59e0b;
    color: #f59e0b;
}

.receipt-alert i {
    font-size: 1.2rem;
    display: block;
    margin-bottom: 5px;
}

/* Footer */
.receipt-footer {
    text-align: center;
    padding: 15px 20px;
    border-top: 2px dashed rgba(0, 0, 0, 0.1);
}

.dark-mode .receipt-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.receipt-footer-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0 0 15px 0;
}

.receipt-close-btn {
    width: 100%;
    max-width: 250px;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Mobile Optimization */
@media (max-width: 480px) {
    .receipt-modal {
        max-width: 95%;
        border-radius: 15px;
    }

    .receipt-header {
        padding: 20px 15px;
    }

    .receipt-title {
        font-size: 1.2rem;
    }

    .receipt-subtitle {
        font-size: 0.8rem;
    }

    .receipt-qr-container {
        padding: 12px;
    }

    .receipt-body {
        padding: 20px 15px 15px 15px;
    }

    .receipt-info-section {
        padding: 12px;
    }

    .receipt-item {
        padding: 10px;
    }

    .receipt-item-name {
        font-size: 0.85rem;
    }

    .receipt-item-price {
        font-size: 0.85rem;
    }

    .receipt-total {
        padding: 12px;
    }

    .receipt-total-label {
        font-size: 1rem;
    }

    .receipt-total-value {
        font-size: 1.2rem;
    }
}

/* Remove scrollbars from modal */
.modal-overlay .receipt-modal {
    max-height: 90vh;
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.modal-overlay .receipt-modal::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}