@extends('layouts.blank')

@section('title', 'Print Invoice')

@section('content')
    <style>
        @media print { @page { size: 80mm auto; margin: 0; } }
        body { margin:0; padding:0; font-family: 'Courier New', monospace; }
        .thermal-print { width:80mm; padding:5mm; }
        .thermal-separator { text-align:center; font-size:10px; color:#666; }
    </style>

    <div class="thermal-print">
        @include('invoices.print_partial')
    </div>

    <script>
        // Auto print when loaded in iframe (like payment collection)
        window.addEventListener('load', function() {
            // Small delay to ensure content is fully rendered
            setTimeout(function() {
                window.print();
            }, 100);
        });
    </script>
@endsection
