/**
 * Baby Reports Printer - Print Styles
 * Desenvolvido por B20 Conteúdo Digital
 * https://www.b20.com.br
 * 
 * Estilos otimizados para impressão
 */

@media print {
    /* Reset */
    * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Hide everything except report content */
    body * {
        visibility: hidden;
    }
    
    /* Show only report preview */
    #report-preview,
    #report-preview * {
        visibility: visible;
    }
    
    /* Position report preview at top */
    #report-preview {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
    
    /* Ensure report content is visible */
    .report-content {
        display: block !important;
        background: white !important;
        color: black !important;
        min-height: auto !important;
    }
    
    .report-header {
        display: block !important;
        background: white !important;
        color: black !important;
    }
    
    /* Page setup */
    @page {
        margin: 2cm;
        size: A4;
    }
    
    body {
        margin: 0;
        padding: 0;
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    /* Typography */
    h1, h2, h3 {
        color: #000 !important;
        page-break-after: avoid;
    }
    
    h2 {
        font-size: 18pt;
        margin-top: 18pt;
        margin-bottom: 10pt;
        border-bottom: 2px solid #000;
        padding-bottom: 4pt;
    }
    
    h3 {
        font-size: 14pt;
        margin-top: 12pt;
        margin-bottom: 8pt;
    }
    
    p {
        margin-bottom: 8pt;
        orphans: 3;
        widows: 3;
        color: #000 !important;
    }
    
    /* Report content */
    .report-preview {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        background: white !important;
        border: none !important;
    }
    
    .preview-header {
        display: none !important; /* Hide preview header in print */
    }
    
    .report-content {
        padding: 0 !important;
        background: white !important;
        color: black !important;
        display: block !important;
        min-height: auto !important;
    }
    
    .report-header {
        display: block !important;
        background: white !important;
        color: black !important;
        text-align: center;
        margin-bottom: 20pt;
        padding-bottom: 10pt;
        border-bottom: 2px solid #000;
    }
    
    .report-header h2 {
        color: black !important;
        font-size: 18pt;
        margin-bottom: 8pt;
    }
    
    .report-header p {
        color: black !important;
        font-size: 12pt;
        margin: 4pt 0;
    }
    
    /* Hide report generator form */
    .report-generator {
        display: none !important;
    }
    
    /* Tables */
    table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 12pt;
        page-break-inside: avoid;
        background: white !important;
        color: #000 !important;
    }
    
    th, td {
        padding: 8pt;
        text-align: left;
        border: 1px solid #000;
        background: white !important;
        color: #000 !important;
    }
    
    th {
        background-color: #f0f0f0 !important;
        font-weight: bold;
        color: #000 !important;
    }
    
    /* Ensure all text elements are visible */
    .report-content h3,
    .report-content p,
    .report-content div,
    .report-content strong,
    .report-content em {
        color: #000 !important;
        display: block !important;
    }
    
    .report-content h3 {
        font-size: 14pt;
        margin-top: 12pt;
        margin-bottom: 8pt;
        page-break-after: avoid;
    }
    
    .report-content p {
        margin-bottom: 8pt;
    }
    
    .report-content strong {
        font-weight: bold;
    }
    
    .report-content em {
        font-style: italic;
    }
}
