/* print.css - Estilos para Impressão */

@media print {
    /* Ocultar elementos não essenciais */
    nav, 
    aside, 
    .sidebar,
    .no-print,
    button:not(.print-only),
    .toast,
    .modal-backdrop,
    #chat-widget,
    footer {
        display: none !important;
    }
    
    /* Remover backgrounds e shadows */
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.4;
    }
    
    /* Ajustar layout */
    main, .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Tabelas */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 10pt;
    }
    
    table th,
    table td {
        border: 1px solid #333 !important;
        padding: 6px 8px !important;
        text-align: left;
    }
    
    table th {
        background: #f0f0f0 !important;
        font-weight: bold;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Cards e containers */
    .card, .bg-white {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    /* Headers de seção */
    h1, h2, h3 {
        page-break-after: avoid;
        color: #000 !important;
    }
    
    h1 { font-size: 18pt; }
    h2 { font-size: 14pt; }
    h3 { font-size: 12pt; }
    
    /* Links */
    a {
        color: #000 !important;
        text-decoration: underline;
    }
    
    /* Status badges com cores preservadas */
    .bg-green-100, .bg-green-500, .text-green-500, .text-green-600 {
        background: #dcfce7 !important;
        color: #166534 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .bg-yellow-100, .bg-yellow-500, .text-yellow-500, .text-yellow-600 {
        background: #fef9c3 !important;
        color: #854d0e !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .bg-red-100, .bg-red-500, .text-red-500, .text-red-600 {
        background: #fee2e2 !important;
        color: #991b1b !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .bg-blue-100, .bg-blue-500, .text-blue-500, .text-blue-600 {
        background: #dbeafe !important;
        color: #1e40af !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Forçar quebra de página */
    .page-break {
        page-break-before: always;
    }
    
    /* Protocolo / Comprovante */
    .protocolo-container {
        border: 2px solid #000 !important;
        padding: 20px !important;
        margin: 20px 0 !important;
    }
    
    /* Rodapé de impressão */
    .print-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        text-align: center;
        font-size: 9pt;
        color: #666;
        border-top: 1px solid #ccc;
        padding-top: 5px;
    }
    
    /* Cabeçalho de impressão */
    .print-header {
        text-align: center;
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 2px solid #000;
    }
    
    .print-header img {
        max-height: 60px;
    }
}

/* Classe para mostrar apenas na impressão */
.print-only {
    display: none;
}

@media print {
    .print-only {
        display: block !important;
    }
}
