/* ============================================================
   QOP 07 — Estilos de impressão (A3 horizontal)
   ============================================================ */

@page {
    size: A3 landscape;
    margin: 5mm;
}

@media print {
    html, body {
        background: #fff !important;
        font-size: 9px;
    }

    /* Esconder elementos de interface */
    .barra-acoes,
    .aviso-mobile,
    .slot-menu,
    .modal-overlay,
    .toast,
    .col-aplicar,
    .btn-aplicar,
    .td-mapa,
    .btn-mapa { display: none !important; }

    .container-qop07 {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
        box-shadow: none;
        transform: scale(0.92);
        transform-origin: top left;
    }

    /* A grelha tem de aparecer toda, sem scroll */
    .grelha-wrap { overflow: visible !important; border: 1px solid #000; }
    .grelha { width: 100% !important; }
    .grelha th, .grelha td { border-color: #000 !important; }

    /* Garantir impressão das cores de fundo dos slots/badges */
    *, *::before, *::after {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Inputs aparecem como texto simples */
    input, select, textarea {
        border: none !important;
        background: transparent !important;
        -webkit-appearance: none;
        appearance: none;
        color: #000 !important;
    }
    input[type="time"]::-webkit-calendar-picker-indicator,
    input[type="date"]::-webkit-calendar-picker-indicator { display: none; }

    .slot { height: 22px; }

    /* Evitar quebras de página dentro de tabelas */
    table, tr, .bloco-foma, .bloco-pontos, .bloco-aeronaves { page-break-inside: avoid; }
    .painel-inferior { page-break-inside: avoid; }

    /* Forçar tema claro na impressão */
    body.tema-escuro {
        --fundo-painel: #fff;
        --texto: #000;
    }
    body.tema-escuro .container-qop07 *,
    body.tema-escuro .tabela-aeronaves td { background: transparent !important; color: #000 !important; }
}
