:root {
    --custom-font-size: 0.8rem;
    --bs-primary: #0d6efd;
    --cui-primary: #0d6efd;
    --cui-link-color: #0d6efd;
    --cui-link-hover-color: #0a58ca;
    --cui-primary-rgb: 13, 110, 253;

    --cui-input-group-addon-bg: #f9fbfd;
    --cui-input-group-addon-border-color: #0028641f;
    --cui-input-border-color: #0028641f;

    --cui-form-check-input-checked-bg-color: #0d6efd;
    --cui-form-check-input-checked-border-color: #0d6efd;

    --cui-sidebar-1: #3f67a4;
    --cui-sidebar-2: #084298;
    /* #303C54 */
    --cui-body-font-size: var(--custom-font-size);
    --cui-body-font-family: "Roboto";
}

body {
    background-color: #f1f4f8;
    /* font-size: 90%; */
}

.header {
    --cui-header-bg: transparent;
    --cui-header-border: transparent;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.btn {
    --cui-btn-font-size: var(--custom-font-size);
}

.btn-link {
    text-decoration: none;
}

.btn-primary {
    --cui-btn-bg: #0d6efd;
    --cui-btn-border-color: #0d6efd;
    --cui-btn-hover-bg: #0a58ca;
    --cui-btn-hover-border-color: #0a58ca;
    --cui-btn-active-bg: #0a58ca;
    --cui-btn-active-border-color: #0a58ca;
    --cui-btn-disabled-bg: #0d6efd;
    --cui-btn-disabled-border-color: #0d6efd;
}

.btn-secondary {
    --cui-btn-hover-color: #000015;
    --cui-btn-hover-bg: #aaaeb4;
    --cui-btn-hover-border-color: #9da5b1;
    --cui-btn-color: rgba(44, 56, 74, 0.95);
    --cui-btn-bg: #acb3bd;
    --cui-btn-border-color: #a7aeb9;
}

.pagination {
    --cui-pagination-bg: #fff;
    --cui-pagination-focus-bg: #0a58ca;
    --cui-pagination-active-bg: #0d6efd;
    --cui-pagination-active-border-color: #0d6efd;
    --cui-pagination-font-size: var(--custom-font-size)
}

/* Dropdown filter */
.dropdown-item:hover,
.dropdown-item:focus {
    color: #14203b;
    text-decoration: none;
    background-color: #F9FBFD;
}

.dropdown-item.active,
.dropdown-item:active {
    color: #FFFFFF;
    text-decoration: none;
    background-color: #0d6efd;
}

.dropdown-item.disabled,
.dropdown-item:disabled {
    color: #869AB8;
    pointer-events: none;
    background-color: transparent;
}

/* Datepicker and DateRangePicker */
.datepicker table tr td.active.active,
.datepicker table tr td.active.highlighted.active,
.datepicker table tr td.active.highlighted:active,
.datepicker table tr td.active:active {
    background-color: #0d6efd !important;
}

.daterangepicker .ranges li.active {
    background-color: rgba(31, 69, 219, 0.5) !important;
}

.daterangepicker td.active,
.daterangepicker td.active:hover {
    background-color: rgba(31, 69, 219, 0.5) !important;
}

.sidebar-brand {
    align-items: center;
    justify-content: center;
    flex: 0 0 var(--cui-sidebar-brand-height);
}

.sidebar {
    --cui-sidebar-brand-height: 4rem;
}

.header>.container-fluid,
.header>.container-sm,
.header>.container-md,
.header>.container-lg,
.header>.container-xl,
.header>.container-xxl,
.sidebar-header {
    min-height: calc(4rem + 1px);
}

/* Select 2 + Select 2 multiple */
.select2-container--bootstrap .select2-results__option--highlighted[aria-selected] {
    background-color: rgba(31, 69, 219, 0.5) !important;
    color: #fff !important;
}

.select2-container--bootstrap .select2-results__option[aria-selected=true] {
    background-color: #0d6efd !important;
    color: #fff !important;
}

.card,
.form-group {
    margin-bottom: 1.5rem;
}

.form-control,
.input-group-text {
    border-radius: 0.2rem;
}

.form-group>label {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.form-switch>[type="checkbox"] {
    transform: scale(1.2);
}

a.btn:hover,
li.paginate_button a {
    text-decoration: none !important;
}

/* #sidebar.bg-dark-gradient {
    background: var(--cui-sidebar-2);
    background: linear-gradient(0deg, var(--cui-sidebar-1) 0%, var(--cui-sidebar-2) 100%);
} */

#crudTable {
    background-color: #FFFFFF !important;
}

#crudTable_wrapper .dataTables_length select {
    min-width: 3.6rem;
    margin-right: 0.4rem;
}

