@import "../bootstrap/variables";

html {
    overflow: hidden;

    @media (max-width: var(--screen-sm-max)) {
        overflow-y: auto;
        overflow-x: hidden;
    }
}

body {
    height: 100vh;

    @media (max-width: var(--screen-sm-max)) {
        overflow-y: auto;
        overflow-x: hidden;
    }
}


.learning-page {
    width: 100%;
    height: 100vh;

    &__sidebar {
        width: 394px;
        height: 100vh;
        background-color: var(--white);
        overflow-x: hidden;
        overflow-y: auto;
        transition: all 0.4s cubic-bezier(0.43, 0.83, 0.54, 1.02), opacity .4s linear;
        z-index: 150;

        &-content {
            height: 100vh;
        }

        &-header {
            display: none;
            height: 68px;
            width: 100%;
            background-color: var(--white);
            align-items: center;
            justify-content: space-between;

            .learning-page__dropdown-menu {
                left: 0;
                right: auto;

                .rtl & {
                    left: auto;
                    right: 0;
                }
            }
        }

        &.show-drawer {
            right: 0;
        }

        @media (max-width: $screen-sm-max) {
            position: fixed;
            top: 0;
            bottom: 0;
            right: -110%;
            width: 100%;

            &-content {
                height: calc(100vh - 68px);
            }

            &-header {
                display: flex;
            }
        }

        .sidebar-teacher-icon {
            transform: rotate(20deg);
            opacity: 0.1;
        }

        .learning-progress {
            width: 100%;
            height: 8px;

            &__bar {
                width: 0;
                height: 4px;
            }
        }

        .sidebar-tabs {
            height: 45px;

            .navbar-item {
                color: var(--gray-500);

                &:before {
                    display: none;
                }

                &.active {
                    color: var(--black);
                    background-color: var(--white);
                }

                &:hover {
                    background-color: var(--white);
                }
            }
        }

        .sidebar-item-lock-icon {
            position: absolute;
            bottom: 8px;
            right: 8px;
            width: 16px;
            height: 16px;
            z-index: 6;

            .rtl & {
                right: auto;
                left: 8px;
            }
        }

        .sidebar-item-dot-separator {
            width: 4px;
            height: 4px;
        }

        .sidebar-content-item {
            background-color: var(--white);

            &.active {
                background-color: var(--gray-200);
            }
        }
    }

    &__main {
        width: calc(100% - 394px);
        height: 100vh;

        &-content {
            width: 100%;
            height: calc(100% - 71px);
            padding: 16px;
            background-color: var(--gray);
            transition: all .3s ease;
            overflow-x: hidden;
            overflow-y: auto;
        }

        @media (max-width: $screen-sm-max) {
            width: 100%;
        }
    }

    &__top-header {
        height: 71px;
    }

    &__file-player-card {
        position: relative;
        width: 100%;
        height: 87vh;
        border-radius: 12px;

        @media (max-width: $screen-sm-max) {
            height: 334px;
        }

        .file-player-button {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background-color: rgba(255, 255, 255, 0.30);
            border: 12px solid var(--white);
            backdrop-filter: blur(4px);
            transition: all .4s ease;

            .dark-mode & {
                background-color: rgba(30, 31, 38, 0.3);
            }
        }

        &:hover .file-player-button {
            transform: translate(-50%, -50%) scale(1.04);
        }

        .plyr.plyr--video {
            height: 100% !important;
            border-radius: 12px;
        }

        .vimeoFrame {
            height: 100% !important;
            padding-bottom: 0 !important;
            border-radius: 12px !important;

            .vimeoplayer {
                position: static !important;
                height: 100% !important;
            }
        }

        iframe, .h_iframe-aparat_embed_frame {
            width: 100%;
            height: 100%;
            border-radius: 12px;
        }

        .h_iframe-aparat_embed_frame > span {
            display: none !important;
        }
    }

    .has-personal-note-beep {
        position: absolute;
        top: 4px;
        right: 4px;
        width: 12px;
        height: 12px;
        border-radius: 500%;
        background-color: var(--primary);
    }

    &__forum-card {
        height: 189px;

        &-stats {
            width: 43%;
            min-width: 43%;
            height: 165px;
        }

        &-description {
            height: 105px;
            overflow: hidden;
        }

        @media (max-width: $screen-sm-max) {
            height: auto;

            &-stats {
                width: 100%;
                height: auto;
            }

            &-description {
                height: 64px;
            }
        }
    }

    &__forum-answer-card {
        height: 316px;

        &-user-info {
            width: 240px;
        }

        .answer-pined {
            position: absolute;
            top: 8px;
            right: 8px;

            .rtl & {
                right: auto;
                left: 8px;
            }
        }
    }

    &__related-forum-card {
        height: 88px;
    }

    &__line-separator {
        width: 1px;
        height: 24px;
        background-color: var(--gray-200);
    }
}

.learning-page-quiz-overview-center-line {
    width: 1px;
    height: 20px;
}

.learning-page-notify-counter {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    z-index: 2;

    .rtl {
        right: auto;
        left: 4px;
    }
}

.restricted-content-separator-dots {
    position: absolute;
    top: 52px;
    left: 24px;
    width: 1px;
    height: 24px;
    border-left: 1px dashed var(--gray-200);
    z-index: 3;
}

.learning-page-top-stat-box-120 {
    height: 120px;
}

.learning-page-assignment-history {
    height: 610px;

    .learning-page-assignment-history-left-side {
        width: 530px;

        @media (max-width: var(--screen-sm-max)) {
            width: 100%;
        }
    }

    .learning-page-assignment-history-right-side {
        width: calc(100% - 530px);

        @media (max-width: var(--screen-sm-max)) {
            width: 100%;
        }
    }

    .assignment-history-messages {
        height: 578px;
        overflow-y: auto;
        overflow-x: hidden;
    }
}

.course-completed-modal {

    .svg-around-avatar {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 139px;
        height: 136px;
        transform: translate(-50%, -50%);
        z-index: 1;
    }

    .svg-covered-modal-body {
        position: absolute;
        top: -32px;
        right: -28px;
        left: -46px;
        height: 262px;
        z-index: 1;
    }
}

.learning-page__dropdown {

    &:not(:hover) > .learning-page__dropdown-menu {
        visibility: hidden;
        opacity: 0;
        -webkit-transform: translateY(15px);
        -moz-transform: translateY(15px);
        -ms-transform: translateY(15px);
        -o-transform: translateY(15px);
        transform: translateY(15px);
    }


    &-menu {
        position: absolute;
        top: 40px;
        right: 0;
        width: 260px;
        background: var(--white);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
        border-radius: 10px;
        transition: all 0.3s ease;
        z-index: 46;

        .rtl & {
            right: auto;
            left: 0;
        }

        &__item {
            & > a {
                color: var(--gray-500);
                transition: all .3s ease;
            }

            .rtl & {
                border-left: none;
                border-right: 2px solid transparent;

                &.active {
                    border-left: none;
                    border-right: 2px solid var(--primary);
                }
            }

            &:hover {
                background-color: var(--gray-100);

                & > a {
                    color: var(--primary);
                    transform: translateX(8px);
                }
            }
        }
    }

}
