$breakpoint-sm: 767px;
$breakpoint-xs: 670px;
$breakpoint-xl: 1199px;
$breakpoint-lg: 991px;

// One-Page content width (set in Settings → Appearance → One-Page Layout).
// "full-width" keeps the historical stretch behaviour, so only "boxed" adds a cap.
.onepage_doc_area {
  &.ezd-onepage-boxed {
    .doc-container {
      max-width: 1320px;
      margin-left: auto;
      margin-right: auto;
    }
  }

  // Auto-numbered section prefix (e.g. "1.2.3"); colored from settings.
  .ezd-onepage-sec-no {
    margin-right: 6px;
  }
}

.container-fluid {
  &.pl-60 {
    padding-left: 60px;
  }

  &.pr-60 {
    padding-right: 60px;
  }
}

.onepage-doc-sec {
  .border_bottom {
    margin: 80px 0;
  }

  .doc-content {
    h4,
    h2 {
      font-size: 20px;
      font-weight: 500;
      margin-bottom: 25px;
    }
  }
}

@media screen and (max-width: 767px) {
  .eazydocs-next-prev-wrap {
    column-count: 1;
    display: block;

    .next-prev-pager {
      &.first,
      &.second {
        width: 100%;
        margin-bottom: 20px;
      }
    }
  }
}

/* Onepage */
.documentation_area_sticky {
  z-index: 99;
  background: #fff;
  left: 0;
  right: 0;

  .one-page-docs-sidebar-wrap {
    background: #182530;
    color: #fff;
    box-sizing: border-box;
    padding: 30px;
    overflow: auto;
  }
}

.single-onepage-docs {
  .doc-section {
    .shortcode_title {
      margin-bottom: 30px;
      border-bottom: 1px solid var(--black_50);
      padding-bottom: 0 !important;
      letter-spacing: 2px;
      margin-top: 0;

      h2,
      h3,
      h4 {
        padding: 10px 0 !important;
        margin: 0 !important;
      }

      h2 {
        font-size: 32px;
      }

      h3 {
        font-size: 26px;
      }

      h4 {
        font-size: 22px;
      }
    }
  }
}

.doc_documentation_area {
  &.documentation_area_sticky {
    .doc-section:first-child {
      .shortcode_title.doc-sec-title {
        margin-top: 0;
      }
    }
  }
}

.onepage-doc-sec {
  .doc-content {
    h4, h2 {
      font-size: 20px;
      font-weight: 500;
      margin-bottom: 25px;
    }
  }
}

#post {
  .onepage-doc-sec {
    padding-top: 60px;
    margin: 0;
  }
}

.nav_title {
  font-size: 16px;
  text-transform: uppercase;
  color: #fff;
  background: var(--ezd_brand_color);
  border-radius: 4px;
  line-height: 22px;
  padding: 13px 30px;
  margin-bottom: 0;
}


/** === Fullscreen layout === **/
.fullscreen-layout {
  nav.ezd-scroll.op-docs-sidebar {
    margin-left: -5px;
  }

  @media ( min-width: 991px ) {
    #post .doc-section {
      padding-top: 100px;
    }
  }

  .nav-sidebar.one-page-doc-nav-wrap .nav-item a {
    padding: 12px 15px;
  }

  .doc_rightsidebar {
    height: 100vh;
  }
}

.child-doc {
  .shortcode_title {
    border-left: 5px solid var(--ezd_brand_color);
    border-bottom: none;
    margin: 30px 0;
    padding-left: 20px;

    &.depth-two {
      background: rgba(214, 212, 212, 0.2);
    }
  }
}

@media screen and (min-width: 991px) {
  .documentation_area_sticky {
    .one-page-docs-sidebar-wrap {
      width: 24%;
      position: fixed;
      z-index: 1;
      left: 0;
      top: 0;
      bottom: 0;
      overflow: auto;
    }
  }
}

@media screen and (min-width: 768px) {
  .documentation_area_sticky {
    &.doc_documentation_area {
      padding-top: 0;
      position: absolute;
      top: 0;
      overflow-y: scroll;
      height: 100%;
    }

    &.fullscreen-layout.doc_documentation_area {
      padding-top: 0 !important;
      z-index: 111;
    }
  }
}

.documentation_area_sticky {
  .sticky-top {
    top: 48px;
  }

  .doc_rightsidebar {
    padding-top: 32px;
  }
}

