 /* ============================================
        CONFIGURAZIONE MODAL CON HEADER FISSO
        ============================================ */

     /* Modal Dialog - Struttura principale */
 .modal-dialog {
     display: flex;
     flex-direction: column;
     max-height: 90vh; /* Altezza massima 90% viewport */
     margin: 30px auto;
 }

/* Modal Content - Container principale */
.modal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: calc(90vh - 60px);
    overflow: hidden;
}

/* Modal Header - Sempre fisso in alto */
.modal-header {
    position: sticky;
    top: 0;
    z-index: 1050;
    background-color: #fff;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}


 .card i {
     padding: 0px 5px;
 }

 .modal_header {
     padding: 0px 15px;
 }

/* Modal Body - Scrollabile */
.modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 15px;
    position: relative;
}


/* Se la toolbar è il primo elemento del body */
.modal-body > :first-child[class*="toolbar"] {
    top: -15px; /* Compensa il padding del modal-body */
}

/* Modal Footer (se presente) */
.modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 1040;
    background-color: #fff;
    border-top: 1px solid #dee2e6;
    flex-shrink: 0;
    padding: 15px;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.05);
}

/* ============================================
   SUPPORTO PER MODAL GRANDI
   ============================================ */

/* Modal Large */
.modal-lg .modal-dialog {
    max-width: 90%;
    max-height: 90vh;
}

/* Modal Extra Large (Bootstrap 4+) */
.modal-xl .modal-dialog {
    max-width: 95%;
    max-height: 95vh;
}

/* Modal Fullscreen (Bootstrap 5) */
.modal-fullscreen .modal-dialog {
    max-width: 100%;
    max-height: 100vh;
    margin: 0;
}

.modal-fullscreen .modal-content {
    max-height: 100vh;
    border-radius: 0;
}

/* ============================================
   MIGLIORAMENTI SCROLL E PERFORMANCE
   ============================================ */

