/*
 * PF15 p:dataTable – selecao multipla (checkbox) e linhas bloqueadas.
 * Carregar apos pf15-compat.css.
 */

/* Linha de debito nao parcelavel (CDA, termo, protesto, etc.) */
.ui-datatable.parc-divida-debitos tr.parc-debito-nao-selecionavel > td {
	background-color: #faf6f6 !important;
	color: #888 !important;
}

.ui-datatable.parc-divida-debitos tr.parc-debito-nao-selecionavel:hover > td {
	background-color: #f5eded !important;
}

/* Checkbox habilitado – visual mais limpo */
.ui-datatable.parc-divida-debitos .ui-selection-column .ui-chkbox .ui-chkbox-box {
	width: 18px !important;
	height: 18px !important;
	min-width: 18px !important;
	min-height: 18px !important;
	border: 2px solid #b8b8b8 !important;
	border-radius: 4px !important;
	background: #fff !important;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06) !important;
	transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.ui-datatable.parc-divida-debitos .ui-selection-column .ui-chkbox .ui-chkbox-box.ui-state-hover:not(.ui-state-disabled) {
	border-color: var(--primary-color, #8B49A7) !important;
	box-shadow: 0 0 0 2px rgba(139, 73, 167, 0.15) !important;
}

.ui-datatable.parc-divida-debitos .ui-selection-column .ui-chkbox .ui-chkbox-box.ui-state-active:not(.ui-state-disabled) {
	border-color: var(--primary-color, #8B49A7) !important;
	background: #fff !important;
}

.ui-datatable.parc-divida-debitos .ui-selection-column .ui-chkbox .ui-chkbox-box.ui-state-active:not(.ui-state-disabled) .ui-chkbox-icon::before,
.ui-datatable.parc-divida-debitos .ui-selection-column .ui-chkbox .ui-chkbox-box.ui-state-active:not(.ui-state-disabled) .ui-icon-check::before {
	color: var(--primary-color, #8B49A7) !important;
	font-size: 13px !important;
	font-weight: bold !important;
}

/* Checkbox desabilitado – claramente distinto */
.ui-datatable.parc-divida-debitos .ui-selection-column .ui-chkbox .ui-chkbox-box.ui-state-disabled,
.ui-datatable.parc-divida-debitos tr.parc-debito-nao-selecionavel .ui-selection-column .ui-chkbox .ui-chkbox-box {
	border: 2px solid #ddd !important;
	background: #ececec !important;
	box-shadow: none !important;
	opacity: 0.75 !important;
	cursor: not-allowed !important;
	pointer-events: none !important;
}

.ui-datatable.parc-divida-debitos .ui-selection-column .ui-chkbox .ui-chkbox-box.ui-state-disabled .ui-chkbox-icon,
.ui-datatable.parc-divida-debitos tr.parc-debito-nao-selecionavel .ui-selection-column .ui-chkbox .ui-chkbox-icon {
	display: none !important;
}

/* Header "selecionar todos" */
.ui-datatable.parc-divida-debitos .ui-selection-column .ui-chkbox-all .ui-chkbox-box {
	width: 18px !important;
	height: 18px !important;
	min-width: 18px !important;
	min-height: 18px !important;
	border: 2px solid #b8b8b8 !important;
	border-radius: 4px !important;
	background: #fff !important;
}

/*
 * Coluna selecao 1% – pf15-compat.css fixa min-width em px (32px/18px).
 * Use styleClass="datatable-selecao-1pct" na p:dataTable + width="1%" na coluna.
 */
body .ui-datatable.datatable-selecao-1pct > .ui-datatable-tablewrapper > table,
body .ui-datatable.guia-recolhimento-retido-table > .ui-datatable-tablewrapper > table,
body .ui-datatable.guia-recolhimento-nfs-table > .ui-datatable-tablewrapper > table {
	table-layout: fixed !important;
	width: 100% !important;
}

body .ui-datatable.datatable-selecao-1pct thead th.ui-selection-column,
body .ui-datatable.datatable-selecao-1pct tbody td.ui-selection-column,
body .ui-datatable.datatable-selecao-1pct .ui-selection-column,
body .ui-datatable.datatable-selecao-1pct colgroup col.ui-selection-column,
body .ui-datatable.guia-recolhimento-retido-table thead th.ui-selection-column,
body .ui-datatable.guia-recolhimento-retido-table tbody td.ui-selection-column,
body .ui-datatable.guia-recolhimento-retido-table .ui-selection-column,
body .ui-datatable.guia-recolhimento-retido-table colgroup col.ui-selection-column,
body .ui-datatable.guia-recolhimento-nfs-table thead th.ui-selection-column,
body .ui-datatable.guia-recolhimento-nfs-table tbody td.ui-selection-column,
body .ui-datatable.guia-recolhimento-nfs-table .ui-selection-column,
body .ui-datatable.guia-recolhimento-nfs-table colgroup col.ui-selection-column {
	width: 1% !important;
	max-width: 1% !important;
	min-width: 0 !important;
	padding: 0 1px !important;
	box-sizing: border-box !important;
	overflow: hidden !important;
	text-align: center !important;
	white-space: nowrap !important;
}

body .ui-datatable.datatable-selecao-1pct .ui-selection-column .ui-chkbox,
body .ui-datatable.datatable-selecao-1pct .ui-selection-column .ui-chkbox-all,
body .ui-datatable.guia-recolhimento-retido-table .ui-selection-column .ui-chkbox,
body .ui-datatable.guia-recolhimento-retido-table .ui-selection-column .ui-chkbox-all,
body .ui-datatable.guia-recolhimento-nfs-table .ui-selection-column .ui-chkbox,
body .ui-datatable.guia-recolhimento-nfs-table .ui-selection-column .ui-chkbox-all {
	display: inline-block !important;
	margin: 0 auto !important;
}

body .ui-datatable.datatable-selecao-1pct .ui-selection-column .ui-chkbox-box,
body .ui-datatable.datatable-selecao-1pct .ui-selection-column .ui-chkbox-all .ui-chkbox-box,
body .ui-datatable.guia-recolhimento-retido-table .ui-selection-column .ui-chkbox-box,
body .ui-datatable.guia-recolhimento-retido-table .ui-selection-column .ui-chkbox-all .ui-chkbox-box,
body .ui-datatable.guia-recolhimento-nfs-table .ui-selection-column .ui-chkbox-box,
body .ui-datatable.guia-recolhimento-nfs-table .ui-selection-column .ui-chkbox-all .ui-chkbox-box {
	width: 14px !important;
	height: 14px !important;
	min-width: 14px !important;
	min-height: 14px !important;
}

/*
 * Coluna selecao com legenda (Prescrito, Termo etc.) – width numerico vira % enorme no PF15.
 */
body .ui-datatable.datatable-selecao-com-legenda > .ui-datatable-tablewrapper > table {
	table-layout: fixed !important;
	width: 100% !important;
}

body .ui-datatable.datatable-selecao-com-legenda thead th.ui-selection-column,
body .ui-datatable.datatable-selecao-com-legenda tbody td.ui-selection-column,
body .ui-datatable.datatable-selecao-com-legenda .ui-selection-column,
body .ui-datatable.datatable-selecao-com-legenda colgroup col.ui-selection-column {
	width: 12% !important;
	max-width: 12% !important;
	min-width: 0 !important;
	padding: 0 2px !important;
	box-sizing: border-box !important;
	text-align: center !important;
}

.ui-datatable.guia-recolhimento-retido-table tbody td.txt-r,
.ui-datatable.guia-recolhimento-retido-table tbody td.txt-r span,
.ui-datatable.guia-recolhimento-retido-table tbody td.txt-r label,
.ui-datatable.guia-recolhimento-nfs-table tbody td.txt-r,
.ui-datatable.guia-recolhimento-nfs-table tbody td.txt-r span,
.ui-datatable.guia-recolhimento-nfs-table tbody td.txt-r label {
	color: #333 !important;
	text-align: right !important;
}

/*
 * PF15 p:rowExpansion – tabelas internas ocupam toda a largura da linha expandida.
 * Mesmo padrao aplicado em protocolo/desif (ui-expanded-row-content).
 */
.ui-datatable .ui-expanded-row-content > td {
	width: 100% !important;
	padding: 8px 10px !important;
	overflow: visible !important;
	vertical-align: top !important;
}

.ui-datatable .ui-expanded-row-content .ui-datatable,
.ui-datatable .ui-expanded-row-content .ui-datatable.datatable-expansion-full,
.ui-datatable .ui-expanded-row-content .ui-datatable .ui-datatable-tablewrapper,
.ui-datatable .ui-expanded-row-content .ui-datatable .ui-datatable-tablewrapper > table {
	width: 100% !important;
	max-width: 100% !important;
	box-sizing: border-box !important;
}

body .ui-datatable.datatable-expansion-full > .ui-datatable-tablewrapper > table {
	table-layout: fixed !important;
	width: 100% !important;
}