@media screen and (max-width: 991px) {
  .admin-bar {
    .documentation_area_sticky {
      .doc_mobile_menu {
        .open_icon {
          top: 32px;
        }
      }
    }

    .documentation_area_sticky {
      .middle-content {
        padding-top: 32px;
      }

      .doc_documentation_area {
        &.documentation_area_sticky {
          .doc-section:first-child {
            .shortcode_title.doc-sec-title {
              margin-top: 42px;
            }
          }
        }
      }
    }
  }

  .doc_mobile_menu {
    .left-column, .doc_full_width & {
      max-width: 260px;
      width: 100%;
      left: -260px;
      position: absolute;
      z-index: 2;
      padding: 0;
    }

    .open_icon {
      display: block;
      right: -25px;
      left: auto;
    }
  }
}

@media screen and (min-width: 767px) {
  .documentation_area_sticky {
    .doc_rightsidebar {
      padding-top: 0;
    }
  }
}

@media screen and (max-width: 767px) {
  .admin-bar {
    .documentation_area_sticky {
      .open_icon,
      .doc_mobile_menu {
        .open_icon {
          top: 32px;
        }
      }
    }
  }

  .fullscreen-layout {
    .nav-sidebar {
      height: 100vh;
      overflow-y: scroll;
    }
  }

  .documentation_area_sticky {
    .one-page-docs-sidebar-wrap {
      padding: 1px;
    }
  }
}

body {
  &.admin-bar {
    .documentation_area_sticky {
      .one-page-docs-sidebar-wrap {
        top: 32px;
      }

      .doc_documentation_area {
        &.documentation_area_sticky {
          .doc-section:first-child {
            .shortcode_title.doc-sec-title {
              margin-top: 20px;
            }
          }
        }
      }

      .doc_rightsidebar {
        padding-top: 32px;
      }
    }
  }
  :not(.body_dark){
    .fullscreen-layout-onepage-sidebar{
      .nav-item{
        background: transparent;
        a {
          color: #fff;
        }
      &.active{
        background: #2A3D4B;
        a {
          color: #fff;
        }
        &.active{
          background-color: #2A3D4B;
          a{
            color: #fff;
          }
          .dropdown_nav{
            background: transparent;
          }
        }
      }
    }
    }
  }
}

.nav-sidebar .nav-item .docs-progress-bar {
    position: absolute;
    background: rgb(214 214 214 / 30%);
    bottom: 0;
    left: 0;
    top: 0;
    max-height: 44px;
}

.single-onepage-docs {
  .documentation_area_sticky {
    .one-page-docs-sidebar-wrap {
      img {
        display: block;
        max-width: 200px !important;
        height: auto !important;
        width: auto !important;
        max-height: 120px;
        margin: 10px;
      }
    }

    .nav-sidebar.one-page-doc-nav-wrap {
      .nav-item {
        background: transparent;

        .dropdown_nav {
          background: transparent;
          padding-top: 0;
          padding-bottom: 0;
        }

        a {
          color: #fff;
          opacity: .7;
        }

        &.active, &:hover {
          a {
            color: #f1f1f1;
            opacity: 1;
          }
        }
      }
    }

    .doc-title {
      color: var(--black__100);
      font-size: 22px;
      text-transform: none;
      margin: 25px 0 15px 10px;
    }
  }
}

.documentation_area_sticky {
  .nav-sidebar {
    .nav-item {
      .docs-progress-bar {
        background: rgb(214 212 212 / 20%);
      }

      &.active > a {
        background: transparent;
        opacity: 1;
      }

      .dropdown_nav {
        .nav-item {
          &.active a {
            background: transparent;
            color: #fff;
            font-weight: 500;
          }

          &:before {
            display: none;
          }

          &.active a {
            background: transparent;
          }
        }

        &:before {
          display: none;
        }
      }
    }
  }

  .documentation_info {
    padding: 0 40px;

    img {
      box-shadow: 0 0 10px 2px rgb(0 0 0 / 15%);
      margin: 10px 0;
      width: fit-content;
      max-width: 100%;
      height: auto;
    }
  }
}

