/* Ensure the off-canvas sidebar is forced visible above the overlay when
  the open class is applied — this counters any site styles that might
  otherwise hide or transform the sidebar on very small viewports. */
/* Documentation layout - sidebar outside, content matches site layout */
body.has-doc-fixed-sidebar {
  background: #fff;
}

/* The doc-layout now simply wraps the centered content; sidebar is fixed separately */
.doc-layout {
  margin: 0 auto;
  padding: 0;
  background: #fff;
}

/* Breadcrumb styles - ensure consistent appearance across pages */
.breadcrumb {
  max-width: var(--maxw);
  margin: 12px auto 18px;
  padding: 0 20px;
  color: var(--text-dim);
  font-size: 14px;
}

.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.breadcrumb li {
  display: flex;
  align-items: center;
}

.breadcrumb li+li:before {
  content: '›';
  margin: 0 8px;
  color: var(--text-dim);
  font-weight: 500;
}

.breadcrumb a {
  color: var(--brand-blue);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb [aria-current="page"] {
  color: var(--text);
  font-weight: 600;
}

/* High-specificity header submenu overrides to avoid accidental global overrides */
.site-header nav .submenu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 300px;
  background: #fff;
  border: 1px solid #e9eef3;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
  padding: 0;
  display: none;
  z-index: 120;
  /* above other page layers */
}

.site-header nav .submenu li {
  margin: 0;
}

.site-header nav .submenu a {
  display: block;
  padding: 8px 16px;
  color: var(--text);
  text-decoration: none;
}

@media (min-width: 641px) {

  .site-header .has-submenu:hover>.submenu,
  .site-header .has-submenu:focus-within>.submenu,
  .site-header .has-submenu>.submenu:hover {
    display: block;
  }
}

/* Ensure dropdown aligns with its parent menu item instead of the left page edge */
.site-header .has-submenu {
  position: relative;
}

.site-header .has-submenu>.submenu {
  left: 0;
  /* default: align to left edge of parent */
  right: auto;
}

#product-subnav-container {
  border-bottom: 1px solid #e1e4e8;
}

/* Product subnav: center and align with content/breadcrumb */
.product-subnav {
  max-width: var(--maxw);
  margin: 0 auto 0px;
  padding: 0 15px;
  display: flex;
  gap: 18px;
  align-items: center;


}

.product-subnav a {
  color: var(--text);
  text-decoration: none;
  padding: 6px 8px;
}


.doc-sidebar {
  /* Visible and styled to match the site's tone */
  display: block !important;
  position: fixed;
  left: 0;
  top: var(--doc-top, 97px);
  bottom: 0;
  width: 300px;
  overflow: auto;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border-right: 1px solid #e9eef3;
  padding: 0px 20px;
  z-index: 6;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  border-radius: 0 8px 8px 0;
  font: 500 15px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Inter, Helvetica, Arial, sans-serif;
  color: var(--text);
  transition: box-shadow 0.18s ease, transform 0.12s ease;
}

/* Reserve space so the fixed sidebar never overlaps the centered content */
body.has-doc-fixed-sidebar .doc-layout {
  /* keep content centered when there's room; otherwise guarantee 300px left gutter */
  margin-left: max(calc((100% - var(--maxw)) / 2), 300px);
  margin-right: auto;
}

.doc-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: 0;
}

.doc-sidebar>ul>li {
  margin: 0 0 6px 0;

}

.doc-sidebar li {
  margin: 0;
}

.doc-sidebar a {
  display: block;
  padding: 8px 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.2;
  transition: background-color 0.12s ease, color 0.12s ease, transform 0.08s ease;
}

.doc-sidebar a:hover,
.doc-sidebar a:focus {
  background: #f1f5f9;
  color: var(--brand-blue);
  border-radius: 0;
  outline: none;
}

.doc-sidebar a:focus-visible {
  box-shadow: 0 0 0 3px rgba(12, 98, 166, 0.12);
}

.doc-sidebar a.active {
  background: linear-gradient(90deg, rgba(3, 102, 214, 0.10), rgba(3, 102, 214, 0.03));
  color: var(--brand-blue);
  font-weight: 700;
  border-radius: 0;
  box-shadow: inset 4px 0 0 var(--brand-blue);
  padding-left: 8px;
  /* visually align with inset indicator */
}

/* Category headers in sidebar */
.doc-sidebar .category-label {
  font-weight: 700;
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 18px 0 8px 6px;
  display: block;
}

.doc-sidebar ul {
  display: block;
}

/* Nested items */
.doc-sidebar ul ul {
  padding-left: 16px;
}

.doc-sidebar ul li ul {
  gap: 2px;
  display: block;

}

.doc-sidebar ul ul a {
  font-size: 14px;
  padding: 6px 10px;
  color: var(--text-dim);
  display: block;
}



