
/*** DataTables - Start ***/
#divGridAuto {
	text-align: left;
	/* display: none; /* per evitare visualizzazioni temporanee mal formattate della tabella, viene annullato nello script datatable_resize() */
}


#gridElenco thead th {
    border-right: 1px solid #dee2e6;
}

#gridElenco thead th:last-child {
    border-right: none; /* rimuove il bordo dopo l'ultima colonna */
}

table.dataTable td {
	white-space: nowrap;
	padding-top: 5px !important;
	padding-bottom: 5px !important;
}

table.dataTable thead tr td {
	line-height: 20px;
}

table.dataTable thead tr td .btn-sm{
    padding-right: 12px;
    padding-left: 12px;
    padding-top: 6px;
    padding-bottom: 6px;
}

/* Da adattare con la classe reale, ispeziona il DOM generato */
.dtcc-searchList::before {
	content: 'Filtra: ';
	font-size: 0.75rem;
	color: #6c757d;
	margin-right: 4px;
}

table.dataTable.stripe>tbody>tr.odd>*, table.dataTable.display>tbody>tr.odd>* {
	box-shadow: inset 0 0 0 9999px rgb(0 0 0/ 5%);
}

table.dataTable.stripe>tbody>tr:hover>*, table.dataTable.display>tbody>tr:hover>* {
	box-shadow: inset 0 0 0 9999px rgb(0 0 0/ 10%);
}

div.dt-container div.dt-layout-row div.dt-layout-cell.dt-layout-start {
	flex-grow: 1;
	margin-right: 8px;
}

div.dt-container div.dt-layout-row:first-child {
	margin: 0;
}

div.dt-container div.dt-layout-row div.dt-layout-cell.dt-layout-end {
	flex-grow: 0;
	width: auto;
}

div.dt-container .dt-search {
	width: 100%;
	display: flex;
}

div.dt-container .dt-search input {
	flex-grow: 1;
	width: 100%;
    border-color: var(--alma-primary) !important;
	color: var(--alma-primary) !important;
}

label[for=dt-search-0] {
	display: none;
}

.visually-hidden-undo, .dtcc-button-text .visually-hidden, .dtrg-group .visually-hidden {
	position: static !important;
	width: auto !important;
	height: auto !important;
	padding: 0 !important;
	margin: 0 !important;
	overflow: visible !important;
	clip: auto !important;
	color: var(--alma-primary);
	margin-left: 8px !important;
}


.dtcc-list-buttons .dtcc-button .justify-content-center{
	justify-content: left !important;
}

div.dtcc-dropdown {
	width: fit-content;
}

.dtcc-rowGroup::before {
	content: 'Raggruppa: ';
	font-size: 0.75rem;
	color: #6c757d;
	margin-right: 4px;
}

table.dataTable span.dtcc button.dtcc-button_active span.dtcc-button-icon {
	color: orange;
}

table.dataTable>thead>tr>th, table.dataTable>thead>tr>td {
	border-bottom: none;
	padding: 0px 10px !important;
	border-right: 1px solid var(--alma-primary);
	border-left: 1px solid var(--alma-primary);
}

table.dataTable>thead>tr>th:first-child, 
table.dataTable>thead>tr>td:first-child {
	border-left: none !important;
}

table.dataTable>thead>tr>th:last-child, 
table.dataTable>thead>tr>td:last-child {
	border-right: none !important;
}

/* Rimuove i bordi e il padding se lo span del titolo è vuoto */
table.dataTable>thead>tr:first-child>th:has(span.dt-column-title:empty), 
table.dataTable>thead>tr:first-child>td:has(span.dt-column-title:empty), 
table.dataTable>thead>tr>th:has(.dt-column-header>span.dt-column-title:empty:only-child), 
table.dataTable>thead>tr>td:has(.dt-column-header>span.dt-column-title:empty:only-child) {
	border-left: none;
	border-right: none;
	padding: 0 !important;
}
table.dataTable>thead>tr:first-child>th.select-checkbox {
	border-left: none;
	border-right: none;
	padding: 0 4px !important;
	vertical-align: middle !important;
}

table.dataTable div.dt-column-header span.dt-column-title:empty+span.dtcc {
	justify-content: center;
}

table.dataTable thead>tr>th div.dt-column-header {
	align-items: start;
	line-height: 22px;
}

.dt-scroll-head {
	margin: 5px auto;
}

.dt-info, div.dt-container .dt-paging .dt-paging-button, div.dt-container select.dt-input, label[for=dt-length-0] {
	width: max-content;
	height: 1.9rem;
	line-height: 1.9rem;
	padding: 0px 1em;
    font-size: 0.95rem;
	color: var(--alma-primary) !important;
}