.nav-sidebar.one-page-doc-nav-wrap {
  .nav-item {
    background: var(--black_25);
    margin: 3px 0 0;
    list-style: none;
    @media screen and (max-width: 991px) {
      margin-top: 0;
    }

    a {
      padding: 13px 20px;
      align-items: center;
      z-index: 2;
      position: relative;
    }

    .dropdown_nav {
      padding-left: 32px !important;
      position: relative;
      padding-top: 10px;
      padding-bottom: 10px;
      background: var(--bs-white);

      &.doc-last-depth {
        padding-bottom: 0;
      }

      &:before {
        content: "";
        width: 2px;
        bottom: 15px;
        background: var(--black_50);
        position: absolute;
        top: 15px;
        left: 20px;
      }

      .nav-item {
        background: transparent !important;
        padding: 0 22px;
        margin-bottom: 8px;

        &::before {
          content: "5";
          font-family: "ElegantIcons";
          color: var(--ezd_brand_color);
          position: absolute;
          left: 0;
        }

        a {
          display: inline-block;

          &.active {
            color: var(--ezd_brand_color);
          }
        }

        &.active {
          > a {
            color: var(--ezd_brand_color);
          }
        }
      }
    }
  }

  .active {
    .dropdown_nav {
      display: block;
      overflow-y: auto;
      max-height: 450px;

      &::-webkit-scrollbar {
        width: 8px;
      }

      &::-webkit-scrollbar-track {
        background: transparent;
      }

      &::-webkit-scrollbar-thumb {
        background: var(--black_200);
        border-radius: 30px;
      }
    }

    .icon {
      transform: none;
    }
  }
}

/* Onepage Button */
.docs-twice-btn-wrapper {
  margin: 20px 0;
  column-count: 2;
  display: flex;
  gap: 7px;

  a {
    display: inline-block;
    color: #fff;
    border: 3px solid #0194D7;
    background: #0194D7;
    line-height: 19px;
    padding: 12px 14px;
    letter-spacing: 0px;
    font-weight: bold;
    font-size: 13px;
    border-radius: 25px;
    text-transform: uppercase;
    text-decoration: none;

    &:hover {
      background: transparent;
    }

    &:last-child {
      background: #B11D8A;
      border-color: #B11D8A;

      &:hover {
        border-color: #B11D8A;
        color: #fff;
        background: transparent;
      }
    }
  }
}

.fullscreen-layout {
  &.onepage_doc_area {
    .middle-content {
      padding: 0;

      @media screen and (max-width: $breakpoint-sm) {
        padding: 0 15px;
      }
    }

    .nav-sidebar {
      &.one-page-doc-nav-wrap {
        .nav-item {
          &.active {
            background: #2A3D4B;

            ul {
              padding: 0 !important;
            }
          }

          ul {
            li {
              margin: 10px 0;

              &.nav-item {
                line-height: 27px;
                margin-bottom: 5px;

                &.active {
                  background: transparent;
                  opacity: 1;
                }
              }
            }
          }
        }
      }
    }
  }

  &.fullscreen-layout-onepage-sidebar {
    &.one-page-doc-nav-wrap {
      > .nav-item {
        > a {
          width: 80%;
        }

        > ul {
          overflow: hidden;
        }
      }
    }
  }

  .doc_rightsidebar .pageSideSection {
    padding-right: 10px;
  }

  .doc_right_mobile_menu {
    @media screen and (min-width: 768px) {
      position: fixed;
      right: 20px;
      width: 16%;
    }

    @media screen and (max-width: $breakpoint-sm) {
      position: fixed !important;
      z-index: 1;
      right: 0;
    }

    @media (max-width: $breakpoint-xs) {
      max-width: unset;
    }
  }
}

.admin-bar {
  .fullscreen-layout {
    .doc_right_mobile_menu,
    .doc_mobile_menu {
      @media screen and (max-width: $breakpoint-sm) {
        top: 32px;
      }
    }
  }
}

.onepage-doc-sec {
  figure {
    max-width: 100%;
  }
}

.nav-sidebar {
  &.one-page-doc-nav-wrap {
    .nav-item {
      .icon {
        right: 10px;
        position: absolute;
        top: 12px;
        font-size: 18px;
        transform: translateY(-50%);

        i.arrow_carrot-down {
          &:before {
            content: "\f543";
            font-family: dashicons;
          }
        }
      }

      &.active {
        .icon {
          i.arrow_carrot-down {
            &:before {
              content: "\f460";
              font-family: dashicons;
            }
          }
        }
      }
    }

    > .nav-item > .icon {
      top: 25px;
    }
  }
}

.onepage-doc-sec {
  .border_bottom {
    margin: 80px 0;
  }
}

// Gentle drift for the banner's decorative blobs.
@keyframes ezd-banner-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-14px, 16px, 0);
  }
}

/* =========================================================================
   Classic One-Page layout
   Modern sidebar navigation, readable active states, polished reading tools,
   and a working off-canvas drawer on mobile. Everything is scoped to
   .classic-onepage so the fullscreen layout is untouched.
   ========================================================================= */
