.mh-typeahead {
    background-color: #fff;
    box-shadow: \
        0 2px 0 0 rgba(0, 0, 0, 0.1), \
        inset 0 0 0 1px rgba(0, 0, 0, 0.2);
    display: none;
    margin-top: 10px;
    max-width: calc(100% - 40px);
    padding: 10px 1px;
    position: absolute;
    max-height: 340px;
    overflow-y: auto;
    width: 300px;
    z-index: 999;

    &--open {
        display: block;
    }

    &__suggestion {
        height: 40px;
        line-height: 40px;
        overflow: hidden;
        padding: 0 10px;
        position: relative;
        text-overflow: ellipsis;
        white-space: nowrap;

        &:nth-child(even) {
            background-color: $color-bkg-main;
        }

        &:hover {
            background-color: transparent;
            cursor: pointer;
            transform-style: preserve-3d;

            &::before {
                background: nth($color-themes, 1);
                bottom: 0;
                content: '';
                display: block;
                left: 0;
                position: absolute;
                right: 0;
                top: 0;
                opacity: 0.15;
                transform: translateZ(-1px);
            }
        }

        > mark {
            background-color: transparent;
            color: #666;
            font-weight: bold;
        }

        &--focused,
        &--focused:hover,
        &--focused:nth-child(even) {
            background-color: nth($color-themes, 1);
            color: #fff;

            &::before {
                display: none;
            }

            > mark {
                color: #fff;
            }
        }
    }
}

.mh-tokenizer {
    color: #666;
    font-family: sans-serif;
    font-size: 15px;
}

.mh-token {
    background: $color-bkg-main;
    display: inline-block;
    margin: 10px 10px 0 0;
    position: relative;
    width: auto;

    &__label {
        display: block;
        height: 32px;
        line-height: 32px;
        padding: 0 40px 0 16px;
    }

    &__remove {
        background: rgba(#000, 0.1);
        border-radius: 12px;
        cursor: pointer;
        display: block;
        height: 20px;
        position: absolute;
        right: 8px;
        top: 6px;
        width: 20px;

        &:hover {
            background: rgba(#000, 0.2);
        }

        &:before,
        &:after {
            background: #666;
            content: ' ';
            height: 11px;
            left: 9px;
            position: absolute;
            top: 4px;
            width: 2px;
        }

        &:before {
            transform: rotate(45deg);
        }

        &:after {
            transform: rotate(-45deg);
        }
    }

    &.mh-sortable-ghost {
        opacity: 0.5;
    }

    &.mh-sortable-helper {
        z-index: 9999 !important;
    }
}
