/* Padrão compartilhado pelas tabelas do portal e do dimensionamento público.
   A especificidade e !important preservam o padrão após inicializar DataTables
   e carregar os estilos locais, sem alterar cores, larguras ou a responsividade. */
.table-responsive {
  overflow-x: auto;
}

.table > :is(thead, tbody, tfoot) > tr > :is(th, td) {
  text-align: center !important;
  vertical-align: middle !important;
}

.table > thead > tr > :is(th, td) {
  font-weight: 700 !important;
  text-transform: uppercase !important;
}

.table > thead > tr > :is(th, td) :is(span, a, div) {
  font-weight: inherit !important;
  text-transform: inherit !important;
}

.table :is(th, td) :is(div, p, label, span, a, li) {
  text-align: center !important;
}

.table :is(th, td)[data-label]::before {
  text-align: center;
}

/* Campos têm seu próprio alinhamento e não herdam o da célula. */
.table :is(th, td) :is(.form-control, .form-select, input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select, [contenteditable="true"], .select2-selection__rendered) {
  text-align: center !important;
}

.table :is(th, td) select {
  text-align-last: center;
}

.table :is(th, td) > :is(.d-flex, .input-group),
.table :is(th, td) .select2-selection--multiple .select2-selection__rendered {
  justify-content: center !important;
  align-items: center;
}

.table :is(th, td) :is(.btn-group, .btn-group-vertical, .form-check) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.table :is(th, td) .form-check {
  gap: 0.375rem;
  padding-left: 0;
}

.table :is(th, td) :is(input[type="checkbox"], input[type="radio"]) {
  float: none;
  margin-left: 0;
}

/* Select2 múltiplo cria etiquetas flutuantes dentro da célula. */
.table :is(th, td) .select2-selection--multiple .select2-selection__rendered {
  display: flex;
  flex-wrap: wrap;
}

.table :is(th, td) .select2-selection__choice {
  float: none;
}

/* As linhas de detalhes do DataTables também exibem nomes de colunas. */
.table .dtr-details,
.table .dtr-data {
  text-align: center;
}

.table .dtr-title {
  font-weight: 700;
  text-transform: uppercase;
}
