//Table basic shared vars

$column-width: 300px;
$column-flex: 1;
$column-shrink: 0;
$column-margin: 0 10px 0 0;

%fold {
    .taskboard-task {
        background: none;
        border: 0;
        margin: 0;
        min-height: 0;
        .taskboard-task-inner {
            padding: .2rem;
        }
        .taskboard-tagline,
        .taskboard-text {
            display: none;
        }
        .avatar {
            height: 35px;
            width: 35px;
        }
        .icon {
            display: none;
        }
        &.ui-sortable-helper {
            box-shadow: none;
        }
    }
    &.task-column,
    .task-column {
        align-content: flex-start;
        display: flex;
        flex-direction: column;
        flex-flow: row wrap;
    }
    .avatar-task-link {
        display: block;
    }
    .avatar-assigned-to {
        display: none;
    }
}

.taskboard-table {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    width: 100%;
}

.taskboard-table-header {
    margin-bottom: .5rem;
    min-height: 40px;
    position: relative;
    width: 100%;
    .taskboard-table-inner {
        display: flex;
        overflow: hidden;
        position: absolute;
    }
    .task-colum-name {
        @extend %large;
        background: $whitish;
        border-top: 3px solid $gray-light;
        display: flex;
        flex-basis: $column-width;
        flex-grow: $column-flex;
        flex-shrink: $column-shrink;
        justify-content: space-between;
        margin: $column-margin;
        max-width: $column-width;
        padding: .5rem 1rem;
        position: relative;
        text-transform: uppercase;
        width: $column-width;
        &:last-child {
            margin-right: 0;
        }
        .icon {
            @extend %medium;
            color: $gray-light;
            margin-right: .3rem;
            transition: color .2s linear;
            &:hover {
                color: $green-taiga;
            }
            &.hfold,
            &.hunfold {
                display: inline-block;
                transform: rotate(90deg);
            }
        }
        &.column-fold {
            align-items: center;
            justify-content: center;
            padding: .3rem 0;
            span {
                display: none;
            }
            .hfold,
            .hunfold {
                margin: 0;
            }
        }
    }
}

.taskboard-table-body {
    height: 100%;
    overflow: auto;
    width: 100%;
    .task-column {
        flex-basis: $column-width;
        flex-grow: $column-flex;
        flex-shrink: $column-shrink;
        margin: $column-margin;
        max-width: $column-width;
        width: $column-width;
        &:last-child {
            margin-right: 0;
        }
    }
    .row-fold {
        @extend %fold;
    }
    .column-fold {
        @extend %fold;
        .taskboard-task {
            max-width: 40px;
            width: 40px;
        }
    }
    .task-row {
        display: flex;
        margin-bottom: .5rem;
        min-height: 10rem;
        width: 100%;
        &:hover {
            .new-task {
                opacity: 1;
                transition: opacity .3s linear;
            }
        }
        &.blocked {
            .taskboard-userstory-box {
                background: rgba($red, .6);

            }
            .taskboard-userstory-box a,
            .taskboard-userstory-box a:hover,
            .points-value,
            .points-value:hover {
                color: $white;
                transition: color .3s linear;
            }
            .taskboard-tasks-box {
                background: rgba($red, .1);
            }
        }
        &.row-fold {
            min-height: 0;
            .us-title {
                @include ellipsis(100%);
            }
            .points-value,
            .icon-plus,
            .icon-bulk {
                display: none;
            }
        }
    }
    .taskboard-tasks-box {
        background: $whitish;
    }

    .taskboard-userstory-box {
        padding: .5rem .5rem .5rem 1.5rem;
        .icon {
            color: $gray-light;
            position: absolute;
            right: .5rem;
            top: .7rem;
            transition: color .2s linear;
            &:hover {
                color: $green-taiga;
            }
            &.icon-plus {
                right: 2rem;
            }
            &.icon-vfold,
            &.icon-vunfold {
                left: 0;
                right: inherit;
            }
        }
    }
    .avatar-task-link {
        display: none;
    }
    .avatar-assigned-to {
        display: block;
    }
}

.taskboard-userstory-box {
    position: relative;
    .tag-list {
        display: none;
        margin-bottom: 1rem;
    }
    .us-title {
        @extend %large;
        @extend %title;
        margin-bottom: 0;
        margin-right: 3rem;
    }
    .points-value {
        @extend %small;
        color: $gray-light;
        span {
            margin-right: .1rem;
        }
    }
}

.points-list {
    a {
        color: $green-taiga;
        margin-left: .5rem;
        &:hover {
            span {
                opacity: 1;
                transition: opacity .2s linear;
            }
        }
    }
    span {
        opacity: 0;
        transition: opacity .2s linear;
    }
}
