.eco2-disabled {
    background-color: #f2f2f2;
    color: #999999;
    cursor: not-allowed;
}

.eco2-header {
    top: 0;
    left: 0;
    height: 60px;
    right: 0;
}

.eco2-navBar {
    left: 0;
    right: 0;
    height: 39px;
}

.eco2-sideBar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 300px;
    overflow: auto;
    overflow-x: hidden;
    display: block;
    z-index: 4;
}

.eco2-content {
    position: absolute;
    top: 99px;
    bottom: 0px;
    right: 0;
    left: 0;
    margin-left: 300px;
    overflow: auto;
}

/* Stato iniziale del menu laterale, prima degli script (sideBarMenuLoad, initResponsiveSideBar in site.js):
   chiuso se l'utente lo ha chiuso (classe messa dal layout leggendo il cookie) e sempre chiuso sotto
   MOBILE_BREAKPOINT (768px). Quando l'utente lo apre o lo chiude, gli stili in linea di sideBarMenuSet
   prevalgono su queste regole */
.eco2-menu-chiuso #SideBarMenu {
    display: none;
}

.eco2-menu-chiuso #SideContent {
    margin-left: 0;
}

@media (max-width:767.98px) {
    #SideBarMenu {
        display: none;
    }

    #SideContent {
        margin-left: 0;
    }
}

.eco2-message-popup {
    text-align: left;
    position: fixed;
    z-index: 40;
    left: 30px;
    margin-right: 30px;
    bottom: 30px;
    min-height: 56px;
}

.eco2-link-button {
    display: block;
    background: none;
    border: none;
    padding: 0 8px;
    color: #3f51b5 !important;
    text-decoration: underline;
    cursor: pointer;
}

.eco2-text-ellipsis {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

a.eco2-link, a.eco2-link:link, a.eco2-link:visited {
    color: #3f51b5 !important;
    text-decoration: none;
    white-space: nowrap;
    text-decoration: underline;
}

    a.eco2-link:hover, a.eco2-link:active {
        color: #3f51b5 !important;
        text-decoration: underline;
        cursor: pointer;
    }

.eco2-check {
    width: 16px;
    height: 16px;
    position: relative;
    top: 2px;
}

.eco2-table-container {
    overflow: auto;
    min-height: 200px;
}

.eco2-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: black !important;
    background-color: #E7E9EB !important;
    padding: 8px;
    white-space: nowrap;
    text-align: left;
}

.eco2-table tbody tr {
    padding: 4px;
    white-space: nowrap;
    text-align: left;
}

.eco2-table thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
}

.eco2-table thead th:last-child {
    width: 100%;
}

.eco2-table tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: white;
    padding-right: 4px;
}

table.eco2-table-cursor-pointer tbody td:not(:first-child) {
    cursor: pointer;
}

.eco2-tag {
    display: inline-block;
    padding: 2px 8px;
    text-align: center;
    font: 10pt Arial, Helvetica, sans-serif;
    white-space: nowrap;
    border-radius: 4px;
    margin-top: 1px;
    vertical-align: top;
}

.eco2-top-center-message-popup {
    position: fixed;
    z-index: 10;
    top: 14px;
    left: 50%;
}

hr.eco2-hr {
    margin: 16px 16px 4px 16px;
    border-top: 1px solid #ccc;
}


.eco2-grid-cal tbody td:not(:first-child) {
    width: 14.28%;
    min-width: 100px;
    padding: 2px;
    border-left: 1px solid silver;
}


.eco2-grid-cal thead th:not(:first-child) {
    border-left: 1px solid silver;
}

.eco2-grid-cal tbody td:first-child {
    width: 20px;
}

    .eco2-grid-cal tbody td:first-child span {
        font-size: 10px;
        line-height: 2.25;
        vertical-align: top;
        line-height: initial;
        color: #757575 !important
    }

.eco2-grid-cal label {
    padding: 1px 4px;
    margin: 0;
    display: block;
    border: none;
    width: 100%;
    font-size: 11px;
    white-space: pre-wrap;
    height: 34px;
}

.eco2-vertical-spacer {
    margin: 8px 0
}

.eco2-vertical-spacer-16 {
    margin: 16px 0
}

.w3-cell-row > .w3-cell {
    vertical-align: middle;
}

