// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
// 
//   http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

.book-toc {
    border-left: 1px solid var(--toc-border-color);
    flex: 0 0 22rem;

    h3 {
        font-size: 1rem;
        font-weight: 700;
        margin-bottom: 1.2rem;

        a {
            color: var(--toc-expand-font-color);
            text-align: right;
        }
    }

    li {
        font-size: 0.9rem;
        font-weight: 400;
        line-height: 1.2rem;
    }

    a {
        margin-bottom: 0.6rem;

        &:visited {
            color: var(--color-link);

            &:hover {
                color: var(--color-hover-link);
            }
        }
    }

    nav {
        top: 72px;
        width: 22rem;
        padding: 30px;
        height: calc(100vh - 72px);
        min-height: 20vh;
        position: sticky;
    }
}

.expand-toc  {
    padding: 20px;
    position: fixed;
    right: 0;

    a {
        background-color: var(--toc-collapse-background-color);
        color: var(--toc-collapse-font-color);
        font-size: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 20px;

        i {
            margin: auto;
        }

        &:hover {
            background-color: var(--toc-collapse-hover-background-color);
            color: var(--toc-collapse-hover-font-color);
            text-decoration: none;
        }
    }
}

.book-toc, .expand-toc {
    @media (max-width: 1200px) {
        // !important to override the style added by JS
        display: none !important;
    }
}