/* Scrollbar personalizzata per modal-body */
.modal-body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Firefox scrollbar */
.modal-body {
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

/* ============================================
   GESTIONE CONTENUTI NESTED
   ============================================ */

/* Se hai tabelle o contenuti scrollabili dentro il modal */
.modal-body .table-responsive,
.modal-body .overflow-auto {
    max-height: 400px;
    overflow-y: auto;
}

/* Previeni doppio scroll */
.modal-body .table-responsive::-webkit-scrollbar {
    width: 6px;
}

/* ============================================
   ANIMAZIONI E TRANSIZIONI
   ============================================ */

/* Transizione smooth per sticky elements */
.modal-header,
.modal-footer,
.modal-body [class*="-toolbar"] {
    transition: box-shadow 0.3s ease;
}

/* Effetto elevazione quando si scrolla */
.modal-body:not(:first-child) {
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    padding-top:0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet e dispositivi medi */
@media (max-width: 768px) {
    .modal-dialog {
        max-height: 100vh;
        margin: 0;
    }

    .modal-content {
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-body {
        padding: 10px;
    }
}

/* Smartphone */
@media (max-width: 576px) {
    .modal-header {
        padding: 10px;
    }

    .modal-header .modal-title {
        font-size: 1.1rem;
    }

    .modal-body [class*="-toolbar"] {
        padding: 8px 10px;
    }

    .modal-body [class*="-toolbar"] .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* ============================================
   UTILITY CLASSES OPZIONALI
   ============================================ */

/* Per modal senza padding nel body */
.modal-no-padding .modal-body {
    padding: 0;
}

/* Per modal con body non scrollabile */
.modal-no-scroll .modal-body {
    overflow: hidden;
}

/* Per toolbar sempre visibile anche senza scroll */
.modal-sticky-toolbar [class*="-toolbar"] {
    position: sticky !important;
    top: 0 !important;
}

/* Per disabilitare lo sticky header */
.modal-no-sticky .modal-header {
    position: relative;
}

/* ============================================
   FIX PER COMPATIBILITÀ
   ============================================ */

/* Bootstrap 3 compatibility */
.modal-open .modal {
    overflow-x: hidden;
    overflow-y: auto;
}

/* Fix per z-index conflicts */
.modal {
    z-index: 1050;
}

.modal-backdrop {
    z-index: 1040;
}

/* Fix per modal dentro modal (sconsigliato ma a volte necessario) */
.modal .modal {
    z-index: 1060;
}

.modal .modal-backdrop {
    z-index: 1055;
}

/* ============================================
   STILI SPECIFICI PER TOOLBAR COMUNE
   ============================================ */

/* Toolbar generica con pulsanti azioni */
.modal-action-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 10px 15px;
    margin: -15px -15px 15px -15px;
    position: sticky;
    top: 0;
    z-index: 1040;
}

.modal-action-toolbar .toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-action-toolbar .toolbar-right {
    display: flex;
    align-items: center;
    gap: 5px;
}

.modal-action-toolbar .btn {
    white-space: nowrap;
}

/* Indicatore modifiche non salvate */
.modal-unsaved-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
    color: #856404;
    background-color: #fff3cd;
    padding: 4px 10px;
    border-radius: 4px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}



/* Allineamenti base */
.content-phoenix table thead th, table tbody td {
 vertical-align: middle;
    /* text-align: center;*/
}

.table-container li {
    text-decoration: none;
    list-style-type: none;
}

/* Colonne specifiche */
.col-note {
    text-align: left;
    min-width: 150px;
}
.col-registro {
    text-align: left;
    min-width: 100px;
    max-width: 400px;
}
.col-analisi {
    text-align: center;
    min-width: 80px;
    max-width: 400px;
}
.col-analisi-add {
    text-align: center;
    min-width: 40px;
    max-width: 40px;
}
.col-minima {
    text-align: left;
    max-width: 150px;
    min-width: 100px;
    white-space: normal !important;
}
.col-minima > .th-inner {
    z-index: 90!important;
    white-space: normal !important;
}

/* Contenitori */
.table-container,
.table-responsive,
.bootstrap-table {
    overflow: visible !important;
}

/* Select2 dropdown fix */
.select2-container {
    z-index: 1050 !important;
}
.select2-dropdown {
    z-index: 1060 !important;
}
.edit-select {
    z-index: 1050 !important;
    position: relative;
}

/* Scroll orizzontale */
.scroll-wrapper {
    overflow-x: auto;
    width: 100%;
}

/* Altezza massima tabella + scroll verticale */
.fixed-table-container .fixed-table-body {
    max-height: 500px; /* Sarà sovrascritto da JS */
    overflow-y: auto !important;
}
.fixed-table-container {
    border: 1px solid #dee2e6;
}

/* Sticky HEADER */
.table-container table thead th {
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: #f0f0f0;
    border-bottom: 2px solid #ddd;
}

/* Celle del corpo */
.table-container table td {
    z-index: 1;
    background-color: white;
}

/* Sticky colonna: CODICE VASCA */
.table-container table th[data-field="codice_vasca"],
.table-container table th[data-field="nome"] {
    position: sticky;
    z-index: 100!important;
    left: 0;
    background-color: #f0f0f0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.table-container table td:nth-child(2) {
    position: sticky;
    z-index: 95!important;
    left: 0;
    background-color: #f0f0f0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}


/* Sticky colonna: checkbox (prima colonna) */
.table-container table th:first-child,
.table-container table td:first-child {
    position: sticky;
    left: 0;
    background-color: #f0f0f0;
}

/* Checkbox stile personalizzato */
.bs-checkbox2[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 3px;
    background-color: #f0f0f0;
    cursor: pointer;
    position: relative;
}
.bs-checkbox2[type="checkbox"]:checked {
    background-color: #b0b0b0;
    border-color: #989898;
}
.bs-checkbox2[type="checkbox"]:checked::before {
    content: '✔';
    color: white;
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

input.bs-checkbox2 {
    /* text-align: center; */
    margin: 0 auto;
    /* width: auto; */
    display: block;
}



/* Sticky colonna: CODICE VASCA */
.table-container2 table th[data-field="codice_vasca"],
.table-container2 table th[data-field="nome"] {
    position: sticky;
    z-index: 100!important;
    left: 0;
    background-color: #f0f0f0;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}


/* Sticky colonna: checkbox (prima colonna) */
table#tabella_statistica th {
    position: sticky;
    left: 0;
    text-align:center;
    background-color: #f0f0f0;
}

table.table.table-bordered.table-hover th {
    background-color: #f0f0f0;
    text-align: center;
}

#result_statistiche table.table.table-bordered.table-hover td {
    font-size: 1em;
}

#result_statistiche table.table.table-bordered.table-hover th {
    font-size: 1.3em;
}
.table-container2 > table.table.table-bordered.table-hover th {
    font-size: 1.3em;
}








span.badge.badge-in-lavorazione {
    background: #ffbc00;
}
span.badge.badge-finito {
    background: green;
    color: white;
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgb(255 255 255 / 80%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000000 !important;
}
tr#titolo-tabella th {
    background: #007bff;
    color: white;
}

span.badge.badge-da-fare {
    background: #ff4545;
    color: black;
}

h1.main_title {
    display: none;
}

span.badge.badge-ordinato {
    background: violet;
}
span.badge.badge-fatturato {
    background: #0dd72f;
}
thead.thead-dark td {
    min-width: 120px;
}
thead th {
    vertical-align: middle; /* Allinea verticalmente il testo al centro */
    text-align: center;    /* Centra orizzontalmente il contenuto (opzionale) */
    padding: 10px;         /* (Opzionale) Aggiunge un po' di spazio interno */
}
.bootstrap-table .fixed-table-container .table thead th .th-inner {
    /* padding: .75rem; */
    /* vertical-align: bottom; */
    /* overflow: hidden; */
    /* text-overflow: ellipsis; */
}

table.cart th, #main-content table.cart th, table.cart td, #main-content table.cart td, table.cart tr, #main-content table.cart tr, #content-area table tr, #content-area table td, #content-area table th {
    padding: 5px;
}

.bootstrap-table .fixed-table-container .table thead th .th-inner {
    padding: 0;
    vertical-align: bottom;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) { /* Adatta il valore a seconda delle esigenze */
    .bs-bars.float-left {
        overflow-x: auto;
        white-space: nowrap;
        display: block;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-tabs .nav-link {
        padding: 10px;
        font-size: 0; /* Nasconde il testo */
    }

    .nav-tabs .nav-link i {
        font-size: 20px; /* Dimensione icona */
        margin-right: 0; /* Evita spazi inutili */
    }
}

.bootstrap-table .fixed-table-container .table thead th .th-inner {
    padding: 0;
    vertical-align: bottom;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


div#wpbody {
    overflow: hidden;
}
select#year_document {
    min-width: 70px;
}

@media screen and (max-width: 782px)  {
    .main-module{
        margin-top:0px!important;
    }
}

.modal {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    width: auto;
    margin: 0;
}
a.icon i {
    font-size: 2em;
    padding: 0px 2px;
    color: #8b8b8b;
}

.modal-dialog.modal-xxl {
    max-width: 95%; /* Puoi aumentare fino a 100% */
    max-width: 1500px;
}

.dropdown.bootstrap-select.dropup {
    width: 100%;
}
.notice-warning {
    display: none;
}

.oragnizza_lavoro{
    padding: 6px;
    background: radial-gradient(black, transparent);
    background: #1989c8;
    color: white;
    border-radius: 3px;
}

.page-header.header-phoenix i {
    float: left;
    font-size: 40px;
    padding-right: 15px;
    display: block;
    clear: both;
    overflow: auto;
}
.page-header.header-phoenix h3 {
    line-height: 2em;
    margin-top: 0;
    float:left;
}
.logo_tatech_header {
    float: right;
}
.header-phoenix{
    display: block;
    margin-top: 10px!important;
    margin-bottom: 10px!important;
    overflow: auto;
}
.row.page-title-header {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* DOCUMENTO */

table#myTable tr {
    padding: 0;
    margin: 0;
}

table#myTable td {
    margin: 0;
    padding: 0;
    text-align:center;
}


