@media print {
    /* Hide everything except invoice preview */
    body * {
        visibility: hidden;
    }

    .fs-order-invoice-preview,
    .fs-order-invoice-preview * {
        visibility: visible;
    }

    .fs-order-invoice-preview {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    /* Table styles */
    .fs-order-invoice-preview table {
        width: 100%;
        border-collapse: collapse;
    }

    .fs-order-invoice-preview table thead {
        background-color: #f2f2f2;
    }

    .fs-order-invoice-preview table td,
    .fs-order-invoice-preview table th {
        padding: 10px;
        border: 1px solid #ddd;
    }

    .fs-order-invoice-preview table td:first-child {
        font-weight: bold;
    }

    .fs-order-invoice-preview table td:last-child {
        text-align: right;
    }

    /* Remove any page margins */
    @page {
        margin: 0.5cm;
    }
}