/* Select e textbox a riga singola della stessa altezza (40.5px = altezza naturale di input.w3-input
   con bordo). Senza altezza fissa la select di w3.css (padding 9px, line-height ignorata da Chrome)
   restava piu' bassa e con il testo spostato in basso: i discendenti (g, p, q) venivano tagliati.
   Con altezza fissa e padding verticale 0 il browser centra il testo della select. Vale anche per le
   coppie select + casella "Cerca..." in .w3-cell-row. Le textarea non sono toccate (solo input). */
input.w3-input,
select.w3-select {
    height: 40.5px;
    box-sizing: border-box;
}

/* padding-left 4px + rientro interno del browser = 8px, come il testo di input.w3-input */
select.w3-select {
    padding-top: 0;
    padding-bottom: 0;
    padding-left: 4px;
}

.w3-row-padding {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    row-gap: 8px;
}

.eco2-separator {
    text-align: left;
    border-bottom: 1px solid #ccc;
    line-height: 0.1em;
    margin: 32px 16px 16px 16px;
}
@media (max-width:600px) {
    /* Header su smartphone: deve stare nella larghezza dello schermo, altrimenti il browser allarga la pagina */
    /* Il logo prende tutto lo spazio lasciato dalle icone (fino alla sua larghezza naturale) */
    .eco2-header .eco2-header-logo {
        width: 100% !important;
        padding: 0 8px;
    }
    .eco2-header-center, .eco2-header-right {
        width: auto !important;
    }
    .eco2-header-logo > div {
        max-width: 100% !important;
    }
    .eco2-header-logo img {
        max-width: 100%;
        height: auto;
    }
    .eco2-header .eco2-header-center {
        padding: 0;
    }
    .eco2-header .eco2-header-right {
        padding-left: 0;
    }
    .eco2-header-right .w3-cell-row > .w3-cell:first-child {
        display: none;
    }
    .eco2-header-right .w3-button {
        padding: 8px;
    }
    .eco2-header-right .w3-button > i {
        padding-right: 0 !important;
    }
    .eco2-separator {
        margin-top: 24px;
        margin-bottom: 8px;
    }
    .eco2-separator span.w3-hide-small {
        display: inline !important;
        font-size: 11px;
        padding: 1px 6px;
        margin: 0 8px 0 0;
    }
}
    .eco2-separator span {
        background: #E7E9EB;
        color: black;
        border: 1px solid #ccc;
        border-radius: 4px;
        padding: 2px 8px;
        margin: 0 16px 0 0;
        white-space: nowrap;
    }

/* Calendario flatpickr: allineato al colore principale dell'interfaccia (#3f51b5) */
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus,
.flatpickr-day.selected.inRange {
    background: #3f51b5;
    border-color: #3f51b5;
}
.flatpickr-day.today {
    border-color: #3f51b5;
}
.flatpickr-day.today:hover,
.flatpickr-day.today:focus {
    background: #3f51b5;
    border-color: #3f51b5;
    color: #fff;
}
.flatpickr-day:hover {
    background: #E7E9EB;
    border-color: #E7E9EB;
}
.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    color: #3f51b5;
}
.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: #3f51b5;
}
span.flatpickr-weekday {
    color: #3f51b5;
}
.flatpickr-time input:hover,
.flatpickr-time .flatpickr-am-pm:hover,
.flatpickr-time input:focus,
.flatpickr-time .flatpickr-am-pm:focus {
    background: #E7E9EB;
}

/* Pannello dello stato RENTRI nell'header: largo, con altezza massima e scroll verticale sui dettagli.
   Selettore con .w3-dropdown-content: w3.css è caricato dopo eco2.css e la sua regola .w3-dropdown-content
   (z-index 1, position absolute) altrimenti vince, e le intestazioni delle tabelle passano sopra il pannello */
.w3-dropdown-content.eco2-rentri-status {
    width: 440px;
    right: 0;
    z-index: 5;
}
.eco2-rentri-status-dettaglio {
    max-height: min(320px, 60vh);
    overflow-y: auto;
    padding-right: 4px;
}
@media (max-width:600px) {
    /* Su smartphone il pannello occupa la larghezza dello schermo, altrimenti esce a sinistra */
    .w3-dropdown-content.eco2-rentri-status {
        position: fixed;
        left: 8px;
        right: 8px;
        width: auto;
    }
}