.classic-onepage {

  .ezd-container-fluid {
    padding: 120px 50px;
  }

  .nav-sidebar.one-page-doc-nav-wrap .nav-item .icon {
    top: 50%;
  }
  #post .doc-section {
    padding-top: 0;
  }

  // ---- Page banner -------------------------------------------------------
  // Full-width hero at the very top of the page (sibling of the content grid).
  // The surface is a brand-tinted gradient layered with decorative blobs and a
  // faint grid so the page opens with a polished, graphical hero. It bleeds
  // edge-to-edge; the inner content is centred and padded to line up with the
  // grid below.
  .ezd-onepage-banner {
    // Customizable from Appearance → One-Page Layout → Page Banner. The admin
    // color options write these custom properties (and the title/excerpt colors)
    // onto the banner, so every visual knob has a sensible built-in default here.
    --ezd-banner-accent: var(--ezd_brand_color, #0870ff);
    --ezd-banner-gradient-end: #111a3a;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    width: 100vw;
    max-width: 100vw;
    margin-left: -50vw;
    left: 50%;
    right: auto;
    box-sizing: border-box;
    padding: 170px 0 80px;
    color: #fff;
    background:
      radial-gradient(120% 140% at 0% 0%, rgba(255, 255, 255, 0.18), transparent 55%),
      linear-gradient(135deg, var(--ezd-banner-accent) 0%, var(--ezd-banner-gradient-end) 100%);
    .ezd-onepage-banner-content {
      position: relative;
      z-index: 2;
      gap: 48px;
      max-width: 1320px;
      margin: 0 auto;
      padding: 0 50px;
    }

    .ezd-onepage-banner-main {
      flex: 1 1 auto;
      min-width: 0;
    }

    // ---- Stat metrics (right side) ----------------------------------------
    // Compact pill cards laid out in two columns: each is a fully-rounded chip
    // reading "[icon] value label" on a single line.
    // .ezd-list-unstyled (framework) handles list-style/left spacing; the grid
    // layout is banner-specific.
    .ezd-onepage-banner-stats {
      flex: 0 0 auto;
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      min-width: 300px;
      margin: 0;
    }

    // Flex + centering come from the framework utility classes on the <li>.
    .ezd-onepage-banner-stat {
      gap: 7px;
      padding: 7px 14px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.12);
      border: 1px solid rgba(255, 255, 255, 0.18);
      backdrop-filter: blur(6px);
      transition: transform 0.2s ease, background-color 0.2s ease;

      &:hover {
        transform: translateY(-2px);
        background: rgba(255, 255, 255, 0.18);
      }

      // The metric icon — slim and outline-like to match the reference.
      > i {
        flex: 0 0 auto;
        font-size: 17px;
        line-height: 1;
        color: rgba(255, 255, 255, 0.85);
      }
    }

    .ezd-onepage-banner-stat-value {
      font-size: 14px;
      font-weight: 700;
      color: #fff;
      white-space: nowrap;
    }

    .ezd-onepage-banner-stat-label {
      font-size: 12px;
      font-weight: 500;
      color: rgba(255, 255, 255, 0.78);
      white-space: nowrap;
    }

    // ---- Author avatars ----------------------------------------------------
    // .ezd-align-items-center (framework) centers the row; inline-flex is kept
    // so the avatar cluster sits inline with its label.
    .ezd-onepage-banner-avatars {
      display: inline-flex;
      flex: 0 0 auto;
    }

    .ezd-onepage-banner-avatar {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      object-fit: cover;
      border: 2px solid var(--ezd-banner-accent, #0870ff);
      box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);

      &:not(:first-child) {
        margin-left: -8px;
      }
    }

    // "+N" overflow chip styled to match the avatars.
    .ezd-onepage-banner-avatar-more {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      margin-left: -8px;
      font-size: 10px;
      font-weight: 700;
      color: #fff;
      background: rgba(0, 0, 0, 0.35);
    }

    // Soft floating blobs.
    .ezd-onepage-banner-shape {
      position: absolute;
      z-index: 0;
      border-radius: 50%;
      filter: blur(2px);
      pointer-events: none;

      &--one {
        top: -70px;
        right: -50px;
        width: 220px;
        height: 220px;
        background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.35), transparent 70%);
        animation: ezd-banner-float 9s ease-in-out infinite;
      }

      &--two {
        bottom: -90px;
        left: 20%;
        width: 180px;
        height: 180px;
        background: radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.22), transparent 70%);
        animation: ezd-banner-float 11s ease-in-out infinite reverse;
      }
    }

    // Faint dotted grid overlay for texture.
    .ezd-onepage-banner-grid {
      position: absolute;
      inset: 0;
      z-index: 1;
      background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
      background-size: 22px 22px;
      mask-image: linear-gradient(120deg, #000 0%, transparent 70%);
      -webkit-mask-image: linear-gradient(120deg, #000 0%, transparent 70%);
      pointer-events: none;
    }

    .ezd-onepage-banner-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 18px;
      padding: 6px 14px;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.4px;
      text-transform: uppercase;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.16);
      backdrop-filter: blur(4px);
      border: 1px solid rgba(255, 255, 255, 0.22);

      i {
        font-size: 15px;
      }
    }

    .ezd-onepage-banner-title {
      margin: 0 0 14px;
      font-size: 38px;
      line-height: 1.15;
      font-weight: 700;
      color: #fff;
    }

    .ezd-onepage-banner-excerpt {
      margin: 0;
      max-width: 60ch;
      font-size: 17px;
      line-height: 1.6;
      color: rgba(255, 255, 255, 0.82);
    }

    // Stack the columns once the two-up layout gets cramped; the stats keep
    // their two-column grid below the title/excerpt.
    @media (max-width: $breakpoint-lg) {
      .ezd-onepage-banner-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 28px;
      }

      .ezd-onepage-banner-stats {
        width: 100%;
        min-width: 0;
      }
    }

    @media (max-width: $breakpoint-sm) {

      .ezd-onepage-banner-content {
        padding: 0 24px;
      }

      .ezd-onepage-banner-title {
        font-size: 28px;
      }

      .ezd-onepage-banner-excerpt {
        font-size: 15px;
      }

      .ezd-onepage-banner-stats {
        grid-template-columns: 1fr;
      }
    }
  }

  // With a hero on top, the grid's generous top padding becomes a dead gap;
  // tighten it so the banner and first section sit closer together.
  &:has(.ezd-onepage-banner) .ezd-container-fluid {
    padding-top: 56px;
  }

  // Respect users who prefer reduced motion.
  @media (prefers-reduced-motion: reduce) {
    .ezd-onepage-banner .ezd-onepage-banner-shape {
      animation: none;
    }
  }

  // ---- Sidebar shell -----------------------------------------------------
  // The .left-column is already sticky (.ezd-sticky-lg-top: position: sticky,
  // top: 0, align-self: flex-start) so it hugs its content. We only need to
  // cap the wrap's height and let long menus scroll inside the sticky frame.
  .one-page-docs-sidebar-wrap {
    // Fallback so the sidebar looks finished even without the Pro colour
    // option; the option's inline style still overrides this when set.
    background: var(--ezd_brand_color, #0870ff);
    color: #fff;
    border-radius: 14px;
    padding: 15px 12px;
    box-shadow: var(--bs_md);
    box-sizing: border-box;

    @media (min-width: 992px) {
      max-height: calc(100vh - 40px);
      overflow-y: auto;
      overscroll-behavior: contain;

      // Subtle, on-brand scrollbar.
      scrollbar-width: thin;
      scrollbar-color: rgba(255, 255, 255, 0.35) transparent;

      &::-webkit-scrollbar {
        width: 8px;
      }

      &::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 30px;
      }

      &::-webkit-scrollbar-track {
        background: transparent;
      }
    }
  }

  // ---- Sidebar heading ---------------------------------------------------
  .nav_title {
    background: transparent;
    color: #fff;
    font-size: 15px;
    letter-spacing: 0.6px;
    padding: 8px 15px 14px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  }

  // ---- Navigation list ---------------------------------------------------
  // These selectors deliberately mirror the Pro "Navigation Sidebar" colour
  // settings (.single-onepage-docs .one-page-doc-nav-wrap …) in specificity —
  // `.nav-sidebar` is intentionally omitted so we never out-specify them. CSF
  // prints those settings later in <head>, so a configured colour always wins
  // and the values below are only the out-of-the-box appearance.
  .one-page-doc-nav-wrap {
    padding: 0;

    // Top-level section rows.
    .nav-item {
      background: transparent;
      margin: 3px 0;
      border-radius: 10px;

      > a {
        color: rgba(255, 255, 255, 0.92);
        border-radius: 10px;
        padding: 12px 12px;
        font-weight: 500;
        transition: background-color 0.2s ease, color 0.2s ease;
      }

      // Default hover (overridden by the "Menu Link Hover" setting).
      &:hover > a {
        color: #fff;
        background: rgba(255, 255, 255, 0.12);
      }

      .icon {
        color: rgba(255, 255, 255, 0.8);
      }

      // ---- Child (nested) list -------------------------------------------
      // Kept inside the parent `.nav-item` so these selectors reach the same
      // depth (0,6,1) as the framework's default brand-colour rule and win by
      // source order — otherwise the current child renders blue-on-blue.
      .dropdown_nav {
        background: transparent !important;
        padding-top: 10px;
        padding-bottom: 6px;

        // Vertical guide line linking the children to their section.
        &:before {
          background: rgba(255, 255, 255, 0.28);
        }

        .nav-item {
          // The ">" leader before each child.
          &:before {
            color: rgba(255, 255, 255, 0.55);
          }

          > a {
            color: rgba(255, 255, 255, 0.82);
            transition: color 0.2s ease;

            &:hover {
              color: #fff;
            }
          }

          // Current section: bright white + bold, no longer the unreadable
          // brand colour. Reinforced by a brighter leader caret.
          &.active {
            &:before {
              color: #fff;
            }

            > a {
              color: #fff;
              font-weight: 600;
            }
          }
        }
      }
    }

    // Open/active section header (top-level only). The highlight lives on the
    // row (the <a>), not the whole block, so the children below stay on the
    // solid sidebar colour at full contrast. The <li> stays transparent by
    // default but remains the target the "Active Item Background" overrides.
    > .nav-item.active {
      background: transparent;

      > a {
        color: #fff;
        font-weight: 600;
        background: rgba(255, 255, 255, 0.16);
      }
    }
  }

  // Scroll-progress fill behind the active section link.
  .nav-sidebar .nav-item .docs-progress-bar {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 9px;
    max-height: none;
  }

  // ---- Articles list (in-content section index) --------------------------
  .articles-list {
    .c_head {
      font-size: 15px;
      text-transform: uppercase;
      letter-spacing: 0.6px;
      color: var(--black_500);
      margin-bottom: 14px;
    }

    .article_list {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 10px;
      padding: 0;
      margin: 0;
      list-style: none;

      li {
        margin: 0;
      }

      a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 14px;
        border: 1px solid var(--border_on_white);
        border-radius: 10px;
        color: var(--black_700);
        text-decoration: none;
        transition: border-color 0.2s ease, background-color 0.2s ease,
          transform 0.2s ease;

        i {
          color: var(--ezd_brand_color);
          font-size: 18px;
          margin-right: 0;
        }

        &:hover {
          border-color: var(--ezd_brand_color);
          background: var(--ezd_brand_color_07);
          transform: translateY(-2px);
        }
      }
    }
  }

  // ---- Reading tools (font size + print) ---------------------------------
  #font-switcher {
    gap: 10px;
    flex-wrap: wrap;

    .btn-group {
      display: inline-flex;
      gap: 2px;
      padding: 4px;
      background: var(--black_50);
      border-radius: 11px;
    }

    button {
      border: 0;
      background: transparent;
      border-radius: 8px;
      padding: 7px 13px;
      font-weight: 600;
      line-height: 1;
      color: var(--black_600);
      cursor: pointer;
      transition: background-color 0.2s ease, color 0.2s ease;

      &:hover {
        background: var(--bs-white);
        color: var(--ezd_brand_color);
      }
    }

    .print {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 40px;
      height: 40px;
      border: 1px solid var(--border_on_white);
      border-radius: 10px;
      background: var(--bs-white);
      color: var(--black_600);
      cursor: pointer;
      transition: border-color 0.2s ease, color 0.2s ease,
        background-color 0.2s ease;

      i {
        font-size: 18px;
      }

      &:hover {
        border-color: var(--ezd_brand_color);
        background: var(--ezd_brand_color_07);
        color: var(--ezd_brand_color);
      }
    }
  }

  // ---- Mobile trigger + in-panel close (hidden on desktop) ---------------
  .ezd-classic-menu-trigger {
    display: none;
  }

  .ezd-sidebar-close {
    display: none;
  }

  // ---- Accessible focus styling ------------------------------------------
  .op-docs-sidebar a:focus-visible,
  #font-switcher button:focus-visible,
  .ezd-classic-menu-trigger:focus-visible,
  .ezd-sidebar-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
  }
}

