.toc-wrapper {
  padding: 16px;
  background: #f8f9f9;
  border-radius: 8px;
  margin-bottom: 16px;
  max-width: 100%;
  width: 100%;
}
.toc-wrapper #toc {
  height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
}
.toc-wrapper #toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc-wrapper #toc ul li {
  margin-bottom: 8px;
  max-width: 95%;
  position: relative;
}
.toc-wrapper #toc ul li.has-children:after {
  position: absolute;
  right: -3px;
  content: url("../svg/arrow-right-toc.svg");
  top: -3px;
  filter: brightness(0) saturate(100%) invert(64%) sepia(16%) saturate(186%) hue-rotate(169deg) brightness(93%) contrast(91%);
}
.toc-wrapper #toc ul li.has-children.item-active > a {
  color: #614efa;
}
.toc-wrapper #toc ul li.has-children.item-active:after {
  filter: unset;
  transform: rotate(90deg);
}
.toc-wrapper #toc ul li.has-children ul {
  padding-left: 8px;
  display: none;
  visibility: hidden;
  position: absolute;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.toc-wrapper #toc ul li.has-children.item-active ul {
  display: block;
  opacity: 1;
  visibility: visible;
  position: relative;
}
.toc-wrapper #toc ul li ul li {
  margin-bottom: 0;
  margin-top: 8px;
}
.toc-wrapper #toc ul li ul li a {
  font-size: 16px;
  line-height: 28px;
}
.toc-wrapper #toc ul li a {
  font-size: 16px;
  line-height: 28px;
  font-weight: 400;
  color: #949da6;
  display: block;
  max-width: 98%;
}
.toc-wrapper #toc ul li a.active {
  color: #614efa;
  font-weight: 600;
}
.toc-wrapper #toc ul li a:hover {
  color: #576069;
  text-decoration: underline;
}
.toc-wrapper #toc::-webkit-scrollbar {
  width: 4px;
  background-color: #f2f3f4;
}
.toc-wrapper #toc::-webkit-scrollbar-thumb {
  background-color: #c3c8cd;
  border-radius: 10px;
}

.toc_opener {
  display: none;
}

@media screen and (max-width: 1024px) {
  .toc_opener {
    display: block;
    width: 100%;
    position: fixed;
    background-color: #f4f4f5;
    padding: 14px;
    top: 76px;
    z-index: 999;
    max-height: 100vh;
    overflow-y: scroll;
  }
  .toc_opener .container > a {
    display: block;
    width: 100%;
    background-image: url("../svg/arrow_down.svg");
    background-repeat: no-repeat;
    background-size: 16px;
    background-position: center right;
  }
  .toc_opener #toc_mobile {
    max-height: 0;
    height: auto;
    transition: max-height 0.2s ease-in;
    overflow: hidden;
  }
  .toc_opener #toc_mobile.open {
    max-height: 1000px;
  }
  .toc_opener #toc_mobile ul {
    list-style: none;
    margin: 14px 0 0;
    padding: 14px 0 0 0;
    border-top: 1px solid #c8c7d0;
  }
  .toc_opener #toc_mobile ul ul {
    border: unset;
    margin: 0;
    padding: 0;
  }
  .toc_opener #toc_mobile ul li {
    margin-bottom: 8px;
    max-width: 95%;
    position: relative;
  }
  .toc_opener #toc_mobile ul li.has-children:after {
    position: absolute;
    right: -3px;
    content: url("../svg/arrow-right-toc.svg");
    top: -3px;
    filter: brightness(0) saturate(100%) invert(64%) sepia(16%) saturate(186%) hue-rotate(169deg) brightness(93%) contrast(91%);
  }
  .toc_opener #toc_mobile ul li.has-children.item-active:after {
    filter: unset;
    transform: rotate(90deg);
  }
  .toc_opener #toc_mobile ul li ul {
    margin-top: 0;
    padding: 0 0 0 8px;
    display: none;
    visibility: hidden;
    position: absolute;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: unset;
  }
  .toc_opener #toc_mobile ul li ul li {
    margin-bottom: 0;
    margin-top: 8px;
  }
  .toc_opener #toc_mobile ul li ul li a {
    font-size: 11px;
    line-height: 28px;
  }
  .toc_opener #toc_mobile ul li.item-active ul {
    display: block;
    opacity: 1;
    visibility: visible;
    position: relative;
  }
  .toc_opener #toc_mobile ul li a {
    font-size: 14px;
    line-height: 28px;
    font-weight: 400;
    color: #949da6;
    display: block;
    max-width: 98%;
  }
  .toc_opener #toc_mobile ul li a.active {
    color: #614efa;
    font-weight: 600;
  }
  .toc_opener #toc_mobile ul li a:hover {
    color: #576069;
    text-decoration: underline;
  }
}