div.dt-container .dt-paging .dt-paging-button.first,
div.dt-container .dt-paging .dt-paging-button.previous,
div.dt-container .dt-paging .dt-paging-button.next,
div.dt-container .dt-paging .dt-paging-button.last {
    padding: 0px 8px !important;
}

div.dt-container .dt-paging .dt-paging-button.first:active,
div.dt-container .dt-paging .dt-paging-button.previous:active,
div.dt-container .dt-paging .dt-paging-button.next:active,
div.dt-container .dt-paging .dt-paging-button.last:active {
    background: transparent !important;
}

select#dt-length-0 {
	margin-top: -3px;
	vertical-align: middle;
}

div.dt-container .dt-paging .dt-paging-button.current, div.dt-container .dt-paging .dt-paging-button.current:hover {
	color: var(--alma-primary) !important;
    border: 1.5px solid var(--alma-primary) !important;
}
div.dt-container .dt-paging .dt-paging-button:hover {
	color: var(--alma-primary) !important;
	background: var(--alma-lightCian);
}

/* processing - START */
div.dt-processing, .dataTables_processing {
	color: var(--alma-primary) !important;
	border: 1px solid var(--alma-primary);
	border-radius: 4px;
	padding: 0.75rem 1.4rem;
	box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, .075);	
	width: fit-content;   
	opacity: 0.8;
    background-color: white;        
    margin-top: 0px; 
	margin-left: 0px;
	position: fixed;
    transform: translate(-50%, -50%);
}

div.dt-processing>div:last-child {
    margin: 1em auto 0.5em auto;
}

div.dt-processing>div:last-child>div {
	background: var(--alma-secondary);
}

/* processing - END */

div.dt-container.dt-empty-footer .dt-scroll-body {
    border-bottom: 0px solid rgba(0, 0, 0, 0.3);
	/*border-bottom: 1px solid rgba(0, 0, 0, 0.3);*/
    /*border-top: 1px solid rgba(0, 0, 0, 0.3);*/
}

/*** DataTables - End ***/

/*** icone su elenco - Start ***/
img.icon-16x16, td .icon {
	width: 16px;
	height: 16px;
}

div.dts div.dt-scroll-body {
	background: none;
}

div.dt-button-collection {
	width: fit-content;
}

div.dt-button-collection .dt-button-active:after {
	position: relative !important;
	margin-top: 0px;
	margin-left: 15px;
	right: unset;
}

table.dataTable tbody tr.selected>* {
	box-shadow: inset 0 0 0 9999px var(--alma-lightCian) !important;
	color: inherit;
	font-weight: 600;
}

table.dataTable>tbody>tr.child span.dtr-title {
	font-size: 16px;
}

.webkit-fill-available{	
	width: -webkit-fill-available;
}

/*** icone su elenco - Stop ***/

/*** elenco - tree - Start ***/
table.dataTable tr.dtrg-group td {
	background-color: transparent;
	color: var(--alma-primary);
}


tr.dtrg-group .justify-content-center {
	justify-content: left !important;	
}


table.dataTable tr.dtrg-group td::after {
	content: "";
	width: 2rem;
	height: 1.3rem;
	position: absolute;
	background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-caret-down" viewBox="0 0 16 16"><path d="M3.204 5h9.592L8 10.481zm-.753.659 4.796 5.48a1 1 0 0 0 1.506 0l4.796-5.48c.566-.647.106-1.659-.753-1.659H3.204a1 1 0 0 0-.753 1.659"/></svg>');
	background-repeat: no-repeat;
	background-size: 1rem 1rem;
	background-position: center center;
}

table.dataTable tr.dtrg-group:not(.collapsed) td::after {
	transform: rotate(180deg);
}
/*** elenco - tree - Stop ***/

/* checkbox - Start */
table.dataTable th.select-checkbox input[type=checkbox], table.dataTable tbody input[type=checkbox], table.dataTable tbody td.select-checkbox:before, table.dataTable tbody td.select-checkbox:after, table.dataTable tbody th.select-checkbox:before, table.dataTable tbody th.select-checkbox:after {
	height: 20px !important;
	width: 20px !important;
	border: solid 1px var(--alma-mediumGray) !important;
	margin: auto;
	font-size: 1rem !important;
	line-height: 1.2rem !important;
	transform: translate(-49%, -25%);
}

table.dataTable tbody input[type=checkbox] {
	transform: none !important;
	vertical-align: middle;
}

table.dataTable thead th .form-check {
	min-height: 20px;
    margin-right: 5px;
    margin-left: 5px;
}

table.dataTable thead th .form-check [type=checkbox]+label {
	height: 20px;
	width: 20px;
	padding: 0 !important;
}

table.dataTable th.select-checkbox .form-check [type=checkbox]+label::after {
	margin: auto !important;
}