@media(max-width: 1000px) {
    div#adminmenumain {
        display: none;
    }
    nav.navbar.sticky-top.navbar-light.bg-light {
        padding: 0;
        margin: 0;
        padding-top: 27px;
    }
    div#wpcontent {
        margin: 0;
    }

}
input[type=date], input[type=datetime-local], input[type=datetime], input[type=email], input[type=month], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=time], input[type=url], input[type=week] {
    border-right: 0;
    border-top: 0;
    padding: 0 8px;
    line-height: 2;
    min-height: 38px;
    border-radius: 0;
    /* border-color: #d2d2d2; */
    border: 1px solid #e2e2e2;
}

.form-row.align-items-center.container-fluid {
    background: #f2f2f2;
}

.nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active {
    color: #ffffff;
    background-color: #c91929;
    border-color: #dee2e6 #dee2e6 #fff;
}
.form-group > label {
    clear: both;
    width: 100%;
}
button.btn.dropdown-toggle.btn-light {
    background: white;
    box-shadow: 0 0 0 transparent;
    border-radius: 4px;
    border: 1px solid #8c8f94;
    background-color: #fff;
    color: #2c3338;
}
.title_row td {
    font-size: 13px;
    line-height: 1em;
}

.bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn) {
    width: auto;
    max-width:100%;
}
tr.title_row {
    background: #d5d5d5;
}

