.table-container {
    /* Prevents tables from overflowing when the container is too thin. This can and does happen. */
    overflow: auto;
}

.table {
    /* Specificity must match Bootstrap's to override */
    > tbody > tr > td,
    > thead > tr > th {
        max-width: 250px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;

        &.select-all-header-cell,
        &.select-row-cell {
            width: 13px;
            text-align: center;
        }

        &[class^='fr-col-btn-'], &[class*=' fr-col-btn-'] {
            text-align: center;

            .btn-link {
                padding: 1px 6px;
                border: none;
                line-height: 1;
            }
        }

        &.fr-col-btn-1 {
            width: 39px;
            min-width: 39px;
        }

        &.fr-col-btn-2 {
            width: 65px;
            min-width: 65px;
        }

        &.fr-col-btn-3 {
            width: 88px;
            min-width: 88px;
        }
    }

    > tbody > tr > td {
        vertical-align: middle;
    }

    > thead > tr > th {
        a {
            text-decoration: none;
            white-space: nowrap;
            cursor: pointer;
            display: block;
        }
    }

    .sort-caret {
        display: inline-block;
        width: 0;
        height: 0;
        margin-left: .3em;
        border: 0;
        content: "";
    }

    .ascending .sort-caret {
        vertical-align: baseline;
        border-top: 0;
        border-right: 4px solid transparent;
        border-bottom: 4px solid #000;
        border-left: 4px solid transparent
    }

    .descending .sort-caret {
        vertical-align: super;
        border-top: 4px solid #000;
        border-right: 4px solid transparent;
        border-bottom: 0;
        border-left: 4px solid transparent
    }

    &.table-hover > tbody > tr {
        cursor: pointer;
    }
}

.am-inline-edit-table {
    margin-bottom: 20px;

    .table {
        margin-bottom: 10px;

        .am-inline-edit-table-row {
            .form-group {
                padding: 1px 2px;

                .form-control {
                    height: 32px;
                }
            }

            .fr-col-btn-2 {
                text-align: left;
            }

            &:last-child td {
                border-bottom: 1px solid #ddd;
            }
        }
    }
}
