/**
 * 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.
 */
@import "colors";
@import "media";

.roadmap {
  margin-top: 40px;

  main {
    padding-left: 40px;
  }

  .breadcrumb {
    padding-bottom: 0;
    margin-bottom: 30px;
  }

  .breadcrumb-item {
    a {
      @extend .bodytext__medium--brownish-grey;
    }

    & + .breadcrumb-item {
      padding-left: 4px;

      &::before {
        color: map-get($colors, brownish-grey);
        padding-right: 0;
      }
    }
  }

  .td-sidebar {
    position: sticky;
    top: 163px;
    height: fit-content;
    max-height: calc(100vh - 163px);
    max-width: 270px;
    min-width: 270px;
    width: 100%;
    overflow-y: auto;
    padding-top: 12px;
    padding-left: 15px;
    padding-bottom: 30px;
    margin-left: 40px;
    background-color: #f9f9f9;
    border: none;

    &::-webkit-scrollbar {
      -webkit-appearance: none;
    }

    &::-webkit-scrollbar-thumb {
      border-radius: 8px;
      border: 2px solid white;
      background-color: rgba(0, 0, 0, .5);
    }

    &::-webkit-scrollbar:vertical {
      width: 9px;
    }

    &__inner {
      position: static;
      height: unset;
    }

    li > a {
      @extend .bodytext__medium--brownish-grey;
      width: fit-content;

      &.active {
        color: map-get($colors, cerulean-blue);
      }
    }

    nav > ul > li > a {
      @extend .subtitle__medium--greyish-brown;
    }

    .searchb-box {
      margin-bottom: 26px;

      .search-form {
        width: 100%;
      }
    }

    .toctree {
      li {
        list-style: none;
        font-family: "Roboto", sans-serif;
        font-size: 16px;
        font-weight: normal;
        font-stretch: normal;
        font-style: normal;
        line-height: 1.63;
        letter-spacing: normal;
        color: #707070;
      }

      ul {
        padding-left: 15px;
        display: none;
      }

      & > ul, li.current > ul {
        display: block;
      }

      .caption {
        font-family: "Roboto", sans-serif;
        font-size: 18px;
        font-weight: bold;
        font-stretch: normal;
        font-style: normal;
        line-height: 1.33;
        letter-spacing: normal;
        color: #51504f;
        padding-bottom: 13px;
        text-transform: uppercase;
        margin-bottom: 0;
      }

      .current {
        color: #017cee;
        font-weight: 500;

        & > a:not([href="#"]) {
          color: #017cee;
        }
      }

      a .toctree-expand {
        display: inline-block;
        position: relative;
        height: 1em;

        &::before {
          position: absolute;
          top: 6px;
          left: -12px;
          content: '►';
          font-size: 7px;
        }
      }

      .current > a > .toctree-expand:before {
        content: '▼';
      }
    }
  }

  .td-sidebar-nav__section {
    padding-right: 0;
  }

  .td-sidebar-nav > .td-sidebar-nav__section .td-sidebar-nav__section {
    list-style: none;
    position: relative;
    margin-left: 10px;

    &::before {
      content: '►';
      position: absolute;
      top: 6px;
      left: -12px;
      font-size: 8px;
      color: #51504f;
    }

    & > ul {
      display: none;
    }

    &.current-section {
      &::before {
        content: '▼';
      }

      & > ul {
        display: block;
      }
    }
  }

  .wy-nav-side-toc {
    position: sticky;
    top: 163px;
    overflow-x: hidden;
    overflow-y: auto;
    width: 280px;
    height: fit-content;
    max-height: calc(100vh - 163px);
    font-size: 14px;
    line-height: 1.43;

    &::-webkit-scrollbar {
      -webkit-appearance: none;
    }

    &::-webkit-scrollbar-thumb {
      border-radius: 8px;
      border: 2px solid white;
      background-color: rgba(0, 0, 0, .5);
    }

    &::-webkit-scrollbar:vertical {
      width: 9px;
    }

    ul, ol {
      padding: 0;
      list-style: none none;
    }

    li {
      list-style: none;
    }

    .wy-menu-vertical {
      & > ul, li.current > ul {
        padding-left: 1px;
      }

      a {
        display: inline-block;
        padding: .4045em 0;
        color: #707070;
      }

      li a {
        border-left: solid 2px #cbcbcb;
        padding-left: calc(1.25em + 1px);
      }

      li.current {
        margin-left: -1px;
      }

      li.current > a {
        border-left: solid 4px #017cee;
        color: #017cee;
      }

      li li > a {
        padding-left: 2.427em;
      }

      li li li > a {
        padding-left: 4.045em;
      }

      li li li li > a {
        padding-left: 5.663em;
      }
    }
  }

  @media (max-width: $tablet) {
    main {
      padding-left: 0;
    }

    .td-sidebar {
      position: static;
      background-color: transparent;
      padding: 0;
      margin: 0;
      max-width: unset;
      height: 530px;
    }
  }
}