/* Responsive: off-canvas sidebar for smaller viewports
   On narrow screens the sidebar is hidden by default and can be opened
   via a small toggle button. An overlay is shown while open to focus
   attention and capture clicks to dismiss. This keeps the article
   content uncluttered on mobile while preserving the full sidebar.
*/
@media (max-width: 1000px) {

  /* Off-canvas hidden state (default) */
  .doc-sidebar {
    position: fixed;
    left: -320px;
    /* hidden offscreen */
    top: var(--doc-top, 97px);
    bottom: 0;
    width: 300px;
    height: calc(100% - var(--doc-top, 97px));
    overflow: auto;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border-right: 1px solid #e9eef3;
    border-radius: 0 8px 8px 0;
    padding: 18px 12px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    transition: left .22s cubic-bezier(.2, .9, .2, 1);
    z-index: 80;
  }

  /* When open, slide into view */
  body.doc-sidebar-open .doc-sidebar {
    left: 0;
  }

  /* Ensure the off-canvas sidebar is forced visible above the overlay when
     the open class is applied — this counters any site styles that might
     otherwise hide or transform the sidebar on very small viewports. */
  @media (max-width: 1000px) {
    body.doc-sidebar-open .doc-sidebar {
      left: 0 !important;
      transform: none !important;
      z-index: 99999 !important;
      display: block !important;
      visibility: visible !important;
      opacity: 1 !important;
      pointer-events: auto !important;
      box-shadow: 0 12px 30px rgba(15,23,42,0.18) !important;
    }

    body.doc-sidebar-open .doc-sidebar-overlay {
      z-index: 99998 !important;
      display: block !important;
      opacity: 1 !important;
      pointer-events: auto !important;
    }
  }

  /* Overlay that appears behind the sidebar */
  .doc-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    z-index: 70;
    opacity: 0;
    transition: opacity .18s ease;
  }

  body.doc-sidebar-open .doc-sidebar-overlay {
    display: block;
    opacity: 1;
  }

  /* Toggle button (appears in top-right of content area) */
  .doc-sidebar-toggle {
    position: fixed;
    right: 16px;
    top: 120px;
    z-index: 90;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-blue);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(3, 102, 214, 0.15);
  }

  /* Ensure content margin is reset on small screens */
  body.has-doc-fixed-sidebar .doc-layout {
    margin-left: 0;
  }

  /* Sidebar list layout: vertical stack */
  .doc-sidebar ul {
    display: block;
  }

  .doc-sidebar ul li {
    display: block;
  }

  .doc-sidebar ul ul {
    padding-left: 12px;
  }

  .doc-sidebar a {
    display: block;
    padding: 10px 12px;
  }
}

/* Main content: use standard site centering via .content; no special layout math */
.doc-content {
  min-width: 0;
  background: #fff;
}

/* Actual content - matches .content class exactly */
.doc-content>.doc-article {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px 60px;
  color: var(--text-dim);
  font: 400 16px/1.6 system-ui, -apple-system, Segoe UI, Roboto, Inter, Helvetica, Arial, sans-serif;
}

.doc-article {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
}

.doc-article h1 {
  font-size: 32px;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e1e4e8;
  color: var(--text);
  font-weight: 700;
}

.doc-article h2 {
  font-size: 24px;
  margin: 32px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #e1e4e8;
  color: var(--text);
  font-weight: 600;
}

.doc-article h3 {
  font-size: 20px;
  margin: 24px 0 12px 0;
  color: var(--text);
  font-weight: 600;
}

/* Documentation search UI styles */
.docs-search {
  margin: 18px 0 6px;
  display: block;
  max-width: 800px;
}

.docs-search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e6eef6;
  border-radius: 8px;
  font: 500 15px/1.4 system-ui, -apple-system, Segoe UI, Roboto, Inter, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #fff;
  box-shadow: 0 6px 18px rgba(12,26,40,0.03);
  transition: box-shadow 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
}

.docs-search-input:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 8px 22px rgba(12,98,166,0.08);
}

.docs-search-status {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-dim);
}

.docs-search-results {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  padding-left: 0px !important;
}

.docs-search-item {
  background: #fff;
  border: 1px solid #eef4fb;
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(12,26,40,0.03);
}

.docs-search-link {
  display: inline-block;
  font-weight: 700;
  color: var(--brand-blue);
  text-decoration: none;
  margin-bottom: 6px;
}

.docs-search-link:hover {
  text-decoration: underline;
}

.docs-search-snippet {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 4px;
}

.docs-search-no-results {
  color: var(--text-dim);
  padding: 8px 0;
}

/* Make sure search UI compresses nicely on narrow screens */
@media (max-width: 700px) {
  .docs-search { margin: 12px 0; }
  .docs-search-input { font-size: 15px; padding: 10px; }
}

.doc-article p {
  margin: 0 0 16px 0;
}

.doc-article ul,
.doc-article ol {
  margin: 0 0 16px 0;
  padding-left: 32px;
}

.doc-article li {
  margin: 4px 0;
}

.doc-article code {
  background: #f6f8fa;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 14px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.doc-article pre {
  background: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  margin: 0 0 16px 0;
}

.doc-article pre code {
  background: none;
  padding: 0;
}

.doc-article table {
  border-collapse: collapse;
  margin: 0 0 16px 0;
}