#crudTable_wrapper #crudTable.dtr-inline.collapsed>tbody>tr>.dtr-control:before,
#crudTable_wrapper table.dataTable.dtr-inline.collapsed>tbody>tr>.dtr-control:before {
    top: 0;
}

#crudTable_wrapper #crudTable td,
#crudTable_wrapper #crudTable th,
#crudTable_wrapper table.dataTable td,
#crudTable_wrapper table.dataTable th {
    outline: none;
    vertical-align: middle;
    line-height: 1em;
}

#crudTable_wrapper #crudTable thead>tr>th:not(.sorting_disabled),
#crudTable_wrapper #crudTable thead>tr>td,
#crudTable_wrapper table.dataTable thead>tr>th:not(.sorting_disabled),
#crudTable_wrapper table.dataTable thead>tr>td {
    padding-right: 30px;
}

#crudTable_wrapper #crudTable.has-hidden-columns .details-control,
#crudTable_wrapper table.dataTable.has-hidden-columns .details-control {
    margin-left: 0.25rem;
}

#crudTable_wrapper #crudTable[data-has-bulk-actions="1"].has-hidden-columns thead tr th:first-child,
#crudTable_wrapper #crudTable[data-has-bulk-actions="1"].has-hidden-columns tfoot tr th:first-child,
#crudTable_wrapper table.dataTable[data-has-bulk-actions="1"].has-hidden-columns thead tr th:first-child,
#crudTable_wrapper table.dataTable[data-has-bulk-actions="1"].has-hidden-columns tfoot tr th:first-child {
    padding-left: 1.35rem !important;
}

#crudTable_wrapper #crudTable[data-has-bulk-actions="1"][data-has-details-row="1"] thead tr th:first-child,
#crudTable_wrapper #crudTable[data-has-bulk-actions="1"][data-has-details-row="1"] tfoot tr th:first-child,
#crudTable_wrapper table.dataTable[data-has-bulk-actions="1"][data-has-details-row="1"] thead tr th:first-child,
#crudTable_wrapper table.dataTable[data-has-bulk-actions="1"][data-has-details-row="1"] tfoot tr th:first-child {
    padding-left: 1.6rem !important;
}

#crudTable_wrapper #crudTable[data-has-bulk-actions="1"][data-has-details-row="1"].has-hidden-columns thead tr th:first-child,
#crudTable_wrapper #crudTable[data-has-bulk-actions="1"][data-has-details-row="1"].has-hidden-columns tfoot tr th:first-child,
#crudTable_wrapper table.dataTable[data-has-bulk-actions="1"][data-has-details-row="1"].has-hidden-columns thead tr th:first-child,
#crudTable_wrapper table.dataTable[data-has-bulk-actions="1"][data-has-details-row="1"].has-hidden-columns tfoot tr th:first-child {
    padding-left: 2.6rem !important;
}

#crudTable_wrapper #crudTable[data-has-bulk-actions="0"][data-has-details-row="1"] thead tr th:first-child,
#crudTable_wrapper #crudTable[data-has-bulk-actions="0"][data-has-details-row="1"] tfoot tr th:first-child,
#crudTable_wrapper #crudTable[data-has-bulk-actions="0"].has-hidden-columns thead tr th:first-child,
#crudTable_wrapper #crudTable[data-has-bulk-actions="0"].has-hidden-columns tfoot tr th:first-child,
#crudTable_wrapper table.dataTable[data-has-bulk-actions="0"][data-has-details-row="1"] thead tr th:first-child,
#crudTable_wrapper table.dataTable[data-has-bulk-actions="0"][data-has-details-row="1"] tfoot tr th:first-child,
#crudTable_wrapper table.dataTable[data-has-bulk-actions="0"].has-hidden-columns thead tr th:first-child,
#crudTable_wrapper table.dataTable[data-has-bulk-actions="0"].has-hidden-columns tfoot tr th:first-child {
    padding-left: 1.8rem !important;
}

#crudTable_wrapper #crudTable[data-has-bulk-actions="0"][data-has-details-row="1"].has-hidden-columns thead tr th:first-child,
#crudTable_wrapper #crudTable[data-has-bulk-actions="0"][data-has-details-row="1"].has-hidden-columns tfoot tr th:first-child,
#crudTable_wrapper table.dataTable[data-has-bulk-actions="0"][data-has-details-row="1"].has-hidden-columns thead tr th:first-child,
#crudTable_wrapper table.dataTable[data-has-bulk-actions="0"][data-has-details-row="1"].has-hidden-columns tfoot tr th:first-child {
    padding-left: 3rem !important;
}

