﻿/* ------------------------------------------------------------------------ */
/*                                 Print                                    */
/* -------------------------------------------------------------------------*/

.monitoringTasksToPrint {
    display: none;
}

@media print {

    #header {
        display: none;
    }

    .menu-nuevo {
        display: none !important;
    }

    #footer {
        display: none;
    }

    .modal-footer {
        display: none;
    }

    .close {
        display: none;
    }

    .home-content {
        width: 100% !important;
        float: left;
        left: 0px !important;
    }

    .select2-container > * {
        border: 0px solid !important;
    }

    .select2-container .select2-choice {
        border: 0px solid !important;
    }

    .select2-container-multi .select2-choices {
        border: 0px solid !important;
    }

    .label {
        border: 0px !important;
    }

    .noprint {
        display: none;
    }

    .button {
        display: none;
    }

    .buttonOn {
        display: none;
    }

    .collapsablePanel {
        border: solid 0px;
    }

    .entityEdit .editableDetails {
        padding: 5px;
        margin-left: 0px;
    }

    .entityEdit .editableHeader .captionCell {
        height: 35px;
        text-align: left;
        padding: 10px 10px 0px 0px;
        vertical-align: top;
    }

    .entityEdit .editableHeader .controlCell {
        height: 35px;
        text-align: left;
        padding: 4px 0px 0px 0px;
        vertical-align: top;
    }

    .controlCell .label {
        padding: 0px 0px 0px 2px !important;
        white-space: normal;
    }

    #SecurityConditions textarea {
        margin: 0px 5px;
    }

    .editableHeader {
        padding-left: 10px;
    }

    .controlCell img {
        display: none;
    }

    /*
    #RawMaterialLotsNoWater table.detailsTable tr th:nth-child(4), 
    #RawMaterialLotsNoWater table.detailsTable tr td:nth-child(4), 
    #RawMaterialLotsNoWater table.detailsTable tr td:nth-child(12), 
    #RawMaterialLotsNoWater table.detailsTable tr td:nth-child(12) {
        display:none;
    }

    #PackagingMaterialLots table.detailsTable tr th:nth-child(4), 
    #PackagingMaterialLots table.detailsTable tr td:nth-child(4), 
    #PackagingMaterialLots table.detailsTable tr td:nth-child(11), 
    #PackagingMaterialLots table.detailsTable tr td:nth-child(11) {
        display:none;
    }
    */

    #logo {
        display: inherit !important;
        float: right;
        margin: 10px;
    }

    .select2-container .select2-choice .select2-arrow {
        border-left: 0px solid #aaa;
    }

    .datePicker .openButton {
        display:none;
    }

    .print-dash:empty::after,
    .print-dash[value=""]::after {
        content: "-";
        color: black;
    }

    .textBox,
    .textBoxDisabled,
    .datePicker .input,
    .datePicker .inputDisabled {
        border: solid 0px;
    }

    .textBox::placeholder,
    .textBoxDisabled::placeholder,
    .datePicker .input::placeholder,
    .datePicker .inputDisabled::placeholder {
        color: black; /* shows the "-" only in print */
    }

    /* rotulo de lote de materiales general */
    .rotulo1 {
        /* border: solid 1px #333; */
        page-break-before: always;
        width: 550px;
        border: solid 1px #333;
        margin: 10px;
    }

    .rotulo1 .lotState {
        font-size: 50px !important;
        margin-bottom: 30px;
        width: 100%;
        text-align: center;
        font-family: Arial, Helvetica, sans-serif !important;
        font-weight: 900 !important;
        text-transform: uppercase;
    }

    /* rotulo de fraccionado */
    .rotulo2 {
        /* border: solid 1px #333; */
        page-break-before: always;
        width: 500px;
        border: solid 1px #333;
        margin: 10px;
    }

    /* rotulo de lote de materiales cuarentena */
    .rotulo3 {
        width: 550px;
        margin: 10px;
        page-break-before: always;
        color: #000 !important;
    }

    .rotulo1 .caption,
    .rotulo1 .label,
    .rotulo2 .caption,
    .rotulo2 .label,
    .rotulo3 .caption,
    .rotulo3 .label {
        font-family: sans-serif !important;
        font-weight: bold !important;
        font-size: 20px !important;
        color: #000 !important;
        line-height: 1.2;
    }

    .rotulo3 .lotState {
        font-family: Arial, Helvetica, sans-serif !important;
        font-size: 48px !important;
        font-weight: 900 !important;
        text-transform: uppercase;
        text-align: center;
        width: 100%;
        /* La línea divisoria */
        border-top: 3px solid #000;
        margin-top: 15px;
        padding-top: 5px;
    }

    .rotulo3 .entityEdit .editableHeader .controlCell {
        height: 30px;
        padding-top: 0px !important;
    }

    .rotulo1 .entityEdit .editableHeader .controlCell,
    .rotulo2 .entityEdit .editableHeader .controlCell {
        height: 30px;
        padding-top: 10px !important;
    }

    .rotulo3 .entityEdit .editableHeader .captionCell {
        height: 30px;
        padding-top: 2px !important;
    }

    .rotulo3 .entityEdit .editableHeader .errorCell {
        height: 30px;
    }

    .definitionPrint .stepTitle {
        font-size: 16px !important;
        font-weight: bold;
        border-bottom: solid 5px #c7c7c7 !important;
        display: inline-block;
        width: 1090px !important;
        margin-left: -15px;
        page-break-inside: avoid; /* Estándar antiguo (muy compatible) */
        break-inside: avoid; /* Estándar moderno */
    }

    .definitionPrint .subStepTitle {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .definitionPrint .collapsablePanel .container {
        width: 100% !important;
        padding: 0px !important;
    }

    .batchPrint .caption {
        width: fit-content !important;
        margin-right: 20px;
    }

    .batchPrint img {
        display: none;
    }

    .batchPrint .stepTitle {
        font-size: 16px !important;
        font-weight: bold;
        border-bottom: solid 5px #c7c7c7 !important;
        display: block;
        width: 1090px !important;
        margin-left: -29px;
        padding-top: 30px !important;
    }

    /* 1. ELIMINAR LOS SALTOS DE LÍNEA INTERMEDIOS 
       El HTML tiene <br> entre los paneles. Al imprimir, estos <br> actúan 
       como puntos de ruptura válidos. Hay que ocultarlos para que los divs 
       sean vecinos directos. */
    .batchPrint #ProductionRecordPrint > br,
    .batchPrint .batchRecordPrintCover > br,
    .batchPrint .entityEdit > br {
        display: none !important;
    }

    /* 2. PEGAR EL CONTENEDOR DEL TÍTULO AL SIGUIENTE ELEMENTO
       En lugar de aplicar el estilo al .stepTitle (que es un span interno),
       se lo aplicamos al div que contiene todo el bloque del encabezado.
       
    */
    .batchPrint div[id^="panel_Group"],
    .batchPrint div[id^="panel_Header"] {
        page-break-after: avoid !important;
        break-after: avoid !important;
        /* Aseguramos que el propio cuadro del título no se rompa por la mitad */
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        margin-bottom: 0px !important;
    }

    .batchPrint div[id^="panel_SubStep"] {
        margin-top: 10px !important; /* Un pequeño aire visual, pero sin ruptura */
    }

    .batchPrint .collapsablePanel .container {
        width: 100% !important;
        padding: 0px !important;
    }

    .batchPrint .batchRecordPrintCover {
        page-break-after: always;
        break-after: page;
    }

    .batchPrint #Lots {
        margin-left: 0px !important;
    }

    .batchPrint input {
        border: none;
    }

    .batchPrint textarea {
        border: none;
    }

    .batchPrint #BatchRecord_Comments {
        width: 90% !important;
    }

    .batchPrint input[type="checkbox"] {
        margin-left: 5px !important;
    }

    .batchPrint .captionCell {
        min-width: fit-content !important;
        field-sizing: content
    }

    .batchPrint .propValue {
        min-width: fit-content !important;
        field-sizing: content;
        color: #000000 !important;
    }

    .propAudit {
        /* Limpieza visual (quita bordes y fondo) */
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        color: #888888 !important;

        height: auto !important;
        padding: 0 !important;
        pointer-events: none;

        display: block; /* Necesario para que el float funcione bien */
        float: right; /* Manda el texto al extremo derecho */
        
        /* Subimos el elemento para que se coloque en la fila visual del valor */
        margin-top: -22px;
        margin-right: 5px; /* Un pequeño margen para no pegarse al borde */
        
        /* Aseguramos que el texto esté alineado a la derecha */
        text-align: right;
        z-index: 10;
        position: relative;
        min-width: fit-content !important;
        field-sizing: content;
    }

    .propAudit + .errorCell {
        display: none;
    }

}