.rtable {
    display     : flex;
    position    : relative;
    box-shadow  : 0 10px 10px -10px #cccccc;
    font-family : @main-font-medium;
    color       : #444444;

    .icon-table-sort.asc { transform: rotate(180deg); }
}

.rtable-no-data {
    &:after {
        content        : "no data";
        position       : absolute;
        bottom         : 13px;
        left           : 50%;
        margin-left    : -109px;
        font-family    : @main-font-ultra-light;
        font-size      : 72px;
        line-height    : 1em;
        letter-spacing : -0.05em;
        color          : #dddddd;
    }
    .icon-table-sort { display: none; }
    .rtable-row.rtable-head .rtable-cell { cursor: default; }
    .rtable-first-column .rtable-data { border-color: transparent; }
    .rtable-cell { border-color: transparent; }
}

.rtable-first-column {
    flex-shrink : 0;
    z-index     : 1;
    width       : 390px;

    .rtable-cell { text-align: left; }

    .rtable-total .rtable-cell {
        font-family    : @main-font-thin;
        font-size      : 25px;
        text-transform : uppercase;
        color          : #777777;
    }
    .rtable-data .rtable-cell { letter-spacing: -0.02em; }

    .rtable-sticky { width: 389px; }

    .rtable-head  { border-right: 1px solid #f6f6f6; }
    .rtable-total { border-right: 1px solid #3c3c4d; }
    .rtable-data  { border-right: 1px solid #f2f2f2; }
}

.rtable-other-columns {
    flex: 1;

    .rtable-cell {
        font-family    : @main-font-regular;
        letter-spacing : -0.05em;
    }

    .rtable-data { font-size: 16px; }

    overflow-y: hidden;

    .rtable-sticky {
        left  : 390px;
        right : 0;
    }
}

.rtable-total {
    height      : 50px;
    line-height : 50px;

    .rtable-cell {
        height         : 50px;
        font-family    : @main-font-medium;
        line-height    : 50px;
        letter-spacing : 0;
    }
}

.rtable-row {
    display: flex;

    &.rtable-head {
        height         : 60px;
        font-size      : 10px;
        text-transform : uppercase;

        .rtable-cell {
            position         : relative;
            background-color : #f6f6f6;
            cursor           : pointer;
        }

        .rtable-title {
            position       : absolute;
            right          : 30px;
            bottom         : 5px;
            left           : 30px;
            font-family    : @main-font-medium;
            line-height    : normal;
            letter-spacing : 0.05em;
            white-space    : initial;
        }


        &.rtable-sticky {
            position : fixed;
            top      : 0;
        }

        &.rtable-bottom-box-shadow { box-shadow: 0 5px 0 #000000; }
    }

    &.rtable-total {
        font-size : 20px;
        color     : #ffffff;

        .rtable-cell        { background-color: #333341; }
        .rtable-cell-sorted { background-color: #2a2a36; }

        &.rtable-sticky {
            position : fixed;
            top      : 60px;
        }
    }
}

.rtable-row-increased-height { height : 65px; }

.rtable-cell {
    flex : 1;
    .m-ellipsis;

    min-width        : 100px;
    padding          : 0 30px;
    border-bottom    : 1px solid #f2f2f2;
    background-color : #ffffff;
    line-height      : 44px;
    text-align       : right;

    .rtable-row:last-child & { border-width: 2px; }
}

.rtable-cell-details {
    display        : block;
    padding-bottom : 10px;
    margin-top     : -10px;
    color          : #777777;
    font-size      : 0.75em;
    line-height    : 20px;

    &.positive { color: #93b93a; }
    &.negative { color: #f25d57; }
}

.rtable-cell-sorted {
    border-color     : #e9e9e9;
    background-color : #fafafa;

    .rtable-sorted-head {
        position         : absolute;
        bottom           : 0;
        left             : 0;
        width            : 100%;
        height           : 48px;
        color            : rgba(0, 0, 0, .6);

        svg {
            position : relative;
            float    : left;
            top      : 30px;
            left     : 10px;
            width    : 9px;
            height   : 12px;
        }
    }
}

.rtable-overflow {
    overflow   : visible;
    box-shadow : none; // box shaddow is disabled on overflow to prevent it being partially rendered
}

// Sizes
.rtable-cell-w155 { min-width: 155px; }

// Scroll buttons
.rtable-scroll-area {
    position : absolute;
    height   : 50px;

    &.scroll-left  {
        .m-gradient(#333341, transparent, 0%, 100%, to right);

        display : none; // initially hidden
        width   : 70px;
    }

    &.scroll-right {
        .m-gradient(transparent, #333341, 0%, 100%, to right);

        display : none; // initially hidden
        right   : 0;
        width   : 70px;
    }
}

.rtable-scroll-btn {
    .m-hide-text;

    &:hover  { background-color: rgba(255, 255, 255, .15); }
    &:active { background-color: rgba(255, 255, 255, .05); }

    &.scroll-left {
        transform : rotate(180deg);
        left      : -5px;
    }

    &.scroll-right { right: -5px; }

    position            : absolute;
    top                 : 6px;
    width               : 33px;
    height              : 38px;
    border-radius       : 4px;
    background-image    : url("./img/icons/big_arrow_right_dark.png");
    background-repeat   : no-repeat;
    background-size     : 10px 20px;
    background-position : 10px 9px;
    background-color    : rgba(255, 255, 255, 0.1);
    opacity             : 0.6;
}
