/* -----
   Table
   ----- */
.table-view {
    margin-bottom: 0;
    background-color: var(--table-bg-color);
}

.table-view caption {
    margin-bottom: 0;
    padding: 2px 0;
    font-weight: bold;
    color: var(--table-caption-font-color);
    background-color: var(--table-caption-bg-color);
}

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

.table-condensed.table-view thead tr th,
.table-view thead th {
    padding: 5px 5px;
    color: var(--table-head-font-color);
    background-color: var(--table-head-bg-color);
    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(--table-head-font-color);
}

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

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

.table-view-footer {
    margin: 6px 6px 8px;
    text-align: center;
    color: var(--table-footer-font-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;
    color: var(--table-footer-select-font-color);
}

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

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

.popover-content {
    overflow-wrap: break-word;
}

.popover-content .row.odd {
    background-color: #f9f9f9;
}

/* -------
   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;
    }
}
