
.api-doc-wrapper {
  display: flex;
  flex-wrap: wrap;
  position: relative;
  padding:80px 0;
}
.api-doc-inner-middle-main{margin-bottom:30px;}
.api-document-heading { padding:45px 20px; text-align:center; }
.api-doc-toc {
  width: 260px;
  position: sticky;
  display: flex;
  align-self: flex-start;
  height: auto;
  top: 100px;
  flex-direction:column;
}

.api-doc-content.api-content {
  width: calc(100% - 260px);
  padding-left: 55px;
}



ul.toc-list {
  list-style: none;
  padding-left: 0;
  width: 100%;
}

ul.toc-sub {
  list-style: none;
  padding-left: 0;
}

li.toc-item a {
  font-size: 15px;
  line-height: normal;
  display: inline-block;
  padding: 10px;
  width: 100%;
  border-radius: 12px;
  margin-bottom: 10px;
  color:#000;
  font-weight: 500;
}
li.toc-item a:hover, li.toc-item.active > a{
  background: hwb(207deg 10% 41% / 8%);
}
ul.toc-sub a {
  padding-left: 50px;
}

.api-doc-content-loop-main {
  padding-bottom: 20px;
  margin-bottom: 40px;
  border-bottom: 1px solid hwb(207deg 10% 41% / 15%);
}

.api-content-title h2, .api-content-title .h2 {
  font-size: 25px;
  line-height: 1.4;
  font-weight: 700;
  margin-bottom: 20px;
  padding: 0;
}
.api-content-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.api-doc-content-loop-main p {
  font-size: 15px;
  line-height: 1.3;
  margin-bottom: 20px;
  margin-top:0;
}
.api-doc-inner-method-desc p:first-child {
  margin: 0;
}
.api-doc-content-loop-main h4 {
  font-size: 15px;
  line-height: 1.3;
  font-weight: 700;
  margin-bottom: 20px;
}

.api-doc-content-loop-main h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: unset;
  margin-bottom: 20px;
}

.api-doc-content-loop-main pre {
  margin: 0;
  display: inline-block;
  width: 100%;
  height: auto;
  min-height: auto;
  margin-block: 0;
  background: hwb(207deg 10% 41% / 8%);
  padding: 10px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.api-doc-content-loop-main code {

  font-family: "Courier Prime", monospace;
  display: inline-block;
  height: auto;
  width: 100%;
  font-size: 15px;
  line-height: 1.3;
  font-weight:700;

}
.api-doc-content-loop-main ul, .api-doc-content-loop-main ol {
  margin-bottom:20px;
}
.api-doc-inner-query-para ul li {
  font-family: "Courier Prime", monospace;
  font-size: 15px;
  line-height: 1.17;
}

.key-generation ol li,.key-generation ul li {
  font-size: 15px;
  line-height: 1.3;
}

.api-document-heading h1 {
  font-size: 40px;
  font-weight: 300;
  letter-spacing: 0;
}

/* ---------- Desktop ---------- */
.toc-wrapper {
  position: relative;

}

.toc-toggle {
  display: none;
}
/* Hide close icon by default */
.toc-toggle .icon-close {
  display: none;
}

/* Active state (when menu opened) */
.toc-toggle.active .icon-open {
  display: none;
}
.toc-toggle.active .icon-close {
  display: inline-flex;
}


.api-doc-content-loop-main pre::-webkit-scrollbar-track
{
  -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
  border-radius: 15px;
  background-color: #F5F5F5;
}

.api-doc-content-loop-main pre::-webkit-scrollbar
{
  width: 2px;
  background-color: #F5F5F5;
  height: 5px;
}

.api-doc-content-loop-main pre::-webkit-scrollbar-thumb
{
  border-radius: 10px;
  set 0 0 6px rgba(0,0,0,.3);
  background-color: var(--primary_color);
}


@media ( max-width:1280px ){
  .api-doc-content.api-content {
    padding-left: 30px;
    width:calc(100% - 200px);
  }

  .api-doc-toc {
    width: 200px;
  }




}


@media ( max-width:991px ){
  .api-document-heading h1 {
    font-size: 35px;
  }

  .api-doc-content.api-content {
    width: 100%;
    padding-left: 0;
    margin-top:30px;
  }

  .api-doc-content-loop-main {
    margin-bottom: 25px;
    padding-bottom: 25px;
  }

  ul.toc-sub a {
    padding-left: 30px;
  }
  li.toc-item a { margin-bottom:0; }

  /* Make left TOC sticky under header */
  .api-doc-toc {
    position: sticky;
    top: 80px; /* Adjust to your header height */
    z-index: 999;
    background: #fff;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0;
    width:100%;
  }

  /* Show toggle bar */
  .toc-toggle {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    background: #0a67a2;
    color: #fff;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    cursor: pointer;
  }

  .toc-toggle-icon {
    font-size: 22px;
    line-height: 1;
    height:22px;
  }

  /* Hide TOC body by default */
  .toc-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-in-out;
    display: none;
/*      display: block !important; */
    padding: 12px 0;
    background: #fff;
    border-top: 1px solid #eee;
  }

  /* When open */
  .toc-container.open {
    display: block;
    height: 400px; 
    overflow: auto;
  }

  /* Improve spacing for mobile */
  .toc-list .toc-h2 > a {
    font-size: 15px;
  }
  .toc-sub .toc-h3 a {
    font-size: 14px;
  }
  
  .api-doc-wrapper { padding:50px 0; }
  
  /* Enhanced mobile scroll positioning */
  @media (max-width: 991px) and (max-height: 600px) {
    .api-doc-toc {
      top: 60px; /* Reduced top position for smaller screens */
    }
  }
  
  /* Smooth scroll behavior for mobile */
  @media (max-width: 991px) {
    html {
      scroll-padding-top: 100px; /* Native CSS scroll offset for mobile */
    }
    
    /* Ensure headings have proper spacing on mobile */
    .api-content-title h2, .api-content-title .h2 {
      scroll-margin-top: 100px; /* Additional scroll margin for headings */
    }
    
    .api-doc-inner-subtite h3 {
      scroll-margin-top: 100px; /* Additional scroll margin for sub-headings */
    }
  }
}