@import '~react-virtualized/styles.css';
@import '~react-pivottable/pivottable.css';

@import './variables.scss';

$dataTableHeaderHeight: 50px;

.data-table-container {
    height: 100vh;
}

.data-table-header-wrapper {
    height: $dataTableHeaderHeight;
    overflow-x: hidden;
}

.data-table-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    height: calc(100% - #{$dataTableHeaderHeight});
    margin-bottom: 1rem;
}

.data-table {
    color: $colorNavyMedium;
}

// Header Container
.data-table > .data-table-row:first-child {
    font-family: $font;
    font-size: $fontSizeS;
    background: $colorNavyMedium;
    color: $colorGreyLight;
}

.data-table-row {
    border-top: 1px solid $colorGreyExtraLight;
    border-width: 1px 1px 1px 0;
    align-items: baseline;

    &:first-child {
        border-width: 0 1px 1px 0;
        height: 100px;
    }

    & > div {
        align-self: center;
    }

    &.odd {
        background-color: $colorGreyExtraLight;
    }
}

.data-table-cell,
.data-table-cell p {
    color: $colorNavyMedium;
    font-size: $fontSizeS;
    font-family: $font;

    white-space: normal;
    padding: 0;
     
    .data-table-cell__list {
        max-width: 100%;
        text-overflow: ellipsis;
        overflow: hidden;
        padding: 0 0.15625rem;
    }
}

.data-table .data-table-cell__string {
    text-overflow: ellipsis;
    overflow: hidden;
}

.data-table .data-table-cell__number {
    text-align: right;
    padding-right: 22%;
}

.data-table-header {
    text-transform: none;
    position: relative;

    display: flex;
    justify-content: space-between;
    align-content: center;
    margin-right: 20px;

    & > span {
        // Correcting for a slight misalignment
        margin-top: 1px;
        white-space: normal;
    }

    & > svg {
        position: absolute;
        right: -13px;
        height: 100%;
    }
}

.data-table-grid {
    outline: none;
}

.loading-spinner-wrapper, .load-failed-wrapper {
    text-align: center;
}

.data-table {
    font-family: $font;

    a,
    a:visited,
    a:active,
    a:focus {
        transition: color ease 200ms;
        color: $colorBrandLight;
        text-decoration: none;
    }

    a:hover {
        color: $colorBrand;
    }

    a .fa {
        width: 20px;
        margin-bottom: 8px;
    }

}