.live_search{
    position: absolute;
    background: red;
    margin-top: 43px;
    z-index: 10000;
}
table#myTable button {
    border: none!important;
}
.table-responsive {
    display: block;
    overflow-x: auto;
    overflow: scroll;
    -webkit-overflow-scrolling: touch;
}

select.form-select {
    padding: 0 8px;
    line-height: 2;
    min-height: 38px;
}
div#result_module {
    margin: 0;
}
input#upload_image {
    max-width: 100%;
}
div#nav-tabContent {
    padding-top: 20px;
}

.fc-header-toolbar.fc-toolbar.fc-toolbar-ltr {
    font-size: 14px;
}

.horizzontal-scroll{
    /* background-color: #333; */
    overflow: auto;
    white-space: nowrap;
}

.horizzontal-scroll > div, horizzontal-scroll > i, horizzontal-scroll > a {
    display: inline-block;
    color: white;
    text-align: center;
    padding: 14px;
    text-decoration: none;
}

div#calendar_week {
    overflow: scroll;
}
.badge-bozza{
    background-color: #c7e1ec;
    border: #c7e1ec;
}

.badge-da-ordinare{
    background-color: #40a8c2;
    border: #40a8c2;
    color:white;
}

.badge-ordinato{
    background-color: #fee151;
    border: #fee151;
}

.badge-in-lavorazione{
    background-color: #fb9040;
    border: #fb9040;
    color:white;
}

nav#nat_top {
    overflow: hidden;
    /* background-color: #333; */
    position: fixed;
    top: 0;
    width: 100%;
    display: block;
    background: red;
    z-index: 20;
}

.main-module {
   margin-top:50px;
}

.badge-finito-da-fatturare{
    background-color: #a8cc4f;
    border: #a8cc4f;
    color:white;
}

.badge-fatturato-finito{
    background-color: #6dbd4f;
    border: #6dbd4f;
    color:white;
}

.container.horizzontal-scroll {
    overflow: visible;
}

.badge-annullato{
    background-color: #000000;
    border: #000000;
    color:white;
}

span.badge.badge-bozza {
    background: #fff700;
}
li.nav-item {
    margin: 0!important;
}

.input-group-prepend > span {
    color: black;
    min-width: 115px;
    font-size: 0.7em;
    padding: 6px;
    margin: 0;
    font-weight: bold;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid #e2e2e2;
    background: #f9f9f9;
}

/* IPAD MODIFICHE BOOTSTRAP */
@media only screen and (max-width: 1190px){
    .col-md-4, .col-md-8 {
        max-width:100%!important;
        flex:auto!important;
    }
}

