/* Print Styles for ESP Pro Reports */

@media print {
    /* Hide non-essential elements */
    .tab-nav,
    .btn,
    button,
    .watermark,
    input[type="range"],
    #toggleBtn,
    .status-indicator {
        display: none !important;
    }
    
    /* Show all tab content when printing */
    .tab-content {
        display: block !important;
        page-break-after: always;
    }
    
    /* Header adjustments */
    .app-header {
        background: white !important;
        border-bottom: 2px solid #000;
        page-break-after: avoid;
    }
    
    .logo-img {
        filter: none !important;
    }
    
    /* Cards */
    .card {
        background: white !important;
        border: 1px solid #000;
        page-break-inside: avoid;
        margin-bottom: 1rem;
        box-shadow: none !important;
    }
    
    .card-header {
        background: #f0f0f0;
        border-bottom: 1px solid #000;
        padding: 0.5rem 1rem;
    }
    
    /* Tables */
    .comparison-table {
        width: 100%;
        border-collapse: collapse;
    }
    
    .comparison-table th,
    .comparison-table td {
        border: 1px solid #000;
        padding: 0.5rem;
        text-align: left;
    }
    
    .comparison-table th {
        background: #e0e0e0;
        font-weight: bold;
    }
    
    /* Results grid */
    .results-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .result-item {
        border: 1px solid #ccc;
        padding: 0.5rem;
        page-break-inside: avoid;
    }
    
    /* Alerts */
    .alert {
        border: 2px solid #000;
        padding: 0.5rem;
        margin: 0.5rem 0;
        page-break-inside: avoid;
    }
    
    .alert-error {
        border-left: 4px solid #000;
    }
    
    .alert-warning {
        border-left: 4px solid #666;
    }
    
    /* Charts - ensure they print */
    .chart-container {
        page-break-inside: avoid;
        height: 400px;
    }
    
    canvas {
        max-width: 100%;
        height: auto !important;
    }
    
    /* Body */
    body {
        background: white !important;
        color: #000 !important;
    }
    
    /* Typography */
    h1, h2, h3, h4, h5, h6 {
        color: #000 !important;
        page-break-after: avoid;
    }
    
    /* Page margins */
    @page {
        margin: 2cm;
        size: A4;
    }
    
    /* Avoid breaking inside these elements */
    .form-grid,
    #equipmentContent,
    #resultsContent {
        page-break-inside: avoid;
    }
    
    /* Logo in print */
    .logo-container {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .logo-img {
        max-height: 60px;
    }
    
    /* Footer */
    .app-footer {
        background: white !important;
        border-top: 2px solid #000;
        padding: 1rem;
        page-break-inside: avoid;
        margin-top: 2rem;
    }
    
    .footer-content {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        font-size: 0.8rem;
    }
    
    .footer-section h3 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .footer-social {
        display: none !important;
    }
    
    .footer-bottom {
        border-top: 1px solid #ccc;
        padding-top: 0.5rem;
        margin-top: 0.5rem;
        font-size: 0.75rem;
    }
    
    .footer-logo img {
        height: 25px;
    }
    
    /* Add page numbers */
    @page {
        @bottom-right {
            content: "Page " counter(page) " of " counter(pages);
        }
    }
    
    /* Simulation SVG */
    svg {
        page-break-inside: avoid;
    }
}

/* Print preview styles */
@media screen and (min-width: 1024px) {
    .print-preview {
        max-width: 21cm;
        margin: 0 auto;
        background: white;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    }
}
