/* CSS Document */
html {
    min-height: 100%;
    //margin-left: calc(100vw - 100%);
}
body {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    min-height: 100vh;
}
main {
    -webkit-box-flex: 1;
        -ms-flex: 1 0 auto;
            flex: 1 0 auto;
}
.narrow-input {
    width: 100px; /* Puoi modificare questa larghezza secondo le tue esigenze */
}
.tagify__tag {
            font-size: 18px;
}
.tagify__input {
            font-size: 18px;
}
.tagify__dropdown__item {
    font-size: 18px; 
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    float: left;
    min-width: 10rem;
    padding: .5rem 0;
    margin: .125rem 0 0;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    list-style: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: .25rem;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: .25rem 1.5rem;
    clear: both;
    font-weight: 400;
    color: #212529;
    text-align: inherit;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
}
.dropdown-item:focus, .dropdown-item:hover {
    color: #16181b;
    text-decoration: none;
    background-color: #f8f9fa;
}
.dropdown-item.active, .dropdown-item:active {
    color: #fff;
    text-decoration: none;
    background-color: #007bff;
}

/* Regola le dimensioni del pulsante */
input[type="radio"] {
  width: 20px; /* Larghezza */
  height: 20px; /* Altezza */
}

/* Regola la dimensione del testo delle etichette */
.radio-label {
  font-size: 18px; /* Dimensione del testo */
  margin-left: 10px; /* Spazio tra il pulsante e l'etichetta */
}
.style1 {
    padding-bottom: 50px;
}
.style2 {
    margin-top: 0px;
    padding-top: 10px;
    padding-bottom: 10px;
}
.style3 {
    padding-top: 10px;
}
.style4 {
    padding-top: 10px;
    padding-bottom: 10px;
}
.style5 {
    padding-bottom: 20px;
}
.style6 {
    padding-top: 50px;
    padding-bottom: 50px;
}
input[type="text"] {
  -webkit-appearance: none; /* Disattiva lo zoom automatico su iOS */
}
/* Fix select con testo lungo su mobile */
@media (max-width: 767px) {
  .select-wrapper {
    position: relative;
    overflow: hidden;
  }

  .select-wrapper select {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 2rem; /* spazio per la freccia nativa */
  }
}

/* =========================================================
   user-ok: blocco BOLLATURA centrato verticalmente
   Lo spazio tra la barra pulsanti e il footer viene diviso
   in parti uguali sopra e sotto il blocco titolo + ingresso/uscita.
   ========================================================= */
.main-bollatura {
  display: flex;
  flex-direction: column;
}
.main-bollatura > .wappler-block {
  height: auto !important;   /* annulla h-100 di Bootstrap */
  margin-top: auto;
  margin-bottom: auto;
}
/* niente padding in fondo (sbilanciava il centro): la distanza tra
   INGRESSO e USCITA la dà il padding-top della seconda riga */
.main-bollatura .row.style1 { padding-bottom: 0; }
.main-bollatura .row.style1 + .row.style1 { padding-top: 2rem; }

/* =========================================================
   Vista rapportini a SCHEDE su mobile  (solo user-rapportini)
   Solo CSS: la tabella su desktop resta invariata, sotto i 768px
   ogni riga diventa una card (stesso stile di Salvapersona).
   Colonne: 1 stato | 2 modifica | 3 dettagli | 4 cliente | 5 commessa
   6 data | 7 inizio | 8 fine | 9 viaggio | 10 foto | 11 firma/email
   12 ricambi | 13 tecnici | 14 note | 15 elimina
   ========================================================= */
@media (max-width: 767px) {
  #user-ok main table.tabella-rapportini { border: 0; }
  #user-ok main table.tabella-rapportini thead { display: none; }
  #user-ok main table.tabella-rapportini > tbody { display: block; }

  /* ogni riga = una card */
  #user-ok main table.tabella-rapportini > tbody > tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #212529;
    background: #fff;
    border: 1px solid #dee2e6;
    border-left-width: 4px;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
    transition: border-color .1s ease;
  }
  #user-ok main table.tabella-rapportini > tbody > tr:hover { border-color: #000; }

  /* accento di stato a sinistra (al posto della tinta di riga) */
  #user-ok main table.tabella-rapportini > tbody > tr.table-info,
  #user-ok main table.tabella-rapportini > tbody > tr.table-info:hover    { border-left-color: #17a2b8; }
  #user-ok main table.tabella-rapportini > tbody > tr.table-warning,
  #user-ok main table.tabella-rapportini > tbody > tr.table-warning:hover { border-left-color: #dc3545; }

  /* celle come blocchi, senza bordi né tinte */
  #user-ok main table.tabella-rapportini > tbody > tr > td {
    border: 0 !important;
    background: transparent !important;
    padding: 0;
  }

  /* riga 1: stato (sx) + data (dx) */
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(1) { order: 1; font-size: 1.15rem; }
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(6) {
    order: 2; margin-left: auto; color: #6c757d; font-size: .9rem; white-space: nowrap;
  }

  /* cliente = titolo, commessa = sottotitolo */
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(4) {
    order: 3; flex: 0 0 100%; font-size: 1.05rem; font-weight: 600; line-height: 1.25;
  }
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(5) {
    order: 4; flex: 0 0 100%; color: #6c757d; font-size: .9rem; margin-bottom: 2px;
  }

  /* orari come piccole etichette: Inizio / Fine / Viaggio */
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(7),
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(8),
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(9) {
    flex: 0 0 auto;
    font-size: .85rem;
    font-weight: 600;
    background: #f1f3f5 !important;
    border-radius: 6px;
    padding: 2px 8px;
  }
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(7) { order: 5; }
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(8) { order: 6; }
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(9) { order: 7; }
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(7)::before { content: "Inizio "; font-weight: 400; color: #6c757d; }
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(8)::before { content: "Fine ";   font-weight: 400; color: #6c757d; }
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(9)::before { content: "Viaggio "; font-weight: 400; color: #6c757d; }

  /* note a tutta larghezza */
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(14) {
    order: 8; flex: 0 0 100%; font-size: .9rem; color: #495057; font-style: italic;
  }

  /* barra pulsanti: dettagli, modifica, foto, ricambi, tecnici ... */
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(3)  { order: 9;  flex: 0 0 auto; }
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(2)  { order: 10; flex: 0 0 auto; }
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(10) { order: 11; flex: 0 0 auto; }
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(12) { order: 12; flex: 0 0 auto; }
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(13) { order: 13; flex: 0 0 auto; }
  /* ... firma/email spinta a destra, elimina in fondo */
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(11) { order: 14; flex: 0 0 auto; margin-left: auto; }
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(15) { order: 15; flex: 0 0 auto; }

  /* pulsanti un po' piu compatti per stare su una riga */
  #user-ok main table.tabella-rapportini > tbody > tr .btn-lg { padding: .35rem .65rem; font-size: 1rem; }

  /* celle vuote/nascoste: niente spazio (il gap le conterebbe comunque) */
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(14):empty,
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(9):not(:has(> text:not([style*="none"]))),
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(2):not(:has(> div:not([style*="none"]))),
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(11):has(> div > button[style*="none"]),
  #user-ok main table.tabella-rapportini > tbody > tr > td:nth-child(15):has(button[style*="none"]) {
    display: none;
  }
}