table.dataTable th.select-checkbox .form-check [type=checkbox]:checked+label::before {
	width: 17px;
	margin: auto !important;
	content: '\2713';
	transform: none;
	border: none;
	top: -50%;
	opacity: 1;
	color: white !important;
	text-shadow: var(--alma-primary) -0.4px -0.4px, var(--alma-primary) -0.8px -0.8px;
}

table.dataTable tr.selected td.select-checkbox:after, table.dataTable tr.selected th.select-checkbox:after {
	font-size: 1rem !important;
	margin: auto;
	margin-top: -6px !important;
	border: solid 1px transparent !important;
	border-radius: 4px;
	color: var(--alma-primary);
	text-shadow: var(--alma-primary) -0.4px -0.4px, var(--alma-primary) -0.8px -0.8px;
}


table.dataTable>tbody>tr>td.select-checkbox:before, table.dataTable>tbody>tr>th.select-checkbox:before {
    margin-left: auto !important; 
}
/* checkbox - end*/

/* formattazione celle per editazione - START */
.custom-cell {
	min-width: 50px;
	padding: 2px 2px !important;
}

table.dataTable td.focus {
	outline: 1px solid var(--alma-darkRed);
	outline-offset: -3px;
	background-color: var(--alma-lightPink) !important;
	padding-left: 0px;
	padding-right: 0px;
	padding-top: 0px !important;
	padding-bottom: 0px !important;
}

div.DTE_Field_Type_select div.DTE_Field_Input {
	padding-top: 0px !important;
	margin-top: -1px;
	margin-bottom: -1px;
}

div.DTE_Inline div.DTE_Inline_Field div.DTE_Field input[type=text], div.DTE_Inline div.DTE_Inline_Field div.DTE_Field input[type=number] {
	padding: 2px 2px !important;
	height: 29px !important;
}

div.DTE_Inline div.DTE_Field_Error {
	padding-top: 8px;
}

div.DTE_Field select {
	padding: 0px 1px !important;
}

div.DTE_Inline .DTE_Field_InputControl, div.DTE_Inline div.DTE_Field_Error, div.DTE_Inline div.DTE_Form_Error {
	padding-left: 2px !important;
	padding-right: 2px !important;
	margin-top: 4px !important;
	margin-bottom: 4px !important;
}

div.DTE_Inline .DTE_Field_Type_datetime .DTE_Field_Input .DTE_Field_InputControl .focus--mouse {
	border-color: transparent !important;
}

div.dtk-focus-alt table.dataTable tbody th.focus, div.dtk-focus-alt table.dataTable tbody td.focus {
	border-radius: 4px;
}

div.dte-dropdown {
	width: auto !important;
}

/* formattazione celle per editazione - END */



/* Icona  search column control sotto menu paghe - START */
table.dataTable span.dtcc div.dtcc-searchText>div div.dtcc-search-type-icon {
    z-index: 0 !important;
}
/* Icona  search column control sotto menu paghe - END */


/* Forzatura autowidth (con datatable_autoNarrowColumns in datables.js) - START */
/* Annulla i min-width e le width fisse generate nel colgroup da DataTables */
table.dataTable colgroup col {
    min-width: 0 !important;
}

table.dataTable col.dt-auto-narrow {
    width: 1% !important;
}

table.dataTable th.dt-auto-narrow,
table.dataTable td.dt-auto-narrow{
    width: 1% !important;
    white-space: nowrap;
}

/* Forzatura autowidth (con datatable_autoNarrowColumns in datables.js) - END */

/* Seleziona il div con tooltip all'interno del td specifico */
td.dt-body-center.text-center.dt-type-numeric div[data-bs-toggle="tooltip"].d-flex {
    justify-content: center !important;
    text-align: center !important;
}


/* Layout - START */
div.dt-container div.dt-layout-row:not(.dt-layout-table) {
    display: flex !important;
    background-color: var(--alma-lightGray);
    margin: .2em 0;
    padding: .3em 0;
}

/* Se entrambe le celle sono vuote, rendi il background della riga transparent o inherit */
/* Seleziona la riga quando le celle interne non hanno contenuto utile */
.dt-layout-row:has(.dt-layout-start:empty):has(.dt-layout-end:empty),
.dt-layout-row:has(.dt-layout-start:empty):has(.dt-layout-end > .dt-buttons:empty) {
    background: transparent !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
}

div.dt-container div.dt-layout-row:not(.dt-layout-table) div.dt-layout-cell.dt-layout-start {
    margin-right: 8px !important;
}
/* Layout - END */

/* Button - START */
.pulsanteExcel-filterBar, .pulsantePdf-filterBar, .pulsanteCopy-filterBar, .pulsanteNew-filterBar, .pulsanteEdit-filterBar, .pulsanteCancel-filterBar {
	height: 2.25rem !important;
	width: 2.25rem !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
	background-size: 1.6rem !important;
	margin: 0px !important;
	border-radius: 4px !important;
	box-shadow: inset 0 0 0 1px var(--alma-primary);
}

