/* ==========================================================================
   FOREVER BOT V8 - ESTILOS IMPRESSÃO A4 MULTIPÁGINA (SUPORTE DE ATÉ 200 JOGOS)
   ========================================================================== */

.pagina-a4-mega {
    width: 210mm;
    height: 297mm;
    background: #ffffff;
    margin: 0 auto;
    padding: 6mm 4mm;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: flex-start;
    gap: 6mm;
    break-after: page;
    page-break-after: always;
    page-break-inside: avoid;
    break-inside: avoid;
    font-family: Arial, Helvetica, sans-serif;
    overflow: hidden;
}

/* CONTAINER DO VOLANTE COM BORDA PONTILHADA DE CORTE */
.volante-a4-container-mega {
    width: 92mm;
    height: 184mm;
    flex-shrink: 0;
    border: 1.5px dashed #444444;
    padding: 2.5mm;
    box-sizing: border-box;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    page-break-inside: avoid;
    break-inside: avoid;
}

/* BARRAS DE SINCRONISMO SUPERIORES */
.top-black-marks-mega {
    display: flex;
    justify-content: space-between;
    padding: 0 10mm;
    margin-bottom: 1mm;
}
.b-mark-mega {
    width: 4.5mm;
    height: 2.2mm;
    background-color: #000000 !important;
}

