/* Receipt Modal Styles */
.receipt-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    overflow-y: auto;
    padding: 2rem;
}

.receipt-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.receipt-modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin: 2rem 0;
}

.receipt-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #ecf0f1;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.receipt-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.receipt-modal-header i {
    margin-right: 0.5rem;
}

.receipt-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.receipt-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.receipt-modal-body {
    padding: 0;
    min-height: 200px;
}

.receipt-content {
    padding: 2rem;
}

#receiptToPrint {
    background: white;
}

#receiptToPrint table {
    border-collapse: collapse;
}

#receiptToPrint table td,
#receiptToPrint table th {
    border: 1px solid #dee2e6;
}

.receipt-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 2px solid #ecf0f1;
    background: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-radius: 0 0 12px 12px;
}

.receipt-download-btn {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.receipt-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(39, 174, 96, 0.4);
}

.receipt-download-btn:active {
    transform: translateY(0);
}

.receipt-download-btn i {
    font-size: 1.1rem;
}

.receipt-cancel-btn {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

.receipt-cancel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(149, 165, 166, 0.4);
    background: linear-gradient(135deg, #7f8c8d 0%, #6c7a7b 100%);
}

.receipt-cancel-btn:active {
    transform: translateY(0);
}

.receipt-cancel-btn i {
    font-size: 1.1rem;
}

/* Receipt Button in Dashboard Table - match .action-btn pill styling */
.receipt-btn {
    background: linear-gradient(135deg, #e0f2fe, #bfdbfe);
    color: var(--primary-color);
}

.receipt-btn:hover {
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
    color: #ffffff;
    transform: translateY(-1px);
}

.receipt-btn i {
    font-size: 0.8rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .receipt-modal {
        padding: 1rem;
    }
    
    .receipt-modal-content {
        max-width: 100%;
        margin: 1rem 0;
    }
    
    .receipt-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .receipt-modal-header h2 {
        font-size: 1.2rem;
    }
    
    .receipt-content {
        padding: 1rem;
    }
    
    #receiptToPrint {
        padding: 1rem !important;
        font-size: 0.9rem;
    }
    
    #receiptToPrint h1 {
        font-size: 1.3rem !important;
    }
    
    #receiptToPrint h3 {
        font-size: 1rem !important;
    }
    
    #receiptToPrint table {
        font-size: 0.85rem;
    }
    
    #receiptToPrint img {
        height: 60px !important;
    }
    
    .receipt-modal-footer {
        padding: 1rem 1.5rem;
    }
    
    .receipt-download-btn,
    .receipt-cancel-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media print {
    .receipt-modal {
        display: block !important;
        position: static;
        background: white;
        padding: 0;
    }
    
    .receipt-modal-header,
    .receipt-modal-footer,
    .receipt-close-btn {
        display: none !important;
    }
    
    .receipt-modal-content {
        max-width: 100%;
        box-shadow: none;
        margin: 0;
    }
    
    .receipt-content {
        padding: 0;
    }
    
    #receiptToPrint {
        padding: 1rem !important;
    }
}
