@import './colors';
@import './mixins';

@mixin hc-drag-list() {
    display: flex;
    flex-direction: column;
}

@mixin hc-drag-list-container() {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    overflow-y: hidden;

    .preserve-whitespace {
        white-space: pre;
    }
}

@mixin hc-drag-list-targets() {
    display: flex;
    flex-direction: column;
    width: 50%;
}

@mixin hc-drag-list-targets-info() {
    margin-bottom: 10px;
    font-weight: 600;
    color: $gray-500;
    position: relative;
    margin-right: 30px;

    hc-icon {
        cursor: pointer;
        position: absolute;
        right: 0;
        top: 0;
    }
}

@mixin hc-drag-list-targets-container() {
    overflow-y: auto;
}

@mixin hc-drag-list-assignments() {
    min-width: 20px;
    margin-right: 30px;

    &:last-of-type .hc-drag-list-assignment {
        border-bottom: 1px solid $gray-300;
    }
}

@mixin hc-drag-list-assignment() {
    color: $slate-gray-500;
    border-left: 1px solid $gray-300;
    border-right: 1px solid $gray-300;
    padding: 10px 5px 10px 35px;
    font-weight: 400;
    display: flex;
    align-items: center;
    height: 36px;

    &.hc-drag-list-placeholder {
        color: $gray-400;
    }

    &.hc-drag-list-target-hover {
        background: rgba($blue, 0.05);
        border: 0.5px solid $blue;
        box-shadow: 0px 0px 5px rgba($blue, 0.05);
    }

    .hc-drag-list-option {
        display: flex;
        width: 100%;
    }
}

@mixin hc-drag-list-target-name() {
    color: $offblack;
    border: 1px solid $slate-gray-300;
    background: $gray-200;
    padding: 9px 5px 0px 5px;
    font-weight: 500;
    line-height: 18px;
    height: 36px;

    hc-icon {
        font-size: 90%;

        &.fa-check {
            color: $green;
        }

        &.fa-lock {
            cursor: pointer;
        }
    }
}

@mixin hc-drag-list-options() {
    width: 50%;
    color: $gray-500;
    display: flex;
    flex-direction: column;

    .hc-drag-list-option {
        display: flex;
        align-items: center;
        border-bottom: 0.5px solid $slate-gray-300;
        padding: 2px 5px 2px 5px;
        display: flex;
        flex-direction: row;
        justify-content: center;
        height: 36px;

        hc-icon {
            color: $slate-gray-300;
        }
    }
}

@mixin hc-drag-list-option-name() {
    line-height: 28px;
    padding-left: 20px;
    color: $slate-gray-600;
}

@mixin hc-drag-list-options-info() {
    font-weight: 600;
    color: $gray-500;
}

@mixin hc-drag-list-options-container() {
    margin-top: 10px;
    background: $white;
    border: 1px solid $slate-gray-300;
    flex-grow: 1;
    overflow-y: auto;
}

@mixin hc-drag-list-option() {
    &:not(.hc-drag-list-option-locked) {
        cursor: grab;
    }

    &.hc-drag-list-option-locked {
        cursor: not-allowed;
        color: $slate-gray-300;
    }

    .hc-drag-list-option-name {
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-right: 5px;
    }
}

@mixin hc-drag-list-option-close() {
    padding: 0 5px;
    margin: 0 5px 0 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}
