/* ================= DESKTOP TOC ================= */
.divi-toc--desktop{
  position:sticky;
  top:110px;
  max-height:calc(100vh - 170px);
  display:flex;
  flex-direction:column;
  background:#fff;
  border:1px solid #eee;
  border-radius:12px;
  margin:2px;	
}

/* head (НЕ скролиться) */
.divi-toc__head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:14px 16px;
  border-bottom:1px solid #eee;
  background:#fff;
  z-index:2;
  border-radius: 12px 12px 0 0;	
}

/* toggle */
.divi-toc__toggle{
  border:1px solid #eee;
  background:#fff;
  border-radius:8px;
  padding:5px 10px;
  font-size:13px;
  cursor:pointer;
}

/* body (СКРОЛИТЬСЯ) */
.divi-toc__body{
  flex:1 1 auto;
  overflow-y:auto;
  padding:12px 16px 12px 12px;
  overscroll-behavior:contain;
}

/* collapsed */
.divi-toc--collapsed .divi-toc__body{
  display:none;
}

/* list */
.divi-toc__list{
  list-style:none;
  margin:0;
  padding:0;
}
.divi-toc__list li{
  margin:6px 0;
}
.divi-toc__list li.level-h3{
  padding-left: 24px !important;
  opacity:.9;
}

.divi-toc__list a{
  text-decoration:none;
  color:inherit;
}
.divi-toc__list a.is-active{
  color:#2ea3f2;
  font-weight:600;
}

/* scrollbar */
.divi-toc__body::-webkit-scrollbar{
  width:6px;
}
.divi-toc__body::-webkit-scrollbar-thumb{
  background:rgba(0,0,0,.15);
  border-radius:6px;
}

/* ================= MOBILE ================= */
.divi-toc-mobile-btn{
  position:fixed;
 /* right:16px;*/
  bottom:16px;
  z-index:999;
  padding:12px 16px;
  border-radius:999px;
  background:#2ea3f2;
  color:#fff;
  border:none;
  display:none;
}

.divi-toc-mobile{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  display:none;
  z-index:1000;
}
.divi-toc-mobile.is-open{
  display:block;
}

.divi-toc-mobile__panel{
  position:absolute;
  left:12px;
  right:12px;
  bottom:72px;
  max-height:70vh;
  background:#fff;
  border-radius:16px;
  padding:16px;
  overflow-y:auto;
}

.divi-toc-mobile__head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}

/* responsive */
@media (max-width:980px){
  .divi-toc--desktop{ display:none; }
  .divi-toc-mobile-btn{ display:block; }
}
