/* -----
   Table
   ----- */
.table-view {
  margin-bottom: 0;
}

.table-view caption {
  margin-bottom: 0;
  padding: 2px 0;
  font-weight: bold;
}

.table-condensed.table-view thead {
  top: 40px;
  z-index: 1;
}

.table-condensed.table-view thead tr th,
.table-view thead th {
  padding: 5px 5px;
  background-color: transparent;
  vertical-align: middle;
}

.table-condensed.table-view tbody tr td,
.table-view tbody td {
  vertical-align: middle;
}

.table-condensed.table-view thead tr th a,
.table-view thead th a {
  display: block;
  width: max-content;
  color: var(--edu-link-color);
}

.table-condensed.table-view thead tr th a:hover,
.table-view thead th a:hover {
  display: block;
  width: max-content;
  color: var(--edu-link-hover-color);
}

.table-header {
  word-wrap: break-word;
}

.table-header select {
  max-width: 100%;
}

.table-view-footer {
  margin: 30px 0 20px 0;
  text-align: center;
  color: var(--bs-body-color);
}

.table-view-resumen {
  display: inline-block;
}

.table-showrows-form {
  display: inline-block;
}

.table-showrows-form select.form-control {
  float: none;
  display: inline-block;
  width: 5em;
  height: auto;
  padding: 4px 15px 4px 6px;
}

.table-view .delete-field {
  text-align: right;
}

.table-view .roles-field {
  padding-right: 0.5em;
  white-space: nowrap;
}

/* -------
   Compact
   ------- */

.table-view.compact td {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-wrapper-stretch {
  /* Clase diseñáda para evitar que las tablas que muestran los perfiles asociados a un elemento se escapen del contenedor flex.
        Esto se debe a que las columnas de esas tablas puden tender a infinito y llegado a cierto punto,
        las tablas pasan a tener un ancho que entra en conflicto con el layout.

        Los valores del siguiente atributo fueron seleccionados completamente a ojo.
    */
  max-width: calc(100vw - 300px);
}

/* ----------
   Responsive
   ---------- */
@media screen and (min-width: 1000px) {
  .table-header {
    max-width: 10em;
  }
}

@media screen and (max-width: 1460px) {
  .table-condensed.table-view thead tr th a,
  .table-view thead th a {
    width: auto;
  }
}
