/* Stili della tabella derivati da atom.css; controlli e colori usano Bootstrap 5. */
/* Una sola cella di riepilogo su smartphone, senza duplicare i pulsanti. */
table.telaioTable-smart > thead > tr > .telaioTable-smart-data,
table.telaioTable-smart > tbody > tr > .telaioTable-smart-data,
table.telaioTable-smart > tfoot > tr > .telaioTable-smart-data,
table.telaioTable-smart > thead > tr > [data-desktop="0"],
table.telaioTable-smart > tbody > tr > [data-desktop="0"],
table.telaioTable-smart > tfoot > tr > [data-desktop="0"] { display: none; }
@media (max-width: 767.98px) {
  table.telaioTable-smart { width: 100%; table-layout: auto; }
  table.telaioTable-smart > thead > tr > th,
  table.telaioTable-smart > tbody > tr > td,
  table.telaioTable-smart > tfoot > tr > td { display: none; }
  table.telaioTable-smart > thead > tr > .telaioTable-smart-actions,
  table.telaioTable-smart > tbody > tr > .telaioTable-smart-actions,
  table.telaioTable-smart > thead > tr > .telaioTable-smart-data,
  table.telaioTable-smart > tbody > tr > .telaioTable-smart-data,
  table.telaioTable-smart > tfoot > tr > .telaioTable-smart-data { display: table-cell; }
  table.telaioTable-smart .telaioTable-smart-actions {
    width: 1%; max-width: 7rem; vertical-align: top; white-space: normal !important;
  }
  table.telaioTable-smart .telaioTable-smart-data {
    text-align: left; white-space: normal; overflow-wrap: anywhere;
  }
  table.telaioTable-smart > thead > .telaioTable-filter-row { display: none; }
  .telaioTable-wrap:has(table.telaioTable-smart) .telaioTable-filter-btn { display: none; }
}
.telaioTable-wrap { width: 100%; min-width: 0; }
.telaioTable-scroll { overflow: visible; max-height: none; }
table.telaioTable td.telaioTable-actions {
  width: 1%;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}