/* BANNER SUPERIOR VERDE INSTITUCIONAL */
.header-volante-mega-real {
    background: linear-gradient(135deg, #02692e 0%, #059669 100%);
    color: #ffffff;
    height: 16mm;
    border-radius: 1mm;
    display: flex;
    align-items: center;
    padding: 1.5mm 3mm;
    position: relative;
    overflow: hidden;
}
.trevo-bg-box {
    width: 10mm;
    height: 10mm;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1.5mm;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 2.5mm;
}
.clover-symbol {
    font-size: 14pt;
}
.title-mega-block {
    display: flex;
    flex-direction: column;
    line-height: 0.9;
}
.txt-mega-sub {
    font-size: 10pt;
    font-weight: 700;
    font-style: italic;
    color: #ffffff;
}
.txt-mega-main {
    font-size: 16pt;
    font-weight: 900;
    letter-spacing: 1px;
    color: #facc15;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
.badge-jogo-id-mega {
    margin-left: auto;
    font-size: 6pt;
    font-weight: 900;
    background: #ffffff;
    color: #02692e;
    padding: 0.5mm 1.5mm;
    border-radius: 0.6mm;
}

.sub-header-orientacao {
    font-size: 4pt;
    font-weight: 900;
    color: #02692e;
    margin: 1mm 0 0.5mm 0;
    letter-spacing: -0.1px;
}

/* CORPO DO BILHETE */
.body-volante-mega {
    display: flex;
    align-items: flex-start;
    gap: 1.5mm;
}

.side-black-marks-mega {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 110mm;
    margin-top: 0.5mm;
}
.b-mark-side-m {
    width: 3.8mm;
    height: 2mm;
    background-color: #000000 !important;
}

.quadros-area-mega {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1mm;
}

/* QUADRO DO JOGO */
.quadro-jogo-mega {
    background-color: #fffef0;
    border: 1px solid #f59e0b;
    border-radius: 1mm;
    padding: 1.2mm;
}
.quadro-jogo-mega.vazio {
    background-color: #f9fafb;
    border: 1px dashed #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 31mm;
}
.txt-vazio-mega {
    font-size: 6pt;
    font-weight: bold;
    color: #9ca3af;
}

/* GRADE 6X10 DAS DEZENAS */
.grid-dezenas-mega {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.6mm 0.4mm;
    justify-items: center;
}

.box-dezena-mega {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 6.5pt;
    font-weight: 900;
    color: #dc2626;
}
.bracket-l, .bracket-r {
    font-size: 6pt;
    color: #dc2626;
    font-weight: bold;
}
.num-txt-mega {
    margin: 0 0.2mm;
}

/* PREENCHIMENTO NEGRO DA MARCAÇÃO ÓTICA DAS DEZENAS */
.ponto-caneta-mega {
    position: absolute;
    width: 5.5mm;
    height: 2.8mm;
    background-color: #000000 !important;
    border-radius: 0.3mm;
    z-index: 2;
}

.linha-anular-jogo {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1mm;
    font-size: 3.8pt;
    color: #dc2626;
    font-weight: bold;
    margin-top: 0.2mm;
}
.box-anular {
    font-size: 4.8pt;
}

/* CONTROLES DO RODAPÉ */
.painel-controles-mega {
    font-size: 4.2pt;
    color: #02692e;
    margin-top: 0.8mm;
    display: flex;
    flex-direction: column;
    gap: 0.6mm;
}
.label-opt-mega {
    font-weight: bold;
    display: block;
    margin-bottom: 0.2mm;
}
.boxes-row-opt {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6mm;
}
.box-opt-item {
    display: flex;
    align-items: center;
    font-size: 5.2pt;
    font-weight: 900;
    color: #dc2626;
    position: relative;
}

/* PREENCHIMENTO COMPACTO E REDONDO PARA A QUANTIDADE DE NÚMEROS APOSTADOS */
.ponto-caneta-sm-m {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 3.2mm;
    height: 1.8mm;
    background-color: #000000 !important;
    border-radius: 50%;
    z-index: 2;
}

.row-bolao-line {
    display: flex;
    align-items: center;
    gap: 1.5mm;
    margin-top: 0.2mm;
}
.txt-sub-unit {
    font-size: 3.8pt;
    font-weight: bold;
    color: #02692e;
}

/* RODAPÉ INSTITUCIONAL CAIXA */
.footer-mega-real {
    border-top: 1px solid #02692e;
    padding-top: 0.5mm;
    margin-top: 0.8mm;
}
.banner-verde-aviso {
    background-color: #02692e;
    color: #ffffff;
    font-size: 3.8pt;
    font-weight: 900;
    text-align: center;
    padding: 0.4mm;
    border-radius: 0.3mm;
}
.brand-caixa-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0.6mm 0 0.2mm 0;
}
.sq-mark-black {
    width: 3mm;
    height: 3mm;
    background-color: #000000 !important;
}
.circle-mark-black {
    width: 3mm;
    height: 3mm;
    background-color: #000000 !important;
    border-radius: 50%;
}
.logo-loterias-box {
    font-size: 8.5pt;
    font-weight: 900;
    font-style: italic;
}
.txt-lot-f { color: #02692e; }
.txt-caixa-f { color: #0284c7; }

.txt-instrucao-final {
    font-size: 3.8pt;
    color: #4b5563;
    text-align: center;
}

/* REGRAS RÍGIDAS DE IMPRESSÃO SEM LIMITAÇÃO DE PÁGINAS (@media print) */
@media print {
    body * {
        visibility: hidden !important;
    }

    #impressor-a4-area, 
    #impressor-a4-area * {
        visibility: visible !important;
    }

    #impressor-a4-area {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 210mm !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    @page {
        size: A4 portrait;
        margin: 0;
    }

    html, body {
        width: 210mm !important;
        height: auto !important;
        min-height: 100% !important;
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .pagina-a4-mega {
        box-shadow: none !important;
        margin: 0 !important;
        padding: 6mm 4mm !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        align-items: flex-start !important;
        gap: 6mm !important;
        width: 210mm !important;
        height: 297mm !important;
        box-sizing: border-box !important;
        break-after: page !important;
        page-break-after: always !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .ponto-caneta-mega,
    .ponto-caneta-sm-m,
    .b-mark-mega,
    .b-mark-side-m,
    .sq-mark-black,
    .circle-mark-black {
        background-color: #000000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
