.sw25-om-toc {
  position: -webkit-sticky;
  position: sticky;
  top: 24px;
  z-index: 100;
  padding: 1rem 0 1.5rem 1rem;
  bottom: 10px;
  overflow-y: scroll;
  height: 90vh;

  &.hidden {
    display: none;
  }

  ul {
    margin: 0;
    padding: 0;

    li {
      list-style: none;
    }
  }

  .toc-headline {
    padding-bottom: 16px;
    font-family: "Archivo Black";
    font-size: 18px;
    line-height: 1.33;
    color: #584f4a;
  }

  #toc-list {
    display: flex;
    flex-direction: column;
    row-gap: 0.25rem;
    padding-right: 0.75rem;
    padding-left: 12px;
    overflow-y: scroll;
    scrollbar-width: none;
  }

  .toc-sub-list {
    padding-left: 12px;
    height: 0;
    overflow: hidden;
    transition: all 0.4s;

    &.show {
      height: auto;
    }
  }

  .toc-item,
  .toc-sub-item {
    box-sizing: border-box;
    border-bottom: solid #d9d9d3 1px;
    padding-bottom: 0.25rem;
    position: relative;

    &:last-child {
      border-bottom: 0;
      padding-bottom: 0;
    }

    a {
      font-family: "Roboto", san-serif;
      font-size: 14px;
      line-height: 1.43;
      color: #584f4a;
      /* display: flex; This may not be needed */
      gap: 12px;
      align-items: center;
      position: relative;

      &:hover {
        .toc-title {
          text-decoration: underline;
        }
      }

      &:active {
        .toc-title {
          color: #222;
          text-decoration: underline;
        }
      }

      &.active {
        .toc-num {
          background-color: #64a2ff;
        }
      }
    }

    .toc-title {
      min-width: 203px;

      &.mod {
        display: flex;
        gap: 0.25rem;
      }
    }
  }

  .toc-sub-item .active:after {
    content: "";
    position: absolute;
    right: calc(100% + 8px);
    top: 0;
    bottom: 0;
    width: 4px;
    background-image: linear-gradient(to bottom, #3fb9ff, #0066ff 103%);
    border-radius: 24px;
  }

  .toc-item .active:after,
  .child-active a:after {
    content: "";
    position: absolute;
    right: calc(100% + 8px);
    top: 0;
    bottom: 0;
    width: 4px;
    background-image: linear-gradient(to bottom, #3fb9ff, #0066ff 103%);
    border-radius: 24px;
  }

  .drop-down-icon {
    transform: rotate(90deg) translateX(3px);
    display: inline-block;
    position: relative;
    z-index: 3;
    cursor: pointer;
    height: 16px;

    &:after {
      position: absolute;
      content: "";
      width: 1px;
      height: 8px;
      bottom: 4px;
      right: 0;
      background-color: transparent;
    }

    &:hover::after {
      background-color: #06f;
    }

    &:active {
      svg path {
        stroke: #0044ab;
      }

      &::after {
        background-color: #0044ab;
      }
    }

    &.rotate {
      transform: rotate(-90deg) translateX(-3px);

      &:after {
        left: 0;
      }
    }

    svg {
      width: 16px;
      height: 16px;
    }
  }

  @media (max-width: 1400px) {
    .toc-item .toc-title {
      min-width: 150px;
    }
  }

  @media (max-width: 1024px) {
    display: none;
  }
}