#crudTable_wrapper #crudTable .details-control,
#crudTable_wrapper table.dataTable .details-control {
    display: flex;
}

#crudTable_wrapper #crudTable .crud_bulk_actions_checkbox input,
#crudTable_wrapper table.dataTable .crud_bulk_actions_checkbox input {
    width: 1rem;
    height: 1rem;
}

/* #crudTable_wrapper #crudTable:not(.has-hidden-columns) tr td:first-child,
#crudTable_wrapper table.dataTable:not(.has-hidden-columns) tr td:first-child {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
} */

#crudTable_wrapper #crudTable[data-has-bulk-actions="0"] .details-control,
#crudTable_wrapper #crudTable[data-has-bulk-actions="0"][data-has-details-row="0"] .dtr-control:before,
#crudTable_wrapper table.dataTable[data-has-bulk-actions="0"] .details-control,
#crudTable_wrapper table.dataTable[data-has-bulk-actions="0"][data-has-details-row="0"] .dtr-control:before {
    margin-right: 0.4rem !important;
}

#crudTable_wrapper #crudTable[data-responsive-table="0"] thead tr th,
#crudTable_wrapper #crudTable tr td.dataTables_empty,
#crudTable_wrapper #crudTable tr.dt-hasChild+tr td,
#crudTable_wrapper table.dataTable[data-responsive-table="0"] thead tr th,
#crudTable_wrapper table.dataTable tr td.dataTables_empty,
#crudTable_wrapper table.dataTable tr.dt-hasChild+tr td {
    display: table-cell;
}

#crudTable_wrapper .dataTables_scrollBody #crudTable[data-responsive-table="0"] tr th:first-child {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

table.dataTable.table-striped>tbody>tr:nth-of-type(2n+1):hover {
    background-color: rgba(105, 118, 239, 0.1);
}

.table-hover tbody tr:hover {
    background-color: var(--table-row-hover) !important;
}

/* Headers for operations */
.main .container-fluid h2 small {
    font-size: .5em;
    font-weight: 400;
}

form .select2.select2-container.select2-container--focus,
form .select2.select2-container.select2-container--open {
    background-color: #fff;
    border: 1px solid var(--primary, #9080f1) !important;
    box-shadow: 0 0 0 2px #e1dcfb;
    color: #495057;
    outline: 0;
    border-radius: 4px;
}

/* Create/Update Operations (Backpack forms) */

.tab-container .tab-pane {
    background-color: #fff;
    padding: 1rem;
    border: var(--cui-border-width) var(--cui-border-style) var(--cui-border-color) !important;
}

h1[bp-section=page-heading] {
    font-size: 2rem;
    line-height: 2.1rem;
}

html:not([dir=rtl]) .wrapper {
    padding-left: var(--cui-sidebar-occupy-start, 0)
}

*[dir=rtl] .wrapper {
    padding-right: var(--cui-sidebar-occupy-start, 0)
}

.alert>ul {
    margin-bottom: 0;
}

#datatable_search_stack .input-icon-addon {
    display: none;
}

/* Custom CSS */

/* link per rimozione filtri maggiormente evidenziato */
#remove_filters_button {
    background-color: red !important;
    color: white !important;
}

/* Tab del filtro attivo maggiormente evidenziato */
.navbar-filters ul li.active {
    border: 1px solid red;
}

/* Logo nella pagina di login */
.logo-login {
    width: 100%;
    max-width: 300px;
    height: auto;
}

.fs-7 {
    font-size: 0.70rem !important;
}

/* Permette ai testi lunghi di andare a capo per far rimanere la tabella nella larghezza corretta */
.invoice-table-td td {
    white-space: wrap !important;
}

/* Rimozione frecce nei campi input number */
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

.cursor-pointer {
    cursor: pointer;
}

/* Visualizzazione tabella per swal di conferma copia elemento */
.swal-table-copy table {
    width: 100%;
    border: 1px solid lightgrey;
    border-collapse: collapse;
}

.swal-table-copy th,
.swal-table-copy td {
    padding: 4px;
    border: 1px solid lightgrey;
}

.table-detail-row thead tr th {
    padding: 5px 2px !important;
}
.table-detail-row tbody tr td {
    padding: 5px 2px !important;
}