#jsxc_roster {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 200px;
    overflow: visible;
    border-left: 1px solid #e1e1e1;
    display: none;

    // border-left: 1px solid $roster_border_left;
    z-index: 80;
    margin-left: 10px;
    background-color: $roster_bg;

    a {
        cursor: pointer;
    }

    .slimScrollDiv {
        margin-bottom: 30px;
        z-index: 40;
    }

    .jsxc_wait {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 160px;
        padding: 20px;
        background-color: $white;
        z-index: 60;

        img {
            padding: 5px;
        }

        h3 {
            margin-bottom: 5px;
            font-size: 1.13em;
            font-weight: bold;
        }
    }

    input {
        position: absolute;
        margin: 0;
        height: 35px;
        padding: 7px 6px 5px;
        font-size: 13px;
        width: 145px;
        border: 1px solid #ddd;
        box-sizing: border-box;
        background-image: none;
        background-color: $roster_input_bg;
        border-radius: 3px;
        box-shadow: inner 0 0 5px $roster_input_shadow;
        outline: none;
    }

    p {
        color: $roster_color;
        padding: 10px;

        a {
            color: $roster_a;
            text-decoration: underline;
        }
    }

    .jsxc_avatar {
        position: relative;
        cursor: pointer;

        img {
            cursor: pointer;
        }
    }

    .jsxc_expand input {
        left: 51px;
        width: 137px;
    }

    &.jsxc_noConnection {
        .slimScrollDiv {
            display: none;
        }

        > .jsxc_bottom {
            display: none;
        }
    }

    &.jsxc_state_hidden {
        display: block;
        right: -200px;
        transition: right 0.5s;

        #jsxc_toggleRoster {
            &:before {
                transform: rotate(0deg);
            }
        }
    }

    &.jsxc_state_shown {
        display: block;
        right: 0;
        transition: right 0.5s;
    }

    > .jsxc_bottom {
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        line-height: 34px;
        background-color: $roster_bottom_bg;
        z-index: 50;
        padding-right: 4px;

        &:hover {
            background-color: $roster_bottom_bg_hover;
        }

        .jsxc_inner {
            width: 100%;
        }

        ul {
            padding: 0;
            margin: 0;
            width: 100%;
            border-top: 1px solid $roster_bottom_border_top;
            background-color: $roster_bottom_bg;

            li:last-child {
                border-bottom: 1px solid $roster_bottom_border_top;
            }
        }

        li {
            height: 44px;
            background-color: $roster_bottom_bg;
            color: $roster_bottom_color;
            cursor: pointer;
            width: 100%;
            padding-left: 44px;
            line-height: 44px;
            text-align: left;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            background-repeat: no-repeat;
            background-position: 15px center;
            background-size: 16px 16px;
            opacity: 0.8;

            &.jsxc_disabled {
                color: $roster_bottom_disabled;
                cursor: default;
            }

            &:hover:not(.jsxc_disabled) {
                color: $roster_bottom_color_hover;
                background-color: $roster_bottom_bg_hover;
            }

            &.jsxc_warning {
                background-color: $warning_bg;

                &:hover {
                    background-color: $warning_bg_hover;
                }
            }
        }

        > div > span {
            cursor: pointer;
        }
    }
}

#jsxc_toggleRoster {
    width: 14px;
    height: 100%;
    position: absolute;
    right: 100%;
    top: 0;
    z-index: 110;
    background-color: transparent;
    cursor: pointer;

    &:hover {
        background-color: $roster_toggle_hover;
    }

    &:before {
        content: " ";
        position: absolute;
        display: block;
        width: 0;
        top: 50%;
        right: 0;
        border-style: solid;
        border-width: 6px 4px 6px 0;
        border-color: transparent $roster_bg;
        transform: rotate(180deg);
    }
}

.jsxc_rosteritem {
    padding: 0;
    margin: 0;
    height: 44px;
    border-bottom: 1px solid $roster_bottom_border_top;
    cursor: pointer;
    width: 100%;
    position: relative;
    color: $roster_color;
    font-family: $font_sans;
    line-height: 44px;
    padding-left: 6px;
    padding-top: 4px;
    padding-bottom: 4px;
    box-sizing: border-box;

    &:hover {
        background-color: $roster_bg_hover;
    }

    &.jsxc_bookmarked {
        .jsxc_avatar:after {
            content: " ";
            width: 20%;
            height: 30%;
            position: absolute;
            top: 0;
            right: 2px;
            background-size: contain;
            background-repeat: no-repeat;
            background-image: image-url("bookmark_red.svg");
        }
    }
}

.jsxc_caption {
    padding-right: 30px;
    height: 100%;
    line-height: 100%;

    // padding-top: 4px;
    box-sizing: border-box;

    * {
        cursor: pointer;
    }

    .jsxc_name {
        height: 100%;
        line-height: 40px;

        .jsxc_min & {
            height: 50%;
            line-height: 20px;
        }

        .jsxc_rosteritem & {
            height: 50%;
            line-height: 20px;
        }
    }

    .jsxc_lastmsg {
        font-size: 12px;
        display: none;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;

        .jsxc_min & {
            display: block;
            height: 50%;
            line-height: 17.5px;
        }

        .jsxc_rosteritem & {
            display: block;
            height: 50%;
            line-height: 17.5px;
        }

        .jsxc_text {
            opacity: 0.6;
        }

        .jsxc_unread {
            line-height: 100%;
            font-size: 8px;
            color: #fff;
            text-align: center;
            display: none;
            height: 1em;
            width: 1em;
            border-radius: 50%;
            background-color: orange;
            vertical-align: top;
            margin: 0;
            float: none;

            .jsxc_unreadMsg & {
                display: inline-block !important;
            }
        }

        .jsxc_emoticon {
            vertical-align: middle;
        }
    }
}

#jsxc_avatar {
    cursor: default !important;
}

#jsxc_presence {
    cursor: pointer;
    padding-left: 2px;
    overflow: hidden;

    > span {
        opacity: 0.8;
    }

    li {
        position: relative;

        &:before {
            //  Presence indicator
            position: absolute;
            top: 50%;
            left: 10px;
            margin-top: -8px;
            border: 2px solid whitesmoke;
        }
    }
}

#jsxc_menu {
    height: 44px;
    width: 44px;
    cursor: pointer;
    float: right;
    text-align: center;

    &:hover > span {
        opacity: 1;
    }

    > span {
        opacity: 0.5;
        display: block;
        width: 100%;
        height: 100%;
        background-image: image-url("menu_black.svg");
        background-repeat: no-repeat;
        background-position: center 10px;
        background-size: 17px;
    }

    @media (min-width: 768px) {
        height: 30px;
        width: 30px;
    }
}

#jsxc_notice {
    height: 30px;
    width: 30px;
    float: right;
    text-align: center;
    line-height: 30px;

    span {
        background-color: $notice_bg;
        border-radius: 11px;
        color: $notice_color;
        font-size: 80%;
        padding: 2px;
        position: relative;
        animation: bounce 2s 1s infinite;
    }

    > span:empty {
        display: none;
    }
}