.pulsante-filterBar {
	height: 2.25rem !important;
	margin: 0px !important;
	font-size: 16px !important;
}

.pulsanteExcel-filterBar span, .pulsantePdf-filterBar span, .pulsanteCopy-filterBar span, .pulsanteNew-filterBar span, .pulsanteEdit-filterBar span, .pulsanteCancel-filterBar span {
	display: none;
}

.pulsanteExcel-filterBar {
	background-image:
		url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%230f416f" class="bi bi-filetype-xlsx" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M14 4.5V11h-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM7.86 14.841a1.13 1.13 0 0 0 .401.823q.195.162.479.252.284.091.665.091.507 0 .858-.158.355-.158.54-.44a1.17 1.17 0 0 0 .187-.656q0-.336-.135-.56a1 1 0 0 0-.375-.357 2 2 0 0 0-.565-.21l-.621-.144a1 1 0 0 1-.405-.176.37.37 0 0 1-.143-.299q0-.234.184-.384.188-.152.513-.152.214 0 .37.068a.6.6 0 0 1 .245.181.56.56 0 0 1 .12.258h.75a1.1 1.1 0 0 0-.199-.566 1.2 1.2 0 0 0-.5-.41 1.8 1.8 0 0 0-.78-.152q-.44 0-.777.15-.336.149-.527.421-.19.273-.19.639 0 .302.123.524t.351.367q.229.143.54.213l.618.144q.31.073.462.193a.39.39 0 0 1 .153.326.5.5 0 0 1-.085.29.56.56 0 0 1-.255.193q-.168.07-.413.07-.176 0-.32-.04a.8.8 0 0 1-.249-.115.58.58 0 0 1-.255-.384zm-3.726-2.909h.893l-1.274 2.007 1.254 1.992h-.908l-.85-1.415h-.035l-.853 1.415H1.5l1.24-2.016-1.228-1.983h.931l.832 1.438h.036zm1.923 3.325h1.697v.674H5.266v-3.999h.791zm7.636-3.325h.893l-1.274 2.007 1.254 1.992h-.908l-.85-1.415h-.035l-.853 1.415h-.861l1.24-2.016-1.228-1.983h.931l.832 1.438h.036z"/></svg>')
		!important;
}

.pulsantePdf-filterBar {
	background-image:
		url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%230f416f" class="bi bi-filetype-pdf" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM1.6 11.85H0v3.999h.791v-1.342h.803q.43 0 .732-.173.305-.175.463-.474a1.4 1.4 0 0 0 .161-.677q0-.375-.158-.677a1.2 1.2 0 0 0-.46-.477q-.3-.18-.732-.179m.545 1.333a.8.8 0 0 1-.085.38.57.57 0 0 1-.238.241.8.8 0 0 1-.375.082H.788V12.48h.66q.327 0 .512.181.185.183.185.522m1.217-1.333v3.999h1.46q.602 0 .998-.237a1.45 1.45 0 0 0 .595-.689q.196-.45.196-1.084 0-.63-.196-1.075a1.43 1.43 0 0 0-.589-.68q-.396-.234-1.005-.234zm.791.645h.563q.371 0 .609.152a.9.9 0 0 1 .354.454q.118.302.118.753a2.3 2.3 0 0 1-.068.592 1.1 1.1 0 0 1-.196.422.8.8 0 0 1-.334.252 1.3 1.3 0 0 1-.483.082h-.563zm3.743 1.763v1.591h-.79V11.85h2.548v.653H7.896v1.117h1.606v.638z"/></svg>')
		!important;
}

.pulsanteCopy-filterBar {
	background-image:
		url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%230f416f" class="bi bi-copy color-blue" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M4 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm2-1a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1zM2 5a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1v-1h1v1a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h1v1z"/></svg>')
		!important;
}

.pulsanteNew-filterBar {
	background-image:
		url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%230f416f" class="bi bi-file-plus" viewBox="0 0 16 16"><path d="M8.5 6a.5.5 0 0 0-1 0v1.5H6a.5.5 0 0 0 0 1h1.5V10a.5.5 0 0 0 1 0V8.5H10a.5.5 0 0 0 0-1H8.5z"/><path d="M2 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2zm10-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1"/></svg>')
		!important;
}

.pulsanteEdit-filterBar {
	background-image:
		url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%230f416f" class="bi bi-pencil" viewBox="0 0 16 16"><path d="M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325"/></svg>')
		!important;
}

.pulsanteCancel-filterBar {
	background-image:
		url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%230f416f" class="bi bi-trash" viewBox="0 0 16 16"><path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/><path d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/></svg>')
		!important;
}

/* Button - END */

