/*
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
*/
/* 
    Created on : 20/09/2019, 15:40:09
    Author     : Hernan
*/

/*
    Permite que al aplicar la clase (styleClass=ui-datatable-reflow-fix) en una 
    dataTable con reflow=true y rowGroup activado no se pinte dos veces el titulo 
    de la columna. Falla existente hasta version primefaces 6.1
*/
.ui-datatable-reflow-fix .ui-datatable-data td .ui-column-title {
    display: none;
}

/*
    Permite que al aplicar el atributo expandibleRowGorup-true en una 
    dataTable el nombre de la fila autogenerada por el agrupamiento no reptia
    el nombre de la columna agrupada. Falla existente hasta version primefaces 6.1
*/
.ui-rowgroup-header .ui-column-title {
    display: none;
}

/*
*   Permite que los globos de mensaje, con sus ids especificos, puedan sobreponerse
    a cualquier ventana emergente que exista en cualquier momento dado.
    Aplica tanto a fullScreenSecureTemplate.xhtml y fullScreenUnsecureTemplate.xhtml
    a los growls.
*/
#msgs_container, #msgsErr_container, #msgsAlt_container, #msgsErrAlt_container {
    z-index: 9999 !important;
}


.ui-datatable-expandable-fix .ui-rowgroup-header .ui-column-title {
    display: none;
}
.ui-datatable-expandable-fix .ui-datatable-summaryrow .ui-column-title {
    display: none;
}
.ui-datatable-expandable-fix .ui-rowgroup-header {
    text-decoration: underline !important;
}
.ui-datatable-expandable-fix .ui-datatable-summaryrow {
    font-weight: normal !important;
}

/* Asegura el contexto de posicionamiento */
.tabla-congelada-extremos .ui-datatable-scrollable-body,
.tabla-congelada-extremos .ui-datatable-scrollable-header-box {
    position: relative;
}

/* --- CONGELAR EXTREMO IZQUIERDO (Cabecera y Celdas de Datos Normales) --- */
.tabla-congelada-extremos th:first-child,
.tabla-congelada-extremos tr.ui-widget-content:not(.ui-expanded-row-content) td:first-child {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    z-index: 3;
    background-color: #ffffff !important; /* Cambiar si usas tema oscuro */
    box-shadow: 2px 0px 5px rgba(0,0,0,0.08);
}

/* --- CONGELAR EXTREMO DERECHO (Cabecera y Celdas de Datos Normales) --- */
.tabla-congelada-extremos th:last-child,
.tabla-congelada-extremos tr.ui-widget-content:not(.ui-expanded-row-content) td:last-child {
    position: -webkit-sticky;
    position: sticky;
    right: 0;
    z-index: 3;
    background-color: #ffffff !important; /* Cambiar si usas tema oscuro */
    box-shadow: -2px 0px 5px rgba(0,0,0,0.08);
}

/* Evita problemas de superposición en el scroll vertical de las cabeceras */
.tabla-congelada-extremos th:first-child,
.tabla-congelada-extremos th:last-child {
    z-index: 4;
}

/* --- CORRECCIÓN PARA ROW EXPANSION --- */
/* Forzamos a que la fila expandida conserve su flujo normal del DOM sin que el sticky altere su ancho */
.tabla-congelada-extremos tr.ui-expanded-row-content td {
    position: static !important;
    background-color: #f8f9fa !important; /* Un fondo gris sutil para diferenciar la expansión */
}