@use "../mixins/bem" as *;
@use "../mixins/function" as *;

/* 非叶子目录样式 */
@include b(subCatalogue) {
  width: 100%;
  margin-top: 1rem;
  margin-bottom: 1.8rem;

  @include e(title) {
    /* # 样式 */
    .anchor {
      color: getCssVar("theme-color");
      font-size: 0.85em;
      margin-left: -1em;
      padding-right: 0.38em;
      opacity: 0;

      &:hover {
        text-decoration: underline;
      }
    }
    span {
      font-size: 1.1rem;
    }
    &:hover {
      .anchor {
        opacity: 1;
      }
    }
  }

  @include e(inline) {
    margin-top: 0.7rem;
    margin-left: 1rem;

    /* 递归非叶子目录样式 */
    @include b(subCatalogue) {
      margin-bottom: 0;
    }
  }
}

/* 叶子目录样式 */
@include b(catalogueItem) {
  width: 48%;
  margin-bottom: 0.5rem;
  a {
    color: getCssVar("theme-color");
    &:hover {
      color: var(--vp-c-brand-1);
    }
  }

  @media (max-width: 768px) {
    width: 100%;
  }
}
