/* ========================================
   Custom Table of Contents (bake-toc)
   Matching GameDetailToc design
   ======================================== */


.bake-toc-container {
  position: relative;
  @media (min-width: 1024px) {
    position: sticky;
    top: calc(var(--nav-height) + var(--breadcrumbs-height) + 1rem);
  }
}

.bake-toc {
  line-height: 1.2;
  position: relative;
  z-index: 0;
  padding: 7.75rem 2.5rem 2.5rem;

  /* Border image background */
  .bake-toc__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    border-image: url("/assets/game-detail/toc-border.webp") 80 fill / 5rem
      stretch;
  }

  /* Title */
  .bake-toc__title {
    position: absolute;
    top: 0;
    left: 0;
    background: url("/assets/game-detail/toc-title.webp") no-repeat;
    background-size: 100% 100%;
    color: #fff;
    font-weight: 800;
    font-size: 2.5rem;
    padding: 1.5rem 6rem 1.5rem 2rem;
    margin-top: 0;
  }

  /* Decoration image */
  /* .bake-toc__deco {
    position: absolute;
    bottom: 0;
    right: -2.125rem;
    width: 12.375rem;
    height: 18.5625rem;
    pointer-events: none;
  } */
}

/* --- Inline TOC (mobile, in-content) --- */
.bake-toc-container--inline {
  margin: 3.75rem 0 1.875rem;
}

/* --- Sidebar TOC (PC) --- */
.bake-toc--sidebar {
  .bake-toc__title {
    color: #fff;
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: 1.5rem;
  }

  .bake-toc__list {
    gap: 1.25rem;
    padding-left: 0 !important;
  }

  .bake-toc__item {
    font-size: 1.25rem;
    font-weight: 600;
    @media (min-width: 768px) {
      font-size: 1.25rem;
    }
  }

  .bake-toc__item--level-3 {
    padding-left: 1rem;
  }

  .bake-toc__link {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s;

    /* &:hover,
    &.is-active {
      color: #39ff24;
    } */
  }

  .bake-toc__text {
    text-decoration: underline;
  }

  .bake-toc__number {
    font-size: 0.875rem;
    line-height: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
  }

  .bake-toc__item--level-3 .bake-toc__number {
    font-size: 0.75rem;
    min-width: 1.25rem;
    padding: 0 0.25rem;
  }
}

/* --- Shared styles --- */
.bake-toc__list {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.bake-toc__item {
  font-weight: 700;
  font-size: 1.625rem;
  list-style: none !important;
}

.bake-toc__item--level-3 {
  padding-left: 1rem;
  font-size: 1.375rem;
}

.bake-toc__link {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: start;
}

.bake-toc__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.2rem;
  flex-shrink: 0;
  margin-right: 1rem;
  background: linear-gradient(to bottom, #6943be, #c03ec0);
  border-radius: 624.9375rem;
  text-align: center;
  font-size: 1.25rem;
  line-height: 1.5rem;
  color: #fff;
  font-weight: 700;
  width: 2rem;
  height: 2rem;
  min-width: 1.5rem;
  @media (min-width:1024px) {
    width: 1.5rem;
    height: 1.5rem;
  }
}

.bake-toc__item--level-3 .bake-toc__number {
  font-size: 1rem;
  width: auto;
  min-width: 1.5rem;
  padding: 0 0.375rem;
}

.bake-toc__text {
  /* text-decoration: underline; */
  font-weight: 600;
  font-size: 1.5rem;
  color: #fff;
}

/* --- Responsive: show/hide --- */
.bake-toc--sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .bake-toc-container--inline {
    display: none;
  }

  .bake-toc-container--sidebar {
    display: block;
  }

  aside#secondary {
    position: relative;
    top: 0;
  }
}
