/* Print styles for Ventilation Designer */
@media print {
    /* Reset all page margins */
    @page {
        margin: 0.5cm;
        size: auto;
    }
    
    /* Hide everything */
    body * {
        visibility: hidden;
        background: none !important;
    }
    
    /* Show only the report content */
    #vent-resultContent, 
    #vent-resultContent * {
        visibility: visible;
        background: white !important;
    }
    
    /* Position the report at the top of the page */
    #vent-resultContent {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        max-width: 100%;
        padding: 10px !important;
        margin: 0 !important;
        border: none !important;
        display: block !important;
        font-size: 12px !important;
        line-height: 1.3 !important;
    }
    
    /* Hide specific elements within results that shouldn't be printed */
    .vent-no-print, 
    .vent-button,
    .vent-buttons-row,
    .vent-buy-button {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Ensure all content is visible in print */
    .vent-report-section {
        page-break-inside: avoid;
        margin-bottom: 12px !important;
        padding: 0 !important;
        background: none !important;
    }
    
    /* Reduce font sizes for print */
    .vent-report-title {
        font-size: 18px !important;
    }
    
    .vent-report-section-title {
        font-size: 16px !important;
        margin-bottom: 5px !important;
        padding-bottom: 3px !important;
    }
    
    /* Minimize whitespace */
    .vent-property-details {
        gap: 5px !important;
        margin: 0 !important;
    }
    
    .vent-property-detail {
        margin-bottom: 3px !important;
        flex-basis: 45% !important;
    }
    
    /* Adjust backgrounds for better printing */
    .vent-system-info,
    .vent-upgrade-recommendation,
    .vent-warning,
    .vent-error {
        background: none !important;
        border-left: 1px solid #000 !important;
        padding: 5px !important;
        margin: 5px 0 !important;
    }
    
    /* Fix system specs grid for printing */
    .vent-system-specs {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px !important;
        margin: 5px 0 !important;
    }
    
    /* Ensure spec items print well */
    .vent-spec-item {
        background: none !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        padding: 5px !important;
        font-size: 10px !important;
        margin: 0 !important;
    }
    
    /* Compact benefits list */
    .vent-benefits-list {
        margin: 5px 0 !important;
        padding-left: 15px !important;
    }
    
    .vent-benefits-list li {
        margin-bottom: 2px !important;
        font-size: 10px !important;
    }
    
    /* Fix approval section */
    .vent-approval-section {
        margin-top: 10px !important;
        padding: 5px !important;
        border: 1px dashed #999 !important;
    }
    
    .vent-signature-line {
        margin-top: 15px !important;
    }
    
    /* Scale down stamp */
    .vent-stamp {
        width: 150px !important;
        margin-top: 10px !important;
    }
    
    .vent-stamp-text {
        padding: 5px !important;
        font-size: 16px !important;
    }
    
    /* Fix report header spacing */
    .vent-report-header {
        margin-bottom: 10px !important;
        padding-bottom: 5px !important;
    }
    
    /* Hide all buttons */
    .vent-button, button {
        display: none !important;
    }
    
    /* Hide results container styling but keep content */
    .vent-results {
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Remove all backgrounds */
    * {
        background: none !important;
        box-shadow: none !important;
    }
    
    /* Reduce all margins and paddings */
    * {
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Only add minimal padding to actual content elements */
    p, h1, h2, h3, h4, h5, h6, .vent-property-detail, .vent-spec-item, li {
        padding: 2px !important;
        margin: 2px 0 !important;
    }
    
    /* Fix headings */
    h3.vent-report-section-title {
        margin: 8px 0 3px 0 !important;
        padding-bottom: 2px !important;
    }
}