/* Print Styles for Mobile PDF Generation - print.css */

@media print {
    /* Force color printing and proper formatting */
    * {
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    /* Reset body and page margins */
    @page {
        margin: 0.5in;
        size: A4;
    }
    
    body {
        font-family: Arial, sans-serif !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        color: #000 !important;
    }
    
    /* Header styling - white background as requested */
    .header {
        background-color: #ffffff !important;
        color: #000000 !important;
        text-align: center !important;
        margin-bottom: 8px !important; /* Reduced from 15px */
        padding: 5px !important; /* Reduced from 10px */
        border-bottom: 2px solid #005A42 !important;
    }
    
    .header h2 {
        color: #005A42 !important;
        margin: 0 !important; /* Removed bottom margin */
        font-size: 16px !important;
        font-weight: bold !important;
        line-height: 1.1 !important; /* Tighter line height */
    }
    
    .header p {
        margin: 0 !important; /* Removed all margins */
        color: #666 !important;
        font-size: 10px !important;
        line-height: 1.1 !important; /* Tighter line height */
    }
    
    /* Table styling */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin: 8px 0 !important;
        page-break-inside: avoid !important;
        font-size: 10px !important;
    }
    
    /* Table header - white background as requested */
    th {
        background-color: #ffffff !important;
        color: #000000 !important;
        border: 1px solid #333 !important;
        padding: 4px 2px !important;
        text-align: center !important;
        font-weight: bold !important;
        font-size: 9px !important;
        line-height: 1.1 !important;
    }
    
    /* Table data cells - white background for rows */
    td {
        border: 1px solid #333 !important;
        padding: 4px 2px !important;
        text-align: left !important;
        font-size: 9px !important;
        line-height: 1.1 !important;
        background-color: #ffffff !important;
        color: #000000 !important;
    }
    
    /* Remove gray backgrounds - make all rows white as requested */
    tr:nth-child(even) {
        background-color: #ffffff !important;
    }
    
    tr:nth-child(odd) {
        background-color: #ffffff !important;
    }
    
    /* Footer styling */
    .footer {
        margin-top: 10px !important;
        text-align: center !important;
        font-size: 8px !important;
        color: #666 !important;
        padding: 8px !important;
        border-top: 1px solid #ccc !important;
        background-color: #ffffff !important;
    }
    
    /* Hide elements that shouldn't print */
    .no-print,
    .btn,
    button,
    .action-btn,
    .cart-badge-container,
    .mini-cart-dropdown,
    .toast-container,
    .modal,
    nav,
    .navbar,
    .help-block-container,
    .action-buttons-row,
    .breadcrumb,
    .ltn__breadcrumb-area {
        display: none !important;
    }
    
    /* Mobile specific adjustments */
    @media print and (max-width: 768px) {
        body {
            font-size: 10px !important;
        }
        
        table {
            font-size: 8px !important;
        }
        
        th, td {
            padding: 3px 1px !important;
            font-size: 7px !important;
        }
        
        .header h2 {
            font-size: 14px !important;
        }
        
        .header p {
            font-size: 9px !important;
        }
        
        /* Reduce margins for mobile */
        .header {
            margin-bottom: 5px !important;
            padding: 5px !important;
        }
        
        .footer {
            margin-top: 5px !important;
            padding: 5px !important;
        }
    }
    
    /* Extra small mobile screens */
    @media print and (max-width: 480px) {
        body {
            font-size: 8px !important;
        }
        
        table {
            font-size: 7px !important;
        }
        
        th, td {
            padding: 2px 1px !important;
            font-size: 6px !important;
        }
        
        .header h2 {
            font-size: 12px !important;
        }
        
        .header p {
            font-size: 8px !important;
        }
    }
    
    /* Prevent page breaks inside table rows */
    tr {
        page-break-inside: avoid !important;
    }
    
    /* Ensure table headers repeat on new pages */
    thead {
        display: table-header-group !important;
    }
    
    /* Force webkit browsers to respect print styles */
    -webkit-print-color-adjust: exact;
}

/* Additional mobile webkit print fixes */
@media print and (-webkit-min-device-pixel-ratio: 0) {
    body {
        -webkit-transform: scale(1) !important;
        transform: scale(1) !important;
    }
    
    table {
        -webkit-transform: scale(1) !important;
        transform: scale(1) !important;
    }
}