/* ===========================
   TOC — GREEN NEON FOR WALDENMILANO
=========================== */

/* можно просто добавить эту переменную к своим root-переменным */
:root {
  --tocMaxWidth: 1180px;
}

/* ===== Общая обёртка ===== */

.toc {
  background: transparent;
}

.toc.wrapper {
  width: min(var(--tocMaxWidth), 92vw);
  margin-inline: auto;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.toc .swiper {
  padding: 0 4px 16px !important;
  padding-top: 0 !important;
}

.toc .swiper-wrapper {
  padding-top: 18px;
  padding-bottom: 22px;
  justify-content: flex-start;
}

.toc .swiper-slide {
  width: fit-content;
}

/* Заголовок */
.toc h2 {
  white-space: nowrap;
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ===== Ссылки (неоновые таблетки) ===== */

.toc a {
  text-decoration: none;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--muted);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.2s ease;
  border: 1px solid rgba(186, 255, 79, 0.5);
  padding: 7px 18px;
  border-radius: 999px;
  background: radial-gradient(circle at 0 0, rgba(23, 45, 20, 0.9), #020309);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Hover / Focus — неоновый градиент белый → лайм → салатовый */
.toc a:hover,
.toc a:focus {
  color: #020309;
  background: linear-gradient(120deg, #ffffff, #baff4f, #8aff8a);
  background-size: 200%;
  border-color: transparent;
  transform: translateY(-1px);
}

/* Active — без доп. сдвига */
.toc a:active {
  transform: translateY(0);
}

/* Доступность */
.toc a:focus-visible {
  outline: 2px solid #baff4f;
  outline-offset: 2px;
  border-radius: 999px;
}

/* ===== Scrollbar ===== */

.toc-swiper {
  max-width: var(--tocMaxWidth);
  margin-inline: auto;
}

.toc-swiper .swiper-scrollbar {
  background: rgba(10, 16, 24, 0.9);
  height: 3px;
  border-radius: 999px;
}

.toc-swiper .swiper-scrollbar-drag {
  background: linear-gradient(120deg, #eaffc0, #baff4f, #8aff8a);
  border-radius: 999px;
}

/* выравнивание скроллбара по ширине контейнера */
.swiper-horizontal > .swiper-scrollbar,
.swiper-scrollbar.swiper-scrollbar-horizontal {
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

/* ===== Мобилка ===== */
@media screen and (max-width: 750px) {
  .toc.wrapper {
    width: min(100vw, 92vw);
  }

  .swiper-horizontal > .swiper-scrollbar,
  .swiper-scrollbar.swiper-scrollbar-horizontal {
    width: 92% !important;
    margin: 0 auto;
  }

  .toc .swiper-wrapper {
    padding-top: 14px;
    padding-bottom: 20px;
  }

  .toc a {
    font-size: 11px;
    padding: 7px 16px;
  }
}
