// Selector
// --------------------------------------------------
.qor-selector {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    &.bottom>.qor-selector-menu {
        top: auto;
        bottom: 0;
    }
    &.open>.qor-selector-menu {
        display: block;
    }
    &.right-aligned>.qor-selector-menu {
        right: 0;
        left: auto;
    }
    &.hover {
        .qor-selector-toggle {
            background-color: transparent;
            border: 0;
            height: 32px;
            line-height: 32px;
            color: unquote("rgba(#{$color-black}, 0.87)");
            >.material-icons {
                height: 32px;
                line-height: 32px;
            }
            &.active {
                border: 0;
            }
            &:hover {
                background-color: #fff;
                border: 0;
                @include shadow-2dp();
            }
        }
    }
}

.qor-selector-toggle {
    position: relative;
    display: block;
    height: 28px;
    padding-left: 8px;
    font-size: 14px;
    line-height: 28px;
    color: unquote("rgba(#{$color-black}, 0.54)");
    background-color: #fff;
    border: 2px solid unquote("rgba(#{$color-black}, 0.12)");
    border-radius: 2px;
    cursor: pointer;
    &:hover,
    &:focus {
        text-decoration: none;
        color: unquote("rgba(#{$color-black}, 0.54)");
    }
    &.active {
        padding-right: 0;
        color: unquote("rgba(#{$color-black}, 0.87)");
        border-color: unquote("rgb(#{$color-primary})");
    }
    >.material-icons {
        width: 28px;
        height: 28px;
        font-size: 16px;
        line-height: 28px;
        text-align: center;
        vertical-align: top;
    }
    >.qor-selector-clear {
        display: none;
    }
    &.clearable {
        >.qor-selector-clear {
            display: inline-block;
            width: 30px;
            padding-left: 2px;
            background-color: unquote("rgb(#{$color-primary})");
            color: #fff;
        }
    }
}

.qor-selector-menu {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    display: none;
    min-width: 128px;
    max-height: 480px;
    padding: 8px 0;
    margin: 0;
    list-style: none;
    font-size: 14px;
    text-align: left;
    background-color: #fff;
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .2), 0 1px 5px 0 rgba(0, 0, 0, .12);
    overflow: auto;
    >li {
        display: block;
        height: 48px;
        padding: 0 16px;
        color: unquote("rgba(#{$color-black}, 0.87)");
        font-weight: normal;
        line-height: 48px;
        white-space: nowrap;
        cursor: pointer;
        &:hover,
        &:focus {
            background-color: #eee;
        }
    }
    >.selected {
        &,
        &:hover,
        &:focus {
            background-color: #eee;
        }
    }
    >.disabled {
        &,
        &:hover,
        &:focus {
            color: unquote("rgba(#{$color-black}, 0.26)");
            background-color: transparent;
            cursor: auto;
        }
    }
}