.jsxc_right {
    text-align: right;
}

.jsxc_center {
    text-align: center;
}

.jsxc_sep {
    border-top: 1px solid $separator;
}

.jsxc_name {
    overflow: hidden;
    cursor: pointer;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.jsxc_maxWidth {
    max-width: 500px;
}

#jsxc_dialog {
    padding: 20px;
    min-width: 320px;
    max-width: 100%;
    display: inline-block;
    text-align: left;
    position: relative;
    background: #FFF;
    width: auto;
    border-radius: 5px;

    * {
        box-sizing: border-box;
    }

    ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    li {
        margin: 0;
        padding: 0;
    }

    p {
        margin-bottom: 1em;

        input {
            margin-bottom: 5px;
            width: 60%;
            outline: none;
        }

        input[type="submit"] {
            width: auto;
        }
    }

    hr {
        border: 0;
        border-top: 1px solid #eee;
        margin-top: 20px;
        margin-bottom: 20px;
    }

    h3 {
        font-size: 120%;
        font-weight: bold;
        margin-bottom: 10px;
        margin-top: 20px;
    }

    .jsxc_right {
        margin-top: 20px;
    }

    form {
        fieldset {
            margin-bottom: 30px;
            padding: 0px 30px;
            border: 1px solid #d9d9d9;

            h3 {
                font-size: 15px;
                color: #000;
                background-color: #f2f2f2;
                padding: 10px;
                margin: 0 -30px 10px -30px;
            }
        }

        /*&.col-sm-6:nth-child(odd) {
           clear: left;
        }*/
    }

    legend {
        border: 0;
        font-size: 20px;
    }

    input {
        outline: none;

        &:invalid {
            border: 1px solid $dialog_input_invalid;
        }
    }

    .btn-group button {
        margin-right: 0;
    }

    input[readonly] {
        background-color: $dialog_input_readonly_bg;
    }

    .jsxc_inputinfo {
        padding-left: 30%;
        font-style: italic;
        margin-top: -1em;
    }

    .jsxc_waiting {
        &:before {
            content: " ";
            width: 1em;
            height: 1em;
            display: inline-block;
            background-size: 100%;
            margin: 0 3px 0 0;
            background-image: image-url("loading.gif");
        }
    }

    .jsxc_libraries, .jsxc_credits {
        max-width: 300px;
    }
}

.jsxc_avatar {
    width: 36px;
    height: 36px;
    line-height: 36px;
    margin: 0px 5px;
    background-color: $avatar_bg;
    border-radius: 50%;
    float: left;
    text-align: center;
    font-weight: bold;
    font-size: 30px;
    color: $avatar_color;
    position: relative;
    font-family: $font_sans;
    background-size: cover;
    background-position: center center;

    img {
        display: block;
        width: 25px;
        height: 25px;
        position: absolute;
        top: 0;
        left: 0;
    }

    &:before {
        position: absolute;
        top: -2px;
        left: -6px;
        border: 2px solid $roster_bg;
    }
}

ul.jsxc_vCard {
    min-width: 400px;

    ul {
        margin-left: 20px;
    }

    li {
        cursor: default !important;
    }
}

/** Spot which is attached to xmpp: uris */
.jsxc_spot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    text-indent: -99999em;
    margin-top: 3px;
    margin-right: 5px;
    line-height: 100%;
    cursor: pointer;
    border: 1px solid $spot_border;
    background-color: $white;

    &:before {
        position: absolute;
    }

    &.jsxc_online, &.jsxc_chat, &.jsxc_away, &.jsxc_xa, &.jsxc_dnd, &.jsxc_offline {
        border: 0;
    }
}

.jsxc_unread {
    display: none;
}

.jsxc_unreadMsg {
    .jsxc_name {
        font-style: italic;
    }

    .jsxc_unread {
        display: block;
        background-color: $unread_bg;
        border-radius: 11px;
        color: $unread_color;
        font-size: 80%;
        padding: 2px;
        line-height: 15px;
        float: right;
        margin-right: 3px;
        margin-top: 4px;
    }
}

/** TODO: check if required */
.jsxc_list {
    .jsxc_inner {
        box-sizing: border-box;
        max-height: 0;
        transition: max-height 0.5s;
        overflow: hidden;
        visibility: hidden;
        position: absolute;
        bottom: 100%;
        left: 0;
    }

    &.jsxc_opened {
        .jsxc_inner {
            max-height: 1000px;
            visibility: visible;
            display: block;
        }
    }
}

