/* ========== Globali ========== */
body {
  -ms-overflow-style: scrollbar;
}

svg rect {
  pointer-events: auto;
}

/* pulsante back-to-top */
#toTopBtn {
  display: none;
  position: fixed;
  bottom: 60px;
  right: 40px;
  z-index: 99;
  width: 40px;
  height: 40px;
  text-align: center;
  padding: 6px 0 6px 0px;
  font-size: 24px;
  line-height: 0.9;
  border-radius: 20px;
}

/* larghezza container navbar e pagina */
@media (min-width: 576px) {
  .container {
    max-width: 95%; }
}
@media (min-width: 768px) {
  .container {
    max-width: 95%; }
}
@media (min-width: 992px) {
  .container {
    max-width: 95%; }
}
@media (min-width: 1200px) {
  .container {
    max-width: 95%; }
}
@media (max-width: 767.98px) {
  .navbar-expand-md>.container {
    padding-right: 15px;
    padding-left: 15px;
  }
}

/* .modal-dialog {
  max-width: calc(100% - 4rem);
  width: 1000px;
  min-width: 500px;
} */

/* hamburger menu animato - https://mdbootstrap.com/docs/jquery/navigation/hamburger-menu/ - caso 2 */
.animatedHamburger {
  width: 30px;
  height: 20px;
  position: relative;
  margin: 0px;
  -webkit-transform: rotate(0deg);
  -moz-transform: rotate(0deg);
  -o-transform: rotate(0deg);
  transform: rotate(0deg);
  -webkit-transition: .5s ease-in-out;
  -moz-transition: .5s ease-in-out;
  -o-transition: .5s ease-in-out;
  transition: .5s ease-in-out;
  cursor: pointer;
}
.animatedHamburger span {
  display: block;
  position: absolute;
  height: 2px;
  width: 100%;
  border-radius: 9px;
  opacity: 1;
  left: 0;
  -webkit-transform: rotate(0deg);
  -moz-transform: rotate(0deg);
  -o-transform: rotate(0deg);
  transform: rotate(0deg);
  -webkit-transition: .25s ease-in-out;
  -moz-transition: .25s ease-in-out;
  -o-transition: .25s ease-in-out;
  transition: .25s ease-in-out;
}
.animatedHamburger span {
background: #3369e8;
}
.animatedHamburger span:nth-child(1) {
top: 0px;
}
.animatedHamburger span:nth-child(2), .animatedHamburger span:nth-child(3) {
top: 8px;
}
.animatedHamburger span:nth-child(4) {
top: 16px;
}
.animatedHamburger.open span:nth-child(1) {
top: 11px;
width: 0%;
left: 50%;
}
.animatedHamburger.open span:nth-child(2) {
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
}
.animatedHamburger.open span:nth-child(3) {
-webkit-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
-o-transform: rotate(-45deg);
transform: rotate(-45deg);
}
.animatedHamburger.open span:nth-child(4) {
top: 11px;
width: 0%;
left: 50%;
}

.cursor_default {
  cursor: default;
}
.cursor_pointer {
  cursor: pointer;
}
.displayNone {
  display: none;
}
.displayBlock {
  display: block;
}
.fontWeight_600 {
  font-weight: 600;
}

button:focus {
  outline: none;
}
:focus {
  outline: none;
}

/* ========== Bootstrap ========== */
/* bordo Custom checkbox e radio */
.custom-control-label::before {
  border: 1px solid #d9dee8;
}

.form-control:focus {
  box-shadow: none;
}

.tooltip-inner {
  text-align: left;
}

/* ========== Spinner ========== */
#iSpinner {
  position: fixed;
  left: 0px;
  top: 0px;
  width: 100%;
  height: 100%;
  z-index: 9999;
  /* background-color: #ffffff; */
}

/* ========== DataTables ========== */
/* centratura orizzontale titoli di colonna */
.table_centerColTitle th {
  text-align: center;
}

/* centratura verticale titoli di colonna */
.table thead th {
  vertical-align: middle;
}

/* larghezza search box */
div.dataTables_wrapper div.dataTables_filter input {
  width: 180px;
}

/* cursor pointer su righe cliccabili ma non su quelle child se la tabella è responsiva */
.table_pointer tbody tr:not(.child) {
  cursor: pointer;
}

.table_pointer tbody tr {
  cursor: pointer;
}

table.dataTable tbody > tr.selected {
  background-color: #bbb;
}

div.dataTables_wrapper div.dataTables_info {
  padding-top: 0em;
}

/* colori pulsante apertura / chiusura tabella responsiva */
table.dataTable.dtr-column > tbody > tr > td.control::before, table.dataTable.dtr-column > tbody > tr > th.control::before {
  background-color: #3369e8;
}
table.dataTable.dtr-column > tbody > tr.parent td.control::before, table.dataTable.dtr-column > tbody > tr.parent th.control::before {
  background-color: #000;
}

