:root {
  --docs-bg: #f4f7fb;
  --docs-surface: #ffffff;
  --docs-surface-muted: #f8fafc;
  --docs-border: #dde5f0;
  --docs-text: #142033;
  --docs-text-muted: #4f6077;
  --docs-heading: #081224;
  --docs-primary: #2563eb;
  --docs-primary-strong: #1d4ed8;
  --docs-primary-soft: #dbeafe;
  --docs-shadow: 0 16px 36px rgba(10, 24, 45, 0.08);
  --docs-radius-lg: 16px;
  --docs-radius-md: 12px;
  --docs-tree-indent: 16px;
}

body {
  background: var(--docs-bg);
  color: var(--docs-text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

.container {
  max-width: none;
  width: 100%;
}

.banner .container,
.top-search-form .container,
.wrap.container,
.content-info .container {
  padding-left: 24px;
  padding-right: 24px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--docs-heading);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--docs-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--docs-primary-strong);
  text-decoration: none;
}

.banner.navbar {
  background: #0f172a;
  border: 0;
  box-shadow: 0 10px 24px rgba(4, 12, 25, 0.22);
  margin: 0;
  min-height: 68px;
}

.banner .navbar-brand {
  color: #f8fafc !important;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  padding: 22px 0 0;
}

.banner .navbar-nav > li > a {
  color: #c4d4ee;
  font-size: 1.45rem;
  font-weight: 600;
  padding: 24px 14px;
}

.banner .navbar-nav > li > a:hover,
.banner .navbar-nav > li > a:focus,
.banner .navbar-nav > .active > a {
  background: transparent;
  color: #ffffff;
}

.banner .navbar-toggle {
  border-color: rgba(255, 255, 255, 0.22);
  margin-top: 16px;
}

.top-search-form {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 20px 0 34px;
}

.top-search-form .search-form {
  align-items: stretch;
  background: var(--docs-surface);
  border: 1px solid var(--docs-border);
  border-radius: 28px;
  box-shadow: var(--docs-shadow);
  display: flex;
  gap: 10px;
  padding: 14px;
}

.top-search-form .input-group {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.top-search-form .search-mode-toggle {
  background: var(--docs-surface-muted);
  border: 1px solid var(--docs-border);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  width: 100%;
}

.top-search-form .search-mode-button {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--docs-text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  min-height: 34px;
  padding: 7px 14px;
}

.top-search-form .search-mode-button.is-active {
  background: #0f172a;
  color: #fff;
}

.top-search-form .search-history-link {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--docs-text-muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  min-height: 34px;
  margin-left: auto;
  padding: 7px 14px;
  text-decoration: none;
  white-space: nowrap;
}

.top-search-form .search-history-link:hover,
.top-search-form .search-history-link:focus {
  background: #e7edf8;
  color: #0f172a;
  text-decoration: none;
}

.top-search-form .search-history-link.is-disabled {
  color: #94a3b8;
  cursor: default;
  pointer-events: none;
}

.top-search-form .search-form.is-legacy-mode .search-history-link {
  display: none;
}

.top-search-form .search-input-row {
  align-items: flex-end;
  display: flex;
  gap: 10px;
  width: 100%;
}

.top-search-form .search-field.form-control {
  background: transparent;
  border: 0;
  border-radius: 14px;
  box-shadow: none;
  color: var(--docs-text);
  font-size: 1.6rem;
  line-height: 1.4;
  min-height: 54px;
  max-height: 220px;
  min-width: 0;
  overflow-y: auto;
  padding: 14px 16px;
  resize: none;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  width: 100%;
}

.top-search-form .search-field.form-control:focus {
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.top-search-form .search-field::placeholder {
  color: #7d8ca1;
}

.top-search-form .search-submit.btn {
  background: var(--docs-primary);
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
  height: 46px;
  margin-top: 0;
  min-width: 108px;
  padding: 0 22px;
}

.top-search-form .search-submit.btn:hover {
  background: var(--docs-primary-strong);
}

.top-search-form .input-group-btn {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  width: auto;
}

.wrap.container {
  padding-bottom: 48px;
  padding-top: 36px;
}

.content.row {
  display: flex;
  align-items: flex-start;
}

.content.row .main,
.content.row .sidebar {
  float: none;
}

.content.row .main {
  order: 2;
}

.content.row .sidebar {
  order: 1;
}

.sidebar {
  margin-top: 0;
}

.content.row.docs-nav-collapsed .sidebar {
  flex: 0 0 48px;
  max-width: 48px;
  width: 48px;
}

.content.row.docs-nav-collapsed .main {
  flex: 1 1 auto;
  max-width: none;
  width: auto;
}

.docs-left-nav {
  background: var(--docs-surface);
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius-md);
  box-shadow: 0 8px 20px rgba(9, 19, 36, 0.08);
  position: sticky;
  top: 16px;
  transition: width 0.2s ease;
}

.docs-left-nav-header {
  align-items: center;
  border-bottom: 1px solid var(--docs-border);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 12px 12px 10px;
}

.docs-left-nav-header h2 {
  font-size: 1.5rem;
  margin: 0;
}

.docs-left-nav-toggle {
  align-items: center;
  background: var(--docs-surface-muted);
  border: 1px solid var(--docs-border);
  border-radius: 8px;
  color: var(--docs-text-muted);
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.docs-left-nav-tree {
  max-height: calc(100vh - 140px);
  overflow: auto;
  padding: 8px 8px 12px;
}

.docs-tree-level,
.docs-tree-docs {
  list-style: none;
  margin: 0;
  padding: 0;
}

.docs-tree-level .docs-tree-level {
  border-left: 1px dashed #cbd6e9;
  margin-left: var(--docs-tree-indent);
  padding-left: 10px;
}

.docs-tree-item {
  margin-bottom: 2px;
}

.docs-tree-row {
  align-items: center;
  border-radius: 8px;
  display: flex;
  gap: 6px;
  padding: 4px 6px 4px 2px;
}

.docs-tree-item.is-active > .docs-tree-row {
  background: var(--docs-primary-soft);
}

.docs-tree-branch-toggle,
.docs-tree-branch-placeholder {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #6b7f9c;
  display: inline-flex;
  height: 22px;
  justify-content: center;
  width: 22px;
}

.docs-tree-branch-toggle i {
  font-size: 1.05rem;
  transition: transform 0.2s ease;
}

.docs-tree-item.is-expanded > .docs-tree-row .docs-tree-branch-toggle i {
  transform: rotate(90deg);
}

.docs-tree-category-link {
  border-radius: 6px;
  color: var(--docs-text);
  display: block;
  flex: 1;
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 2px 4px;
}

.docs-tree-docs {
  border-left: 1px dashed #cbd6e9;
  margin: 2px 0 8px var(--docs-tree-indent);
  padding-left: 10px;
}

.docs-tree-doc a {
  border-radius: 6px;
  color: var(--docs-text-muted);
  display: block;
  font-size: 1.3rem;
  line-height: 1.35;
  padding: 5px 8px 5px 30px;
  position: relative;
}

.docs-tree-doc a::before {
  color: #8ea1bc;
  content: "\203A";
  font-size: 1.6rem;
  font-weight: 700;
  left: 10px;
  line-height: 1;
  position: absolute;
  top: 8px;
}

.docs-tree-doc.is-current a {
  background: var(--docs-primary-soft);
  color: var(--docs-primary-strong);
  font-weight: 700;
}

.docs-tree-item .docs-tree-children {
  display: none;
}

.docs-tree-item.is-expanded > .docs-tree-children {
  display: block;
}

.docs-left-nav.is-collapsed .docs-left-nav-header h2,
.docs-left-nav.is-collapsed .docs-tree-category-link,
.docs-left-nav.is-collapsed .docs-tree-docs,
.docs-left-nav.is-collapsed .docs-tree-level .docs-tree-level {
  display: none;
}

.docs-left-nav.is-collapsed .docs-left-nav-tree {
  display: none;
}

.docs-left-nav.is-collapsed {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.docs-left-nav.is-collapsed .docs-left-nav-header {
  border-bottom: 0;
  justify-content: flex-end;
  padding: 0;
}

.docs-left-nav.is-collapsed .docs-tree-row {
  justify-content: center;
}

.docs-left-nav.is-collapsed .docs-tree-item.is-expanded > .docs-tree-children {
  display: none;
}

.breadcrumbs,
.breadcrumb {
  background: var(--docs-surface-muted);
  border: 1px solid var(--docs-border);
  border-radius: 999px;
  color: var(--docs-text-muted);
  display: inline-block;
  font-size: 1.3rem;
  margin-bottom: 18px;
  padding: 8px 14px;
}

.breadcrumbs a,
.breadcrumb a {
  color: var(--docs-text);
  font-weight: 500;
}

.doc-category {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Prevent Bootstrap clearfix pseudo-elements from becoming empty grid items. */
.doc-category::before,
.doc-category::after {
  content: none !important;
  display: none !important;
}

ul.doc-category li.doc,
ul.doc-category li.category,
.doc-category > li {
  background: var(--docs-surface);
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius-md);
  box-shadow: 0 6px 14px rgba(15, 29, 52, 0.05);
  clear: none;
  float: none;
  min-height: 170px;
  padding: 22px 22px 18px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  width: auto;
}

ul.doc-category li.doc:nth-child(odd),
ul.doc-category li.category:nth-child(odd),
ul.doc-category li.doc:nth-child(even),
ul.doc-category li.category:nth-child(even) {
  border-right: 1px solid var(--docs-border);
  clear: none;
  padding-left: 22px;
  padding-right: 22px;
}

.doc-category > li:hover,
ul.doc-category li.doc:hover,
ul.doc-category li.category:hover {
  border-color: #c7d6ee;
  box-shadow: var(--docs-shadow);
  transform: translateY(-2px);
}

ul.doc-category li.doc h3,
ul.doc-category li.category h3,
.doc-category > li h3 {
  font-size: 2rem;
  margin: 0 0 10px;
}

ul.doc-category li.doc h3 a,
ul.doc-category li.category h3 a {
  font-size: 2rem;
  line-height: 1.3;
  padding-left: 30px;
}

ul.doc-category li.doc .inside,
ul.doc-category li.category .inside,
.doc-category > li .inside {
  color: var(--docs-text-muted);
  font-size: 1.45rem;
  padding-left: 30px;
  padding-top: 10px;
}

.doc-category > li .inside p:last-child {
  margin-bottom: 0;
}

.category-title {
  font-size: 2.8rem;
  letter-spacing: -0.02em;
  margin: 18px 0 16px;
}

article.row {
  margin: 0;
}

.entry-content {
  background: var(--docs-surface);
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius-lg);
  box-shadow: var(--docs-shadow);
  padding: 28px 30px;
}

.entry-content .entry-title {
  font-size: 3.4rem;
  margin-top: 0;
}

.entry-content p,
.entry-content li {
  font-size: 1.6rem;
}

.entry-content code,
.entry-content pre,
pre {
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace !important;
}

.entry-content pre {
  background: #0f172a;
  border: 1px solid #0b1222;
  border-radius: 12px;
  color: #e2e8f0;
  font-size: 1.35rem;
  padding: 16px;
}

.entry-content :not(pre) > code {
  background: #e6eef9;
  border-radius: 5px;
  color: #0b2b67;
  font-size: 0.95em;
  padding: 2px 5px;
}

.page-header {
  border-bottom: 1px solid var(--docs-border);
  margin: 38px 0 16px;
  padding-bottom: 8px;
}

.page-header .section-title {
  font-size: 2.4rem;
  margin: 0;
}

.bs-sidebar {
  background: var(--docs-surface);
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius-md);
  box-shadow: 0 6px 16px rgba(12, 24, 44, 0.08);
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding: 10px 0;
}

.bs-sidebar .nav > li > a {
  color: var(--docs-text-muted);
  font-size: 1.35rem;
  padding: 10px 18px;
}

.bs-sidebar .nav > li > a:hover,
.bs-sidebar .nav > li > a:focus {
  background: var(--docs-surface-muted);
  color: var(--docs-text);
}

.bs-sidebar .active > a,
.bs-sidebar .active > a:hover,
.bs-sidebar .active > a:focus {
  background: var(--docs-primary-soft);
  border-left: 3px solid var(--docs-primary);
  color: var(--docs-primary);
  font-weight: 700;
  padding-left: 16px;
}

.wedoc-feedback-wrap {
  background: var(--docs-surface);
  border: 1px solid var(--docs-border);
  border-radius: var(--docs-radius-md);
  margin-top: 20px;
  padding: 14px 16px;
}

.content-info {
  background: #0f172a;
  color: #c1d1ea;
  margin-top: 40px;
  padding: 24px 0;
}

.content-info a {
  color: #dbeafe;
}

.content-info .copyright {
  border-top: 1px solid rgba(212, 225, 245, 0.18);
  margin-top: 12px;
  padding-top: 14px;
}

@media (max-width: 991px) {
  .content.row {
    display: block;
  }

  .content.row .main,
  .content.row .sidebar {
    order: initial;
  }

  .content.row.docs-nav-collapsed .sidebar,
  .content.row.docs-nav-collapsed .main {
    flex: initial;
    max-width: none;
    width: auto;
  }

  .wrap.container {
    padding-top: 28px;
  }

  .top-search-form .search-form {
    border-radius: var(--docs-radius-md);
    padding: 12px;
  }

  .top-search-form .search-submit.btn {
    margin-top: 0;
  }

  .entry-content {
    padding: 22px 18px;
  }

  .entry-content .entry-title {
    font-size: 2.8rem;
  }

  .docs-left-nav {
    margin-bottom: 18px;
    position: static;
  }

  .docs-left-nav-tree {
    max-height: none;
  }
}

@media (min-width: 1200px) {
  .banner .container,
  .top-search-form .container,
  .wrap.container,
  .content-info .container {
    padding-left: 36px;
    padding-right: 36px;
  }
}

@media (max-width: 767px) {
  .banner .navbar-brand {
    padding-top: 19px;
  }

  .top-search-form .search-form,
  .top-search-form .input-group,
  .top-search-form .search-input-row {
    align-items: stretch;
    flex-direction: column;
  }

  .top-search-form .search-mode-toggle {
    width: 100%;
    flex-wrap: wrap;
  }

  .top-search-form .search-mode-button {
    flex: 1;
  }

  .top-search-form .search-history-link {
    margin-left: 0;
    text-align: center;
    width: 100%;
  }

  .top-search-form .input-group-btn {
    justify-content: flex-end;
    width: 100%;
  }

  .top-search-form .search-submit.btn {
    width: 100%;
  }

  .doc-category {
    grid-template-columns: 1fr;
  }

  ul.doc-category li.doc h3 a,
  ul.doc-category li.category h3 a {
    font-size: 1.8rem;
  }

  .category-title {
    font-size: 2.4rem;
  }
}

/* Tooltip Glossary: match docs theme and improve link clarity */
#tt #ttcont {
  background: var(--docs-surface) !important;
  border: 1px solid var(--docs-border) !important;
  border-radius: var(--docs-radius-md) !important;
  box-shadow: var(--docs-shadow) !important;
  color: var(--docs-text) !important;
  font-size: 1.45rem !important;
  line-height: 1.5 !important;
}

#tt #ttcont *,
#tt #ttcont p,
#tt #ttcont li,
#tt #ttcont .glossaryItemTitle {
  color: var(--docs-text) !important;
}

#tt #ttcont div.glossaryItemTitle {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: 1.55rem !important;
  font-weight: 700 !important;
  color: var(--docs-heading) !important;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
  margin: 0 0 10px !important;
  min-height: 1.3em !important;
}

#tt #ttcont a {
  color: var(--docs-primary) !important;
}

#tt #ttcont a:hover,
#tt #ttcont a:focus {
  color: var(--docs-primary-strong) !important;
}

/* Make the term-details link clearly clickable in the popup */
#tt #ttcont .glossaryTooltipMoreLinkWrapper a,
#tt #ttcont .mobile-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

#tt #ttcont .glossaryTooltipMoreLinkWrapper a::before,
#tt #ttcont .mobile-link a::before {
  content: "\2197";
  font-size: 0.95em;
  line-height: 1;
}