#cboxWrapper {
    outline: none;
}

.jsxc_loading {
    margin: 0 auto;
    width: 32px;
    height: 32px;
    border: 0;
    background-size: 32px 32px !important;
    background: image-url("loading.gif");
}

/* @TODO: check */
#jsxc_loginForm input[type="submit"] {
    height: 34px;
    display: inline-block;
    padding: 6px 12px;
    margin-bottom: 0;
    font-size: 14px;
    font-weight: normal;
    line-height: 1.428571429;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    user-select: none;
    color: $white;
    background-color: $loginForm_bg;
    border-color: $loginForm_border;
}

.jsxc_oneway .jsxc_avatar {
    filter: grayscale(100%);
}

img.jsxc_vCard {
    float: right;
    max-width: 200px;
    max-height: 200px;
    border: 5px solid $white;
    border-radius: 2px;
}

.jsxc_alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;

    &.jsxc_alert-warning {
        color: #8a6d3b;
        background-color: #fcf8e3;
        border-color: #faebcc;
    }
}

.jsxc_btn {
    width: auto;
    min-width: 25px;
    display: inline-block;
    padding: 6px 12px;
    margin: 0px 2px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    background-image: none;
    border: 1px solid transparent;
    border-radius: 4px;

    &.jsxc_btn-default {
        border-color: #ccc;
        color: #555;
        background-color: rgba(240, 240, 240, 0.9);
    }

    &.jsxc_btn-primary {
        color: #fff;
        background-color: #337ab7;
        border-color: #2e6da4;
    }

    &[disabled], &[disabled]:hover {
        opacity: 0.65;
        cursor: not-allowed;
        color: #fff;
        background-color: #337ab7;
        border-color: #2e6da4;
    }
}

.jsxc_menu {
    display: none;
    position: absolute;
    background-color: #FFF;
    color: #333;
    border-radius: 3px 3px 3px 3px;
    z-index: 110;
    margin: 8px 2px 5px 10px;
    right: 0px;
    filter: drop-shadow(0px 0px 5px rgba(150, 150, 150, 0.75));
    padding: 4px 12px;
    padding-left: 5px;

    &:after {
        bottom: 100%;
        right: 6px;
        border: solid transparent;
        content: " ";
        height: 0;
        width: 0;
        position: absolute;
        pointer-events: none;
        border-color: rgba(238, 238, 238, 0);
        border-bottom-color: #fff;
        border-width: 10px;
    }

    &.jsxc_open {
        display: block;
    }

    ul {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    li {
        border: 0;
        cursor: auto;
    }

    a {
        color: #000;
        opacity: 0.5;
        white-space: nowrap;

        &:hover {
            text-decoration: none;
            opacity: 1.0;
        }

        &.jsxc_disabled {
            text-decoration: line-through;
            opacity: 0.5;

            &:hover {
                text-decoration: line-through;
                opacity: 0.5;
            }

            span {
                cursor: default;
            }
        }
    }

    .jsxc_icon {
        width: 16px;
        height: 16px;
        margin-right: 8px;
        display: inline-block;
        background-repeat: no-repeat;
        background-size: contain;
        background-position: center;
        vertical-align: sub;
    }
}

.jsxc_editicon {
    background-image: image-url("edit_black.svg");
}

.jsxc_deleteicon {
    background-image: image-url("delete_black.svg");
}

.jsxc_chaticon {
    background-image: image-url("speech_balloon_black.svg");
}

.jsxc_videoicon {
    background-image: image-url("camera_icon_black.svg");
}

.jsxc_infoicon {
    background-image: image-url("info_black.svg");
}

.jsxc_settingsicon {
    background-image: image-url("gear_black.svg");
}

.jsxc_helpicon {
    background-image: image-url("help_black.svg");
}

.jsxc_contacticon {
    background-image: image-url("contact_black.svg");
}

.jsxc_groupcontacticon {
    background-image: image-url("groupcontact_black.svg");
}

.jsxc_bookmarkicon {
    background-image: image-url("bookmark_black.svg");
}

.jsxc_more {
    float: right;
    width: 44px;
    height: 100%;
    cursor: pointer;
    background-image: image-url("more_black.svg");
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.4;

    &:hover {
        opacity: 1.0;
    }

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