@import "../bootstrap/variables";

.text-lesson-hero {
    width: 100%;
    height: 320px;

    img {
        position: absolute;
        inset: 0;
    }

    &__mask {
        position: absolute;
        inset: 0;
        z-index: 1;
        background: linear-gradient(1deg, rgba(18, 31, 62, 0.9) 0%, rgba(18, 31, 62, 0) 100%);
        backdrop-filter: blur(8px);

        .dark-mode & {
            background: linear-gradient(1deg, rgba(170, 184, 197, 0.90) 0%, rgba(170, 184, 197, 0.00) 100%);
        }
    }
}

.text-lesson-header {
    top: -119px;
    margin-bottom: -119px;
    z-index: 5;

    &__mask {
        position: absolute;
        inset: 8px;
        bottom: -8px;
        border-radius: 32px;
        opacity: 0.5;
        background: var(--white);
        z-index: 1;
    }

    &__overlay-img {
        width: 280px;
        height: 280px;
        position: absolute;
        right: 16px;
        bottom: 16px;
        top: auto;

        @media (max-width: $screen-sm-max) {
            width: 140px;
            height: 140px;
            bottom: auto;
            top: 0;
        }

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

.text-lesson-contents {

    img, video {
        width: 100%;
        max-width: 100%;
        border-radius: 16px;
        margin-bottom: 16px;
    }

    h1, h2, h3, h4, h5, h6 {
        color: var(--dark);
        margin-bottom: 16px;
    }

    p {
        color: var(--gray-500);
        margin-bottom: 16px;
    }
}


.text-lesson-bottom-fixed-card {
    position: fixed;
    bottom: -150%;
    left: 0;
    right: 0;
    padding: 16px 0;
    box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.02);
    transition: all .5s ease;
    z-index: 50;

    @media (max-width: $screen-sm-max) {
        display: none !important;
    }

    &.show {
        bottom: 0;
    }

    &__course-img {
        width: 67px;
        height: 48px;
    }

    &__progress {
        position: fixed;
        bottom: 0;
        width: 100%;
        height: 2px;
        background-color: transparent;
        z-index: 55;

        .progress-line {
            width: 0;
            height: 100%;
            background-color: var(--primary);
        }
    }
}

.text-lesson-item {
    transition: all 0.2s ease;

    .mask-8-white {
        border: 1px dashed var(--gray-200);
        transition: all 0.2s ease;
    }

    &__card {
        background-color: var(--white);
        border: 1px solid var(--gray-200);
        transition: all 0.2s ease;

        &-number {
            display: inline-flex;
            justify-content: center;
            align-items: center;
            padding: 4px 8px;
            border-radius: 16px;
            background-color: var(--gray-100);
            font-size: 8px;
            color: var(--gray-500);
            transition: all 0.2s ease;
        }

        h3 {
            color: var(--dark);
            line-height: 21px;
        }

        &.view-full-lessons {
            color: var(--gray-500);
        }
    }

    &:hover &__card, &.is-current &__card {
        background-color: var(--primary);
        border: 1px solid var(--primary);

        h3 {
            color: var(--white);
        }

        &.view-full-lessons {
            color: var(--white);
        }
    }

    &:hover &__card-number, &.is-current &__card-number {
        background-color: rgba(255, 255, 255, 0.20);
        color: var(--white);
    }

    &:hover .mask-8-white, &.is-current .mask-8-white {
        border: 1px dashed var(--info);
    }
}