/* Le tabelle usano lo scorrimento della pagina, anche dentro i contenitori legacy. */
.table-responsive:has(.telaioTable-wrap),
.scrollable-table-container:has(.telaioTable-wrap),
.card-body-scroll:has(.telaioTable-wrap) {
  overflow: visible;
  max-height: none;
}
.telaioTable-toolbar {
  position: sticky;
  top: var(--telaioTable-toolbar-top, 0px);
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .25rem;
  padding: .25rem .5rem;
  background: var(--bs-tertiary-bg, #f8f9fa);
  border: 1px solid var(--bs-border-color, #dee2e6);
  border-radius: var(--bs-border-radius, .375rem);
}
.telaioTable-toolbar-toggle { display: none; }
@media (max-width: 767.98px) {
  .telaioTable-toolbar-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.5rem; min-height: 2.5rem;
  }
  .telaioTable-wrap:not(.telaioTable-toolbar-open) > .telaioTable-toolbar {
    display: none;
  }
}
.telaioTable-toolbar-left,
.telaioTable-toolbar-center,
.telaioTable-toolbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .375rem;
  min-width: 0;
}
.telaioTable-toolbar-right { margin-left: auto; }
.telaioTable-toolbar-center:empty { display: none; }
.telaioTable-toolbar[data-search="full"] .telaioTable-toolbar-center { flex: 1 1 12rem; flex-wrap: nowrap; }
.telaioTable-search-input { width: 12rem; max-width: 100%; }
.telaioTable-toolbar[data-search="full"] .telaioTable-search-input { width: auto; flex: 1 1 auto; min-width: 0; }
.telaioTable-subtotal-select { width: auto; max-width: 100%; }
.telaioTable-toolbar-title { cursor: pointer; font-weight: 600; }
@media (max-width: 767.98px) {
  .telaioTable-toolbar-title,
  .telaioTable-subtotal-select,
  .telaioTable-toolbar-left:not(:has(.telaioTable-row-count)) {
    display: none;
  }

  .telaioTable-toolbar {
    flex-wrap: nowrap;
    gap: .25rem;
    padding: .25rem;
  }

  .telaioTable-toolbar-left,
  .telaioTable-toolbar-center,
  .telaioTable-toolbar-right {
    flex-wrap: nowrap;
    gap: .25rem;
  }

  .telaioTable-toolbar-center,
  .telaioTable-toolbar[data-search="full"] .telaioTable-toolbar-center {
    flex: 1 1 0;
  }

  .telaioTable-toolbar-right {
    flex: 0 0 auto;
    margin-left: 0;
  }

  .telaioTable-toolbar:not([data-search="full"]) .telaioTable-toolbar-right {
    flex: 1 1 0;
  }

  .telaioTable-toolbar .telaioTable-search-input {
    width: 0;
    min-width: 0;
    flex: 1 1 0;
  }

  .telaioTable-toolbar button {
    flex-shrink: 0;
    white-space: nowrap;
  }
}
.telaioTable-toggle { transition: transform .2s; }
.telaioTable-closed .telaioTable-toggle { transform: rotate(-180deg); }
.telaioTable-closed > .telaioTable-title { display: none; }
.telaioTable-title { padding: .35rem .75rem; margin-bottom: .25rem; text-align: center; }
.telaioTable-title-left { text-align: left; }
.telaioTable-title-right { text-align: right; }
table.telaioTable > thead > tr > th {
  position: sticky;
  top: var(--telaioTable-sticky-top, 0px);
  z-index: 2;
  vertical-align: middle;
}
table.telaioTable:not(.no-sort) > thead > tr:not(.telaioTable-filter-row) > th:not(.no-sort):not(.col-check) {
  cursor: pointer;
  padding-right: 1.3rem;
}
table.telaioTable:not(.no-sort) > thead > tr:not(.telaioTable-filter-row) > th:not(.no-sort):not(.col-check)::after {
  content: "↕";
  position: absolute;
  right: .25rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: .6;
  pointer-events: none;
}
table.telaioTable > thead > tr > th.sort-asc::after { content: "↑" !important; opacity: 1 !important; }
table.telaioTable > thead > tr > th.sort-desc::after { content: "↓" !important; opacity: 1 !important; }
table.telaioTable > thead > tr > th > .iconaord { display: none; }
.telaioTable-filter-box { display: flex; flex-direction: column; gap: .25rem; min-width: 6rem; }
.telaioTable-filter-input { width: 100%; }
table.telaioTable .telaioTable-sticky { position: sticky; z-index: 1; }
table.telaioTable > tbody .telaioTable-sticky,
table.telaioTable > tfoot .telaioTable-sticky { background: var(--bs-body-bg, #fff); }
table.telaioTable > thead .telaioTable-sticky { z-index: 3; }
table.telaioTable .telaioTable-sticky-last { box-shadow: 2px 0 4px #0002; }
table.telaioTable > tfoot > .telaioTable-total-row > td,
table.telaioTable > tbody > .telaioTable-subtotal-row > td { font-weight: 700; background: var(--bs-secondary-bg, #e9ecef); }
table.telaioTable > tbody > .telaioTable-detail-row > td { padding: .75rem 1rem; background: var(--bs-tertiary-bg, #f8f9fa); }
.telaioTable-detail { padding: .5rem; border: 1px solid var(--bs-border-color, #dee2e6); border-radius: .375rem; }
table.telaioTable td.telaioTable-search-cell-hidden { color: transparent !important; text-shadow: none !important; }
table.telaioTable td.telaioTable-search-cell-hidden *,
table.telaioTable td.telaioTable-search-cell-hidden::before,
table.telaioTable td.telaioTable-search-cell-hidden::after { visibility: hidden !important; }
