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

#stm-lms-lessons {
    padding-top: 43px;
    min-height: 300px;
    .stm-curriculum-section {

    }

}

.stm-lms-course {
    &__overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(39, 48, 68, .5);
        opacity: 0;
        visibility: hidden;
        transition: .3s ease;
        z-index: 99;
    }
    &__curriculum {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 480px;
        max-width: 85%;
        transform: translateX(-50px);
        opacity: 0;
        visibility: hidden;
        background-color: $secondary_color;
        transition: .3s ease;
        z-index: 999;
        .stm-curriculum {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            padding: 0 30px 30px;
            overflow-y: auto;
            font-size: 15px;
            &-item {
                position: relative;
                padding-top: 10px;
                align-items: center;
                background-color: #fff;
                border-top: 3px solid #fff;
                text-decoration: none !important;
                &__title {
                    max-width: 55%;
                    font-weight: 400;
                    color: #273044;
                }
                &__icon {
                    top: 0;
                }
                &__meta {
                    margin-left: auto;
                    color: #aaaaaa;
                    font-size: 15px;
                }
                &__completed {
                    width: 20px;
                    height: 20px;
                    background-color: $secondary_color;
                    border-radius: 50%;
                    transition: .3s ease;
                    i {
                        display: none;
                    }
                    &.completed {
                        background-color: #17d292;
                        i {
                            display: block;
                            color: #fff;
                            font-size: 10px;
                            text-align: center;
                            line-height: 20px;
                        }
                    }
                }
                &:hover {
                    box-shadow: 0 5px 10px rgba(0, 0, 0, .18);
                    z-index: 90;
                    .stm-curriculum-item__completed:not(.completed) {
                        box-shadow: inset 0 4px 5px rgba(0, 0, 0, .18);
                    }
                }
            }
        }
    }
    &__content {
        font-size: 18px;
        line-height: 36px;
        h1 {
            margin: 0 0 45px;
        }
        h2 {
            margin: 0 0 30px;
            font-size: 36px;
            font-weight: 200;
        }
        h3 {
            margin: 0 0 25px;
        }
        h5 {
            margin: 0 0 30px;
        }
        ul {
            list-style: none;
            padding: 0;
            margin: 0 0 30px;
            li {
                position: relative;
                margin: 0 0 15px;
                padding-left: 26px;
                font-size: 14px;
                line-height: 16px;
                &:before {
                    content: '';
                    position: absolute;
                    top: 4px;
                    left: 2px;
                    width: 6px;
                    height: 6px;
                    background-color: $main_color;
                    border-radius: 50%;
                }
            }
        }
        table {
            margin: 0 0 55px;
            border-top: 5px solid #f0f4fa;
            tr {
                border: 0;
                th,
                td {
                    padding: 5px 15px 5px 0;
                    border: 0;
                    border-bottom: 1px solid #e5e5e5;
                    &:last-child {
                        padding-right: 0;
                    }
                }
                th {
                    font-size: 15px;
                }
                td {
                    font-size: 14px;
                }
            }
        }
    }
}

body {
    &.curriculum-opened {
        .stm-curriculum__close,
        .stm-lms-course__overlay,
        .stm-lms-course__curriculum {
            transform: translateX(0);
            opacity: 1;
            visibility: visible;
        }
    }
    &.lesson-sidebar-opened {
        .stm-lesson_sidebar__close,
        .stm-lms-course__overlay,
        .stm-lms-course__sidebar {
            transform: translateX(0);
            opacity: 1;
            visibility: visible;
        }
    }
}

.stm_lms_lesson_header__center {
    h5 > a {
        opacity: 1;
        font-weight: 600;
    }
}

.stm-lms-lesson_navigation {
    display: flex;
    margin: 30px 0 0;
    padding: 70px 30px 60px;
    border-top: 1px solid #dddddd;
    justify-content: space-between;
    &_side {
        width: 30%;
        a {
            position: relative;
            padding-left: 70px;
            min-height: 50px;
            display: block;
            text-decoration: none !important;
            span {
                display: block;
                font-size: 15px;
                color: #273044;
                font-weight: 600;
                &.stm_lms_section_text {
                    padding: 3px 0 0;
                    color: #273044;
                    font-weight: 400;
                }
            }
            i {
                position: absolute;
                left: 0;
                top: 0;
                display: block;
                width: 48px;
                height: 48px;
                line-height: 45px;
                text-indent: -1px;
                color: #273044;
                border: 2px solid #555d6d;
                border-radius: 50%;
                font-size: 19px;
                text-align: center;
                transition: .3s ease;
            }
            &:hover {
                i {
                    background-color: #273044;
                    color: #fff;
                }
            }
        }
    }
    &_next {
        text-align: right;
        a {
            padding-right: 70px;
            padding-left: 0;
            i {
                left: auto;
                right: 0;
                text-indent: 3px;
            }
        }
    }
    &_prev {

    }
    &_complete {
        width: 40%;
        text-align: center;
        span {
            top: 5px !important;
        }
    }
    &.completed {
        background-color: #17d292;
        a {
            i {
                border-color: #fff;
                color: #fff;
            }
            span {
                color: #fff;
            }
            &:hover {
                i {
                    background-color: #fff;
                    color: #273044;
                }
            }
        }
        .stm_lms_complete_lesson {
            background-color: #fff;
            cursor: default;
            span {
                color: #17d292;
            }
            &:after {
                display: none;
            }
            &:before {
                @include fa();
                content: "\f00c";
                border-color: #17d292;
                color: #17d292;
                line-height: 20px;
                font-size: 11px;
                text-indent: 1px;
            }
        }
    }
}

