//---- Book
//---- Module Activity

.path-mod-book .navtop,
.path-mod-book .navbottom
{
    border: 0!important;


    @include media-breakpoint-between(xs,md) {
        width: 100%;
    }

    a {
        width: auto;
        padding: .75rem 1.25rem;
        background-color: $gray-100;
        border-radius: $btn-border-radius;

        color: $gray-700;
        line-height: 1.2;

        &:only-of-type {
            margin-left: 0!important;
        }

        &:hover {
            text-decoration: none;
            background-color: var(--primary-color-100);
            color: var(--main-theme-color);
        }

        .icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: auto;

            font-size: $font-size-xs;
            line-height: 1.5;
        }

        &.bookexit {
            background-color: $red-100;
            color: $red-800;

            &:hover {
                background-color: $red-200;
            }
        }
    }

    &:after {
        display: none;
    }
}

        .path-mod-book .navtop {
            margin: 0 auto;
            display: flex;
            justify-content: space-between;

            position: sticky;
            top: 60px;
        }

        .path-mod-book .navbottom {
            //TODO: Temporrary disabled
            /*margin: 1rem 0 0;
            width: 100%;
            display: inline-flex;
            justify-content: flex-end;*/
            display: none;
        }


        .theme-dark.path-mod-book .navtop a,
        .theme-dark.path-mod-book .navbottom a {
            filter: invert(1);
        }


.bookprev {
    margin-right: .5rem;
    width: 50%;
    text-align: left;
}

.booknext {
    margin-left: .5rem;
}

.booknext,
.bookexit {
    width: 50%;
    text-align: right;
}


.block_book_toc {
    h5 {
        display: block!important;
        margin-bottom: 0.5rem;
    }
}

/* toc style INDENTED*/

.path-mod-book .book_toc ul {
    margin: 0;
}

.path-mod-book .book_toc li {
    margin-bottom: 0.25rem;

    a, strong {
        padding: 5px;
        margin: .1rem 0;
        display: block;
        border-radius: $btn-border-radius;
    }

    a {
        color: $body-color;

        &::after {
            display: none;
        }

        &:hover {
            background-color: $blue-100;
            text-decoration: none;
            color: $blue-600;
        }

    }

    strong {
        background-color: $gray-200;
        color: $gray-600;
    }

}

.theme-dark.path-mod-book .book_toc li {
    a {
        color: $dm-body-color;

        &:hover {
            background-color: $dm-gray-100;
            color: $dm-link-hover-color;
        }

    }

    strong {
        background-color: $dm-gray-200;
        color: $dm-body-color;
    }
}

#page-grade-report-overview-index .main-content,
.rui-book-wrapper,
.modal-in-page,
.book_content {
    background-color: $container-bg;
    padding: 30px!important;

    position: relative;

    border-width: 1px 2px 1px 2px;
    border-style: solid solid solid dashed;
    border-color: $gray-300 $gray-200 $gray-300 $gray-300;
    border-radius: $btn-border-radius;

    @include media-breakpoint-between(xs,sm) {
    padding: 10px!important;
    }

    &:before, &:after {
        content: '';

        width: 10px;
        height: 100%;

        position: absolute;
        top: 0;

        border-radius: $btn-border-radius;
        border-style: solid;
    }

    &:before {
        right: 4px;
        border-color: $gray-200;
        border-width: 0px 2px 0px 0px;
    }

    &:after {
        right: 1px;
        border-color: $gray-100;
        border-width: 0px 2px 0px 0px;
    }
}

        .theme-dark#page-enrol-index .main-content,
        .theme-dark#page-grade-report-overview-index .main-content,
        .theme-dark .rui-book-wrapper,
        .theme-dark .modal-in-page,
        .theme-dark .book_content {
            background-color: $dm-container-bg;
            border-color: $dm-gray-300 $dm-gray-300 $dm-gray-300 $dm-gray-300;

            &:before {
                border-color: $dm-gray-300;
            }

            &:after {
                border-color: $dm-gray-300;
            }
        }

        #page-grade-report-overview-index .main-content {
            .grade-navigation {
                width: auto;
            }
        }


.book_content {
    margin-bottom: 20px;

    .rui-title-container {
        margin-top: 0;
    }
    
    .rui-main-content-title--h3,
    .rui-main-content-title--h4 {
        width: auto!important;

        padding-top: .5rem;
        padding-left: 40px;
        padding-bottom: .5rem;
        padding-right: 1rem;

        margin: 0 0 1rem 0!important;

        background: $primary-color-100 url([[pix:theme|universe/icon-file-text]]) 13px no-repeat;
        background-size: 18px;
        border-radius: $btn-border-radius;
        font-family: $font-family-base;
        font-weight: $font-weight-medium;
        font-size: $font-size-sm;
        line-height: 1.3;
        color: $body-color;

        .theme-dark & {
            filter: invert(1);
            mix-blend-mode: luminosity;
        }
    }

    .rui-main-content-title--h4 {
        display: inline-flex;
        margin-left: .35rem!important;
    }
}



.book-tags {
    margin-top: $page-padding-global;
    margin-bottom: $page-padding-global;
    
    b {
        display: none;
    }
}


// Block
.block_book_toc {
    .action-list {
        .icon {
            font-size: 12px;
            display: inline-flex;
            align-items: center;
            justify-content: center;

            .theme-dark & {
                filter: invert(1);
            }
        }
    }
}

.path-mod-book .book_toc_numbered li {
    div {
        align-items: center;
    }

    ul li {
        a, strong {
            font-size: $font-size-xs;
            color: $body-color-secondary;

            .theme-dark & {color: $dm-body-color-secondary;}

            &::before {
                display: none;
            }
        }
    }
}

//active item
.path-mod-book .book_toc li strong {
    background-color: var(--primary-color-100);

    font-weight: $font-weight-medium;
    color: var(--main-theme-color);
}

.path-mod-book {
    .main-content {
        .rui-main-content-title {
            margin-bottom: 0;
            display: inline-flex;
            align-content: center;
            justify-content: space-between;
        }
    }
}