/**
 * Print stylesheet for A4 Quotation PDF Export
 * Hides web-only elements and formats a clean, professional A4 print layout.
 */

@media screen {
    #print-quotation-a4 {
        display: none !important;
    }
}

@media print {
    /* Hide all web components */
    body * {
        visibility: hidden;
    }
    
    /* Show only the print container and its children */
    #print-quotation-a4, #print-quotation-a4 * {
        visibility: visible;
    }
    
    #print-quotation-a4 {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        max-width: 210mm; /* A4 Width */
        padding: 15mm;
        box-sizing: border-box;
        font-family: 'Inter', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
        color: #333;
        background-color: #fff;
        font-size: 11pt;
        line-height: 1.4;
    }
    
    /* Layout styling */
    .print-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 2px solid #002e73;
        padding-bottom: 15px;
        margin-bottom: 25px;
    }
    
    .print-logo img {
        height: 40px;
        width: auto;
    }
    
    .print-dealer-info {
        text-align: right;
        font-size: 8.5pt;
        color: #555;
    }
    
    .print-dealer-info h3 {
        margin: 0 0 5px 0;
        font-size: 11pt;
        color: #002e73;
        font-weight: 700;
    }
    
    .print-dealer-info p {
        margin: 2px 0;
    }
    
    .print-title {
        text-align: center;
        margin-bottom: 25px;
    }
    
    .print-title h1 {
        font-size: 18pt;
        font-weight: 800;
        color: #002e73;
        margin: 0 0 8px 0;
        text-transform: uppercase;
    }
    
    .print-title p {
        font-size: 9.5pt;
        color: #666;
        margin: 0;
    }
    
    .print-meta-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin-bottom: 25px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 15px;
        background-color: #f9f9f9;
    }
    
    .print-meta-column h4 {
        margin: 0 0 8px 0;
        font-size: 10pt;
        color: #002e73;
        text-transform: uppercase;
        border-bottom: 1px solid #ddd;
        padding-bottom: 4px;
    }
    
    .print-meta-column p {
        margin: 4px 0;
        font-size: 9.5pt;
    }
    
    .print-meta-column p strong {
        color: #111;
    }
    
    /* Cost Breakdown Table */
    .print-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 25px;
    }
    
    .print-table th {
        background-color: #002e73;
        color: #fff;
        text-align: left;
        padding: 8px 12px;
        font-size: 9.5pt;
        font-weight: 600;
        text-transform: uppercase;
    }
    
    .print-table td {
        padding: 8px 12px;
        border-bottom: 1px solid #eee;
        font-size: 9.5pt;
    }
    
    .print-table tr.total-row td {
        border-top: 2px solid #002e73;
        border-bottom: 2px solid #002e73;
        font-size: 12pt;
        font-weight: 700;
        color: #002e73;
        background-color: #f0f4fa;
    }
    
    .print-table tr.section-row td {
        background-color: #f5f5f5;
        font-weight: 700;
        font-size: 9.5pt;
        color: #333;
    }
    
    .print-table td.number-col {
        text-align: right;
    }
    
    /* Footer section */
    .print-footer-grid {
        display: grid;
        grid-template-columns: 1.2fr 0.8fr;
        gap: 30px;
        margin-top: 40px;
        font-size: 9pt;
        color: #666;
    }
    
    .print-notes h5 {
        margin: 0 0 6px 0;
        color: #333;
        font-size: 9.5pt;
    }
    
    .print-notes ul {
        margin: 0;
        padding-left: 15px;
    }
    
    .print-notes li {
        margin-bottom: 4px;
    }
    
    .print-signatures {
        display: flex;
        justify-content: space-between;
        margin-top: 50px;
        text-align: center;
    }
    
    .signature-box {
        width: 45%;
    }
    
    .signature-box p.sign-title {
        font-weight: 600;
        color: #333;
        margin-bottom: 60px;
    }
    
    .signature-box p.sign-name {
        font-style: italic;
        color: #888;
    }
    
    /* Page settings for cleaner prints */
    @page {
        size: A4;
        margin: 0;
    }
    
    body {
        margin: 0;
        padding: 0;
    }
}
