@import "../components/colors";
@import "../components/mixins";

.stm-lms-course__sidebar {
    position: fixed;
    width: 480px;
    max-width: 80%;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: $secondary_color;
    transform: translateX(40px);
    opacity: 0;
    visibility: hidden;
    z-index: 99;
    transition: .3s ease;
    &_toggle {
        position: absolute;
        right: 30px;
        top: 25px;
        font-size: 22px;
        width: 50px;
        height: 50px;
        line-height: 50px;
        background-color: #17d292;
        border-radius: 50%;
        text-align: center;
        color: #fff;
        cursor: pointer;
    }
    .stm_lms_lesson_comments {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 35px 30px 30px;
        overflow-y: auto;
    }
}

.stm_lms_lesson_comments__list {
    &_single {
        margin: 15px 0;
        padding: 15px;
        background-color: #fff;
        cursor: pointer;
        &.expanded {
            box-shadow: 0 5px 10px rgba(0,0,0,0.18);
        }
        p {
            margin-bottom: 0;
        }
        &__info {
            margin: 0 0 15px;
            > * {
                display: inline-block;
                color: #aaa;
                &:after {
                    position: relative;
                    top: 0;
                    content: "|";
                    margin: 0 10px;
                    color: #ddd;
                    font-size: 16px;
                }
                &:last-child {
                    &:after {
                        display: none;
                    }
                }
            }
            .stm_lms_lesson_comments__list_single__login {
                color: $main_color;
            }
        }
        &__text {
            margin: 0 0 10px;
            font-size: 16px;
            color: #273044;
            word-wrap: break-word;
        }
        &__replies_count {
            color: #aaaaaa;
            &:hover {
                color: #17d292;
            }
        }
        &__reply {
            textarea {
                padding: 12px 12px 6px !important;
                margin: 0 0 20px;
                min-height: 54px;
                resize: none;
                transition: .3s ease;
                background-color: #fff;
                border: 1px solid #ddd;
            }
            &.focused {
                margin-bottom: 30px;
                textarea {
                    min-height: 150px;
                }
            }
        }
        &_expanded {
            padding-top: 20px;
        }
    }
}

.stm_lms_lesson_comments__replies {
    .stm_lms_lesson_comments__reply {
        margin-bottom: 25px;
    }
}

.stm_lms_lesson_comments {
    &__top {
        margin: 0 0 25px;
        h3 {
            display: inline-block;
            margin: 12px 0 15px;
        }
        .btn {
            float: right;
        }
    }
    .stm_lms_btn_icon {
        .form-control {
            margin: 0 0 50px;
            background-color: #fff;
            border-color: #fff;
        }
        button {
            background-color: $main_color;
            color: #fff;
            outline: none !important;
        }
    }
    &__inner {
        display: block;
    }
    &__add {
        display: none;
        margin: 0 0 50px;
        margin: 0 0 40px;
        &_back {
            display: block;
            margin: 0 0 30px;
            text-align: center;
            border-bottom: 1px solid #cccdd0;
            i {
                display: block;
                margin: 0 auto;
                width: 50px;
                height: 50px;
                line-height: 50px;
                font-size: 23px;
                background-color: #17d292;
                border-radius: 50%;
                color: #fff;
            }
            span {
                display: block;
                margin: 15px 0 25px;
                color: #273044;
                opacity: .5;
                font-size: 15px;
                transition: .3s ease;
            }
            &:hover {
                span {
                    opacity: 1;
                }
            }
        }
        textarea {
            padding: 15px 20px !important;
            background-color: #fff;
            border-radius: 5px;
            &::-webkit-input-placeholder {
                opacity: .5;
                color: #273044;
            }
        }
    }
    &.addQuestion {
        .stm_lms_lesson_comments__inner {
            display: none;
        }
        .stm_lms_lesson_comments__add {
            display: block;
        }
    }
}

@include breakpoint(mobile) {
    .stm_lms_lesson_comments__top {
        .btn {
            float: none;
            display: block;
        }
    }
    .stm-lesson_sidebar__close {
        top: 80px;
        left: -52px;
    }
}