.stm_lms_complete_lesson {
    &.btn {
        padding: 18px 30px;
        border-radius: 30px;
        &:before {
            content: '';
            display: inline-block;
            margin: 0 10px 0 0;
            vertical-align: top;
            width: 24px;
            height: 24px;
            border: 2px solid #fff;
            border-radius: 50%;
        }
        span {
            position: relative;
            top: 1px;
            font-size: 15px;
        }
        &.completed {
            background-color: #fff !important;
        }
    }
}

.stm-curriculum-section {
    &__info {
        display: block;
        padding-left: 15px;
        span,
        h5 {
            transition: .3s ease;
        }
        span {

        }
        h5 {
            margin: 0;
        }
    }
    &__lessons {
        display: none;
        .stm-curriculum-item {
            &:hover {
                //border-top-color: $main_color;
            }
        }
    }
    &.opened {
        .stm-curriculum-section__lessons {
            display: block;
        }
    }
    .stm-curriculum-item__section {
        position: relative;
        border-top: 0;
        cursor: pointer;
        &:after {
            position: absolute;
            top: 20px;
            left: 10px;
            content: '';
            width: 0;
            height: 0;
            border-style: solid;
            border-width: 5px 4.5px 0 4.5px;
            border-color: $main_color transparent transparent transparent;
            transition: .3s ease;
        }
        &.opened,
        &:hover {
            background-color: $main_color;
            &:after {
                border-top-color: #fff;
            }
            h5,
            span {
                color: #fff;
            }
        }
    }
}

.stm-lesson_sidebar__close,
.stm-curriculum__close {
    position: absolute;
    top: 30px;
    right: -70px;
    width: 46px;
    height: 46px;
    line-height: 46px;
    text-align: center;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 26px;
    color: #fff;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-5px);
    transition: .3s .2s ease;
    &:hover {
        box-shadow: 0 5px 20px rgba(0, 0, 0, .18);
    }
}

.stm-lesson_sidebar__close {
    right: auto;
    left: -70px;
}

.stm-curriculum__title {
    margin: 40px 0 30px;
}



@media (min-width: 1025px) and (max-width: 1440px) {
    .stm_lms_lesson_header {
        .col-lg-2 {
            width: 25%;
        }
        .col-lg-8 {
            width: 50%;
            .col-md-push-2 {
                width: 100%;
                left: 0;
            }
        }
    }
}

@include breakpoint(tablet) {
    .stm-lms-lesson_navigation {
        flex-wrap: wrap;
    }
    .stm_lms_lesson_header .logo-unit {
        display: none;
    }
    .stm_lms_lesson_header .stm_lms_lesson_header__center {
        text-align: right;
    }
    .stm_lms_lesson_header__right {
        margin-top: 30px;
        justify-content: flex-start;
    }
    .stm-lms-curriculum-trigger {
        bottom: -58px;
    }
    .stm-lms-course__lesson-content {
        .stm_lms_result__round {
            position: static;
        }
        .stm-lms-single-answer__hint:hover {
            .stm-lms-single-answer__hint_text {
                left: auto;
                margin-right: 30px;
                right: 100%;
                &:after {
                    left: auto;
                    right: -12.5px;
                }
            }
        }
    }
}

@include breakpoint(tabletonly) {
    .stm-lms-lesson_navigation {
        flex-wrap: wrap;
        &_side {
            span {
                display: none !important;
            }
        }
    }
}

@include breakpoint(mobile) {
    .stm-lms-lesson_navigation_side {

    }
    .stm_lms_lesson_header .stm_lms_lesson_header__center {
        margin: 0px 0 0 20px;
        //text-align: left;
    }
    .stm-lms-lesson_navigation_complete {
        margin: 15px 0 0;
        width: 100%;
        order: 100;
        .btn {
            width: 100%;
        }
    }
    .stm-curriculum__close {
        right: -55px;
    }
    .stm_lms_lesson_header__right {
        padding-right: 0;
        .stm_lms_wishlist_button {
            margin-left: auto;
        }
    }
}