.table thead th {
  /* vertical-align: middle; */
  border-bottom: 1px solid #dee2e6;
}

.table td, .table th {
  vertical-align: middle;
}

/* https://stackoverflow.com/questions/43679491/bootstrap-4-center-pagination-in-column */
@media screen and (max-width: 767px) {
  div.dataTables_wrapper div.dataTables_paginate ul.pagination {
    justify-content: center;
  }
}

/* pulsante es. Excel non al 100% su mobile */
/* @media screen and (max-width: 767px) {
  div.dt-buttons {
    width: 100%;
  }
} */

/* https://datatables.net/forums/discussion/55596 */
.dataTables_length .custom-select {
  background: none;
}

/* ========== Tabelle ========== */
/* larghezza colonne standard tabelle */
.table__col_width_30 {
    width: 30px;
    max-width: 30px;
}
.table__col_width_55 {
    width: 55px;
    max-width: 55px;
}
.table__col_width_70 {
    width: 70px;
    max-width: 70px;
}
.table__col_width_100 {
    width: 100px;
    max-width: 100px;
}
.table__col_width_140 {
    width: 140px;
    max-width: 140px;
}
.table__col_width_200 {
    width: 200px;
    max-width: 200px;
}
.table__col_width_280 {
    width: 280px;
    max-width: 280px;
}

/* ========== Elementi ========== */
/* password strength bar height */
/* .progress {
    height: 5px;
} */

/* Resize solo verticale per caselle di testo */
.textarea_resize_v {
    resize: vertical;
}

.tag_asset {
  color: blue;
}
.tag_asset_icon {
  background-color: blue;
  color: blue;
  border-radius: 2px;
}
.tag_muletti {
  color: orange;
}
.tag_muletti_icon {
  background-color: orange;
  color: orange;
  border-radius: 18px;
}
.tag_operatori {
  color: yellow;
}
.tag_operatori_icon {
  background-color: yellow;
  color: yellow;
  border-radius: 18px;
}

.modal-dialog {
  max-width: 700px;
}
/* ========== Classi custom per i bottoni ========== */
/* Nasconde l'input checkbox originale */
        .btn-check {
            position: absolute;
            clip: rect(0, 0, 0, 0);
            pointer-events: none;
        }

        /* Stili per il label che funge da bottone */
        .btn-check + .btn {
            cursor: pointer;
            width: 50px; /* Larghezza fissa per coerenza */
            text-align: center;
        }

        /* Stili per il bottone quando il checkbox è selezionato */
        .btn-check:checked + .btn {
            opacity: 0.8; /* Leggera opacità per indicare lo stato attivo */
            box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); /* Effetto premuto */
        }

        /* --- Definizione delle classi custom per i bottoni arancione e viola --- */

        /* Bottone Arancione (Stato Iniziale Outline) */
        .btn-outline-orange {
            color: #fd7e14; /* Colore testo */
            border-color: #fd7e14; /* Colore bordo */
        }
        /* Bottone Arancione (Stato Checked) */
        .btn-check:checked + .btn-outline-orange {
            background-color: #fd7e14;
            border-color: #fd7e14;
            color: #fff; /* Testo bianco quando selezionato */
        }
        .btn-outline-orange:hover {
            background-color: #fd7e14;
            border-color: #fd7e14;
            color: #fff;
        }
        .btn-outline-orange:focus,
        .btn-outline-orange:active {
            box-shadow: 0 0 0 0.25rem rgba(253, 126, 20, 0.5); /* Effetto focus/attivo */
        }


        /* Bottone Viola (Stato Iniziale Outline) */
        .btn-outline-purple {
            color: #6f42c1; /* Colore testo */
            border-color: #6f42c1; /* Colore bordo */
        }
        /* Bottone Viola (Stato Checked) */
        .btn-check:checked + .btn-outline-purple {
            background-color: #6f42c1;
            border-color: #6f42c1;
            color: #fff; /* Testo bianco quando selezionato */
        }
        .btn-outline-purple:hover {
            background-color: #6f42c1;
            border-color: #6f42c1;
            color: #fff;
        }
        .btn-outline-purple:focus,
        .btn-outline-purple:active {
            box-shadow: 0 0 0 0.25rem rgba(111, 66, 193, 0.5); /* Effetto focus/attivo */
        }

        /* --- Fine Definizione classi custom --- */

        /* Colori per i bottoni standard di Bootstrap (Green, Yellow, Red) */
        .btn-check:checked + .btn-outline-success {
            background-color: #198754;
            border-color: #198754;
            color: #fff;
        }
        .btn-check:checked + .btn-outline-warning {
            background-color: #ffc107;
            border-color: #ffc107;
            /*color: #212529;  Testo scuro per contrasto */
            color: #fff;
        }
        .btn-check:checked + .btn-outline-danger {
            background-color: #dc3545;
            border-color: #dc3545;
            color: #fff;
        }