/* Make wide tables scroll horizontally inside the content area.
   Tables are wrapped in a .table-scroll container during docs build. */
.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* smooth scrolling on iOS */
  border-radius: 6px;
  margin: 0 0 16px 0;
}

.table-scroll table {
  width: max-content; /* allow table to be wider than the container */
  min-width: 100%;    /* but try to fill available width when possible */
}

.doc-article th,
.doc-article td {
  border: 1px solid #e1e4e8;
  padding: 8px 12px;
  text-align: left;
}

.doc-article th {
  background: #f6f8fa;
  font-weight: 600;
}

.doc-article img {
  max-width: 100%;
  height: auto;
  margin: 16px 0;
}

.doc-article a {
  color: #0366d6;
  text-decoration: none;
}

.doc-article a:hover {
  text-decoration: underline;
}

/* Right-side table of contents (auto-generated from headings) */
.doc-toc {
  position: fixed;
  top: calc(var(--doc-top, 97px) + 12px);
  right: calc(((100% - var(--maxw)) / 2) - 280px);
  width: 260px;
  max-height: calc(100vh - var(--doc-top, 97px) - 24px);
  overflow: auto;
  padding: 12px;
  background: #fff;
  border-left: 1px solid #e9eef3;  
  border-radius: 8px 0 0 8px;
  z-index: 5;
  font-size: 14px;
  
  font-weight: normal;
}

.doc-toc h4 {
  margin: 0 0 8px 0;
  font-size: 15px;
  color: var(--text-dim);
  font-weight: 700;
}
.doc-toc ul { list-style: none; margin: 0; padding: 0; gap: 2px; display:block; }
.doc-toc > ul > li { margin: 8px 0; }
.doc-toc li { margin: 4px 0; }
.doc-toc a { font-weight: normal; color: var(--text-dim); text-decoration: none; display: block; padding: 4px 6px; border-radius: 4px; }
.doc-toc a:hover { color: var(--brand-blue); background: #f6fbff; }
.doc-toc a.active { color: var(--brand-blue); font-weight: 700; }
.doc-toc .toc-sub { padding-left: 14px; font-size: 13px; margin-top: 4px; }
.doc-toc .toc-sub li { margin: 4px 0; }
.doc-toc .toc-sub a { color: var(--text-dim); padding-left: 2px; font-size: 13px; }

/* Hide TOC on small screens */
@media (max-width: 1200px) {
  .doc-toc { display: none; }
}

/* Mobile/medium responsive: stack or recentre content when space is tight */
/* Make sidebar inline (non-fixed) when the viewport isn't wide enough to leave a 280px margin either side of the 1200px content (≈ 1760px) */
/* Keep sidebar visible on all widths; content gutters handle overlap prevention */

/* remove duplicate legacy block below (was from older flex layout) */

/* Admonition blocks converted from Docusaurus-style :::note / :::warning */
.admonition {
  position: relative;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 18px 0;
  background: #fff9e6;
  border: 1px solid #f0e1b8;
  color: var(--text);
}

.admonition:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  background: linear-gradient(180deg, #f3d78a, #f0c86a);
}

.admonition .admonition-title {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  margin: -2px 0 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admonition .admonition-title:before {
  /* small inline SVG icon (warning/info) chosen via fill currentColor */
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background-size: 14px 14px;
  background-repeat: no-repeat;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23036b9a' d='M1 21h22L12 2 1 21z'/%3E%3Cpath fill='%23fff' d='M13 16h-2v2h2v-2zm0-8h-2v6h2V8z'/%3E%3C/svg%3E");
}

/* Variants */
.admonition-note {
  background: #eef9ff;
  border-color: #d8efff;
}

.admonition-info {
  background: #eef9ff;
  border-color: #cfeefe;
}

.admonition-tip {
  background: #f0fff4;
  border-color: #dff6e6;
}

.admonition-warning {
  background: #fff7e6;
  border-color: #f3e0b7;
}

.admonition-danger {
  background: #fff2f2;
  border-color: #f2cfcf;
}

/* Very small screens: move the toggle lower to avoid header overlap */
@media (max-width: 640px) {
  .doc-sidebar-toggle { top: 80px !important; }
}

/* Ensure primary nav submenus are visible and readable on small screens
   (overrides any opacity/display rules applied elsewhere). */
@media (max-width: 640px) {
  nav#primary-nav .submenu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    background: #fff !important;
    margin: 6px 0 !important;
    padding: 6px 0 !important;
    border: 1px solid #eef3f6 !important;
    box-shadow: 0 6px 18px rgba(3,102,214,0.06) !important;
    position: static !important;
  }

  nav#primary-nav .submenu li {
    display: block !important;
    margin: 0 !important;
  }

  nav#primary-nav .submenu a {
    display: block !important;
    color: var(--text) !important;
    background: transparent !important;
    padding: 12px 16px !important;
    text-decoration: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  nav#primary-nav .submenu a:hover,
  nav#primary-nav .submenu a:focus {
    background: #f6f9fb !important;
    color: var(--brand-blue) !important;
  }
}