#organizzazione_lavoro_documento {

}

div#add-edit {
    box-shadow: -7px 0 30px #363636ba;
}
.bg-light {
    background-color: white!important;
}

div#col-add-edit {
    padding: 0;
}

table#myTable thead tr {
    background: #c3c3c3;
}

div#col-add-edit {
    /* text-align: center; */
    margin: 0 auto;
}
.main-module {
}




#calendar {
    max-width: 1100px;
    margin: 40px auto;
}

/*
i wish this required CSS was better documented :(
https://github.com/FezVrasta/popper.js/issues/674
derived from this CSS on this page: https://popper.js.org/tooltip-examples.html
*/

.popper,
.tooltip {
    position: absolute;
    z-index: 9999;
    background: #FFC107;
    color: black;
    width: 150px;
    border-radius: 3px;
    box-shadow: 0 0 2px rgba(0,0,0,0.5);
    padding: 10px;
    text-align: center;
}
.style5 .tooltip {
    background: #1E252B;
    color: #FFFFFF;
    max-width: 200px;
    width: auto;
    font-size: .8rem;
    padding: .5em 1em;
}
.popper .popper__arrow,
.tooltip .tooltip-arrow {
    width: 0;
    height: 0;
    border-style: solid;
    position: absolute;
    margin: 5px;
}

.tooltip .tooltip-arrow,
.popper .popper__arrow {
    border-color: #FFC107;
}
.style5 .tooltip .tooltip-arrow {
    border-color: #1E252B;
}
.popper[x-placement^="top"],
.tooltip[x-placement^="top"] {
    margin-bottom: 5px;
}
.popper[x-placement^="top"] .popper__arrow,
.tooltip[x-placement^="top"] .tooltip-arrow {
    border-width: 5px 5px 0 5px;
    border-left-color: transparent;
    border-right-color: transparent;
    border-bottom-color: transparent;
    bottom: -5px;
    left: calc(50% - 5px);
    margin-top: 0;
    margin-bottom: 0;
}
.popper[x-placement^="bottom"],
.tooltip[x-placement^="bottom"] {
    margin-top: 5px;
}
.tooltip[x-placement^="bottom"] .tooltip-arrow,
.popper[x-placement^="bottom"] .popper__arrow {
    border-width: 0 5px 5px 5px;
    border-left-color: transparent;
    border-right-color: transparent;
    border-top-color: transparent;
    top: -5px;
    left: calc(50% - 5px);
    margin-top: 0;
    margin-bottom: 0;
}
.tooltip[x-placement^="right"],
.popper[x-placement^="right"] {
    margin-left: 5px;
}
.popper[x-placement^="right"] .popper__arrow,
.tooltip[x-placement^="right"] .tooltip-arrow {
    border-width: 5px 5px 5px 0;
    border-left-color: transparent;
    border-top-color: transparent;
    border-bottom-color: transparent;
    left: -5px;
    top: calc(50% - 5px);
    margin-left: 0;
    margin-right: 0;
}
.popper[x-placement^="left"],
.tooltip[x-placement^="left"] {
    margin-right: 5px;
}
.popper[x-placement^="left"] .popper__arrow,
.tooltip[x-placement^="left"] .tooltip-arrow {
    border-width: 5px 0 5px 5px;
    border-top-color: transparent;
    border-right-color: transparent;
    border-bottom-color: transparent;
    right: -5px;
    top: calc(50% - 5px);
    margin-left: 0;
    margin-right: 0;
}

div#col-table col {
    width: auto;
}

div#wpbody {
    //font-size: 13px;
    line-height: 1em!important;
}

div.scrollmenu {
    background-color: #333;
    overflow: auto;
    white-space: nowrap;
}

div.scrollmenu a {
    display: inline-block;
    color: white;
    text-align: center;
    padding: 14px;
    text-decoration: none;
}

div.scrollmenu a:hover {
    background-color: #777;
}

.fixed-table-body {
    height: auto!important;
}
.fade:not(.show) {
    opacity: 0;
    DISPLAY: NONE;
}
