// stylelint-disable declaration-no-important
//
// Right side table of contents
//
.sw-toc {
    @supports (position: sticky) {
        position: sticky;
        top: 4rem;
        height: calc(100vh - 4rem);
        overflow-y: auto;
    }
    order: 2;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    font-size: .875rem;
}

.section-nav {
    padding-left: 0;
    border-left: 1px solid #eee;
    ul {
        padding-left: 1rem;
        ul {
            display: none;
        }
    }
}

.toc-entry {
    display: block;
    a {
        display: block;
        padding: .125rem 1.5rem;
        color: #99979c;
        &:hover {
            color: $blue;
            text-decoration: none;
        }
    }
} //
// Left side navigation
//
.sw-sidebar {
    order: 0;
    background-color: $sw-bg;
    border-bottom: 1px solid rgba(0, 0, 0, .1);
    color: #fff;
    padding-right: 15px;
    padding-left: 15px;
    width: 280px;
    transition: all 0.3s;
    &.active { // Active
        min-width: 70px;
        max-width: 70px;
        text-align: center;
        .sw-toc-item {
            padding-top: 10px;
            padding-bottom: 10px;
            ul li a {
              padding-top: 5px;
              padding-bottom: 5px;
              padding-left: 0px;
              padding-right: 0px;
              border: 0;
              .oi{
                font-size: 0.8em;
                padding-top: 5px;
              }
            }
            .sw-toc-link {
                display: initial;
                padding: 0;
                text-align: center;
                font-size: 0.85em;
                text-indent: -9999px;
                span:first-child {
                    padding-right: 0;
                }
                
            }
            .text {
                display: none;
            }
            .sw-toc-link:hover {
                background-color: transparent;
            }
        }
        .sw-search {
            display: none !important;
        }
        a[aria-expanded="false"]::before,
        a[aria-expanded="true"]::before {
            top: auto;
            bottom: 5px;
            right: 50%;
            -webkit-transform: translateX(50%);
            -ms-transform: translateX(50%);
            transform: translateX(50%);
        }
        .oi {
            margin-right: 0;
            display: block;
            font-size: 1.5em;
            margin-bottom: 5px;
            padding-right: 0;
            text-indent: 0;
            background-color: transparent;
        }
    } // End sw-sidebar active
    .sw-toc-item {
        // &.active {
        //     margin-bottom: 1rem;
        //     &:not(:first-child) {
        //         margin-top: 1rem;
        //     }
        //     >.sw-toc-link {
        //         color: rgba(0, 0, 0, .85);
        //         &:hover {
        //             background-color: transparent;
        //         }
        //     }
        //     >.sw-sidenav {
        //         display: block;
        //     }
        // }
        ul li a {
            display: block;
            padding: .25rem 1.5rem;
            font-size: 90%;
            color: #fff;
            border-left: 4px solid transparent;
            padding-left: 2rem;
            .oi{
              margin-right: 5px;
            }
        }
        ul li a:hover {
            color: $color;
            text-decoration: none;
            background-color: rgba(0, 0, 0, 0.25);
        }
        ul .active a,
        ul .active:hover a {
            font-weight: 500;
            color: $color;
            background-color: transparent;
            border-left-color: $color;
        }
        .sw-toc-link {
            font-size: 1.1em;
            display: block;
            padding: .5rem 1.5rem;
            font-weight: 500;
            color: #fff;
            span:first-child {
                padding-right: 10px;
            } // All levels of nav
            &:hover {
                // color: rgba(0, 0, 0, .85);
                text-decoration: none;
                background-color: rgba(0, 0, 0, 0.25);
                color: #fff;
            }
        }
    }
    ul li.active>a,
    a[aria-expanded="true"] {
        color: #fff;
        /* background: #209e91; */
    }
    a[data-toggle="collapse"] {
        position: relative;
    }
    a[aria-expanded="false"]::before,
    a[aria-expanded="true"]::before {
        content: '\e036';
        display: block;
        position: absolute;
        right: 20px;
        font-size: 0.6em;
        margin-top: 0.3rem;
    }
    a[aria-expanded="true"]::before {
        content: '\e034';
    }
    @include media-breakpoint-up(md) {
        @supports (position: sticky) {
            position: sticky;
            top: 4rem;
            z-index: 1000;
            height: calc(100vh - 4rem);
        }
        border-right: 1px solid rgba(0, 0, 0, .1);
    }
    @include media-breakpoint-up(xl) {
        max-width: 250px;
    }
}

.sw-links {
    padding-top: 1rem;
    padding-bottom: 1rem;
    margin-right: -15px;
    margin-left: -15px;
    @include media-breakpoint-up(md) {
        @supports (position: sticky) {
            max-height: calc(100vh - 5rem);
            overflow-y: auto;
        }
    } // Override collapse behaviors
    @include media-breakpoint-up(md) {
        display: block !important;
    }
}

.sw-search {
    position: relative; // To contain the Algolia search
    padding: 1rem 15px;
    margin-right: -15px;
    margin-left: -15px;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
    .form-control:focus {
        border-color: $sw-black-bright;
        box-shadow: 0 0 0 3px rgba($sw-black-bright, .25);
    }
}

.sw-search-docs-toggle {
    line-height: 1;
    color: $gray-900;
}

.sw-sidenav {
    display: none;
    margin-left: 2rem;
}