/* Invoice Styles */
#invoiceModal .modal-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.invoice-details {
    text-align: right;
}

.invoice-details h2 {
    color: var(--color-primary);
    margin: 0 0 10px 0;
    font-size: 1.8rem;
}

.invoice-details p {
    margin: 5px 0;
    color: #555;
    font-size: 0.95rem;
}

.invoice-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

.info-block {
    background: var(--color-bg);
    padding: 15px;
    border-radius: 6px;
    width: 45%;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.invoice-table th {
    background: var(--color-primary);
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 500;
}

.invoice-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.invoice-table tfoot td {
    border-top: 2px solid #ddd;
    border-bottom: none;
    padding-top: 15px;
}

.invoice-footer {
    margin-top: 40px;
    text-align: center;
    color: #777;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* Mobile responsive - Facture */
@media (max-width: 600px) {
    #invoiceModal .modal-content {
        padding: var(--spacing-md);
        max-height: 95vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .invoice-header {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }

    .invoice-details {
        text-align: center;
    }

    .invoice-info {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .info-block {
        width: 100%;
    }

    .invoice-table {
        font-size: 0.85rem;
    }

    .invoice-table th,
    .invoice-table td {
        padding: 8px 6px;
    }

    .invoice-details h2 {
        font-size: 1.4rem;
    }
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    #invoiceModal, #invoiceModal * {
        visibility: visible;
    }
    #invoiceModal {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background: white;
        z-index: 99999;
    }
    .modal-content {
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        max-width: 100% !important;
    }
    .no-print {
        display: none !important;
    }
}