/* ---- Classic layout: off-canvas drawer (mobile / tablet) --------------- */
@media (max-width: 991px) {
  .classic-onepage {
    // Floating button that opens the drawer; sits above content, always reachable.
    .ezd-classic-menu-trigger {
      display: inline-flex;
      align-items: center;
      gap: 9px;
      position: fixed;
      left: 16px;
      bottom: 22px;
      z-index: 1060;
      padding: 12px 18px;
      border: 0;
      border-radius: 30px;
      background: var(--ezd_brand_color, #0870ff);
      color: #fff;
      font-weight: 600;
      font-size: 14px;
      cursor: pointer;
      box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);

      // Stack the three bars into a hamburger glyph (the button itself is a
      // row of [glyph][label], so the bars need their own column wrapper).
      .ezd-bars {
        display: flex;
        flex-direction: column;
        gap: 3px;
      }

      .ezd-bar {
        display: block;
        width: 18px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
      }
    }

    // The drawer panel itself.
    .doc_mobile_menu.left-column {
      position: fixed;
      top: 0;
      bottom: 0;
      left: 0;
      width: 320px;
      max-width: 86vw;
      height: 100%;
      margin: 0;
      padding: 0;
      z-index: 1070;
      transform: translateX(-100%);
      transition: transform 0.3s ease;

      &.opened {
        transform: translateX(0);
      }
    }

    .one-page-docs-sidebar-wrap {
      position: relative;
      // The single-doc off-canvas styles (.left-column .doc_left_sidebarlist in
      // frontend.css) park this shared class at left: -330px and cap its width;
      // that pushed the classic drawer's contents off-screen so the panel slid
      // in empty. Reset the offset/size so it fills the fixed drawer instead.
      left: auto;
      right: auto;
      width: 100%;
      max-width: none;
      height: 100%;
      max-height: none;
      border-radius: 0;
      padding: 22px 18px;
      overflow-y: auto;
      box-shadow: none;
    }

    // In-panel close control, top-right.
    .ezd-sidebar-close {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      position: absolute;
      top: 14px;
      right: 14px;
      left: auto;
      width: 34px;
      height: 34px;
      padding: 0;
      border: 0;
      border-radius: 50%;
      // Dark translucent disc keeps the white "×" high-contrast on any sidebar
      // colour (a light/white disc washed the icon out).
      background: rgba(0, 0, 0, 0.22);
      color: #fff;
      font-size: 18px;
      cursor: pointer;
      z-index: 2;

      i {
        line-height: 1;
      }

      &:hover {
        background: rgba(0, 0, 0, 0.34);
      }
    }

    // Trim the wide 50px desktop side gutters on small screens so the reading
    // area gets the most width; the vertical rhythm is kept intact.
    .ezd-container-fluid {
      padding-left: 12px;
      padding-right: 12px;
    }

    // Tighter, symmetric reading padding on small screens (overrides the
    // wider desktop offsets). Compound class keeps it above the base rule.
    &.onepage_doc_area .middle-content {
      padding: 0 8px;
    }

    // Tools (right) sidebar toggle — a clean edge tab with a comfortable tap
    // target, instead of the tiny washed default poking out the side.
    .doc_right_mobile_menu .open_icon {
      width: 34px;
      height: 46px;
      line-height: 46px;
      left: -34px;
      background: var(--ezd_brand_color, #0870ff);
      color: #fff;
      border-radius: 12px 0 0 12px;
      box-shadow: -4px 4px 14px rgba(0, 0, 0, 0.18);
      font-size: 18px;

      &:hover {
        background: var(--ezd_brand_color, #0870ff);
        color: #fff;
      }
    }

    // Backdrop for the LEFT drawer only (scoped to .sidebar-open). The right
    // tools sidebar opens with the shared lower-z backdrop, so its panel is
    // never dimmed or covered by this full-screen overlay.
    &.sidebar-open .overlay_bg {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.5);
      opacity: 1;
      visibility: visible;
      z-index: 1065;
      transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    &.sidebar-open .ezd-classic-menu-trigger {
      opacity: 0;
      pointer-events: none;
    }
  }

  .admin-bar .classic-onepage .doc_mobile_menu.left-column {
    top: 46px;
  }

  // The classic section (.doc_documentation_area) carries `z-index: 0`, which
  // makes it a stacking context and traps the fixed off-canvas drawer inside
  // it. Any theme header with its own stacking order (e.g. Astra's #masthead at
  // z-index: 99, docy/docly's .header at 99) then paints over the top of the
  // drawer. While the drawer is open, lift the whole section — the actual
  // stacking-context root — above the header so the drawer and its backdrop
  // cover the full screen. (Stays under the WP admin bar at 99999.)
  body.ezd-onepage-drawer-open .classic-onepage {
    z-index: 9999;
  }
}

.single-onepage-docs {
  .doc_rightsidebar .pageSideSection {
    padding-left: 25px;
  }
  .nav-sidebar {
    > .nav-item.active {
      > .icon, .nav-link .icon {
        .icon_plus {
          display: none;
        }

        .icon_minus-06 {
          display: block;
        }
      }

      li.active {
        > .icon {
          .icon_plus {
            display: none;
          }

          .icon_minus-06 {
            display: block;
          }
        }
      }
    }
  }
}

@media (max-width: $breakpoint-xl) {
  .documentation_area_sticky {
    .one-page-docs-sidebar-wrap {
      width: 26%;
    }
  }

  .fullscreen-layout {
    .doc_right_mobile_menu {
      width: 20%;
    }
  }
}

@media screen and (max-width: $breakpoint-lg) {
  .fullscreen-layout {
    &.onepage_doc_area {
      .middle-content {
        padding: 0;
      }
    }

    &.doc_documentation_area {
      position: fixed;
      overflow: auto !important;
      top:  0;
      height: -webkit-fill-available;
      z-index: 11;
    }

    .doc_right_mobile_menu {
      width: 100% !important;
      right: 0;
    }

    .onepage_doc_area {
      &.fullscreen-layout {
        .doc_rightsidebar {
          margin-top: 0;
          max-width: 250px;
        }
      }
    }
  }

  .documentation_area_sticky {
    .documentation_info {
      padding: 0 25px;
    }

    .one-page-docs-sidebar-wrap {
      width: 100% !important;
    }
  }
}

.documentation_area_sticky.onepage_doc_area.fullscreen-layout{
  .ezd-grid-column-full.doc_mobile_menu.doc-sidebar {
    left: -300px;
    position: fixed;
    width: 300px;
    bottom: 0;
    margin: auto;
    transition: .3s all;
    background: #182530;
  }
  @media (min-width: 768px) {
    .ezd-md-col-9 {
        grid-column: default;
    }
  }
}

/* =========================================================================
   Relocated one-page styles
   Consolidated here from frontend/_doclist.scss and frontend.scss so every
   one-page layout rule lives in this file. All of these selectors are
   one-page-only (they hinge on .onepage_doc_area / .one-page-docs-sidebar-wrap
   / .default-layout-onepage-sidebar / the page-onepage template), and
   onepage.css is loaded wherever those exist, so behaviour is unchanged.
   ========================================================================= */

// Content column cap on the page-onepage.php page template.
.page-template-page-onepage #post {
  max-width: 1140px;
  margin: 0 auto;
}

// One-page sidebar wrapper: drop the shared doc-list divider/background and
// cap the size of a logo image placed in the sidebar.
.doc_left_sidebarlist.one-page-docs-sidebar-wrap {
  &:before {
    background: transparent;
    border-right: none;
  }

  img {
    max-width: 150px;
  }
}

// Sticky padding offsets for the one-page sidebars while the header is fixed.
.doc_documentation_area.body_fixed {
  .doc-sidebar {
    padding-top: 70px;
  }
}

body.admin-bar .doc_documentation_area.body_fixed {
  .doc_rightsidebar.one-page-docs-sidebar-wrap,
  .doc_left_sidebarlist.one-page-docs-sidebar-wrap {
    padding-top: 100px;
  }
}

.doc_documentation_area {
  &.onepage_doc_area {
    @media (min-width: 992px) {
      padding-top: 120px;
    }

    .doc_left_sidebarlist:after {
      display: none;
    }
  }
}

// Article/section index list — suppress the inherited list leader.
.one-page-docs-tag-list {
  li a:before {
    content: none !important;
  }
}

.onepage_doc_area {
  .documentation_body footer .border_bottom {
    margin-top: 100px;
  }

  .middle-content {
    padding: 0 25px 0 40px;
  }

  @media (min-width: 1441px) {
    .middle-content {
      padding-left: 0;
    }
  }
}

// Deepest nested dropdown in the classic (default-layout) sidebar.
.nav-sidebar.default-layout-onepage-sidebar {
  .nav-item .dropdown_nav .nav-item .dropdown_nav.doc-last-depth {
    display: block !important;
    padding-left: 4px !important;

    &::before {
      content: none !important;
    }

    .nav-item::before {
      left: 0 !important;
    }
  }
}
