:root {
  --db2pq-code-radius: 0.375rem;
  --db2pq-reference-surface: #2a2f34;
  --db2pq-reference-surface-muted: #252a2f;
  --db2pq-reference-border: #46505a;
}

p code {
  white-space: inherit;
}

pre {
  word-break: normal;
  word-wrap: normal;
  font-size: 0.875rem;
}

pre code {
  white-space: inherit;
}

html[data-bs-theme="dark"] {
  --bs-body-bg: #222;
  --bs-body-color: #d7dce2;
  --bs-border-color: #4c545d;
  --bs-code-color: #f8f9fa;
  --bs-link-color: #75b8ff;
  --bs-link-hover-color: #a4d0ff;
}

html[data-bs-theme="dark"] body {
  background-color: var(--bs-body-bg);
}

html[data-bs-theme="dark"] .navbar {
  background-color: #1b1f22;
  border-bottom: 1px solid #3b424a;
  box-shadow: 0 0.125rem 0.75rem rgb(0 0 0 / 25%);
}

html[data-bs-theme="dark"] .navbar .navbar-brand,
html[data-bs-theme="dark"] .navbar .nav-link {
  color: #f2f4f6;
}

html[data-bs-theme="dark"] .navbar .nav-link:hover,
html[data-bs-theme="dark"] .navbar .nav-link:focus,
html[data-bs-theme="dark"] .navbar .active > .nav-link,
html[data-bs-theme="dark"] .navbar .nav-link.active {
  color: #75b8ff;
}

html[data-bs-theme="dark"] .nav-text.text-muted,
html[data-bs-theme="dark"] .dont-index,
html[data-bs-theme="dark"] .text-muted {
  color: #abb4be !important;
}

html[data-bs-theme="dark"] main p code,
html[data-bs-theme="dark"] main li code,
html[data-bs-theme="dark"] main dd code,
html[data-bs-theme="dark"] main td code,
html[data-bs-theme="dark"] main th code {
  color: #f8f9fa;
  background-color: #3b4148;
  border: 1px solid #535c66;
}

html[data-bs-theme="dark"] h1 code,
html[data-bs-theme="dark"] h2 code,
html[data-bs-theme="dark"] h3 code,
html[data-bs-theme="dark"] h4 code,
html[data-bs-theme="dark"] h5 code,
html[data-bs-theme="dark"] h6 code,
html[data-bs-theme="dark"] .page-header code {
  color: inherit;
  background-color: transparent;
  border: 0;
  padding: 0;
  font-size: inherit;
}

html[data-bs-theme="dark"] div.sourceCode,
html[data-bs-theme="dark"] pre.sourceCode,
html[data-bs-theme="dark"] pre.text {
  color: #e4e8ed;
  background-color: #2b3035;
  border: 1px solid #4d5560;
  border-radius: var(--db2pq-code-radius);
}

html[data-bs-theme="dark"] div.sourceCode pre {
  background-color: transparent;
}

html[data-bs-theme="dark"] .r-out.co,
html[data-bs-theme="dark"] .r-msg.co {
  color: #d8dde3;
  background-color: transparent !important;
  font-style: normal;
}

html[data-bs-theme="dark"] .r-out.co .r-pr,
html[data-bs-theme="dark"] .r-msg.co .r-pr {
  color: #8fb7dd;
  background-color: transparent !important;
  font-style: normal;
}

html[data-bs-theme="dark"] .r-out.co span,
html[data-bs-theme="dark"] .r-msg.co span {
  background-color: transparent !important;
  font-style: normal !important;
}

html[data-bs-theme="dark"] .r-out.co span[style*="color"],
html[data-bs-theme="dark"] .r-msg.co span[style*="color"] {
  color: #c4cbd3 !important;
}

html[data-bs-theme="dark"] .r-out.co span[style*="font-style: italic"],
html[data-bs-theme="dark"] .r-msg.co span[style*="font-style: italic"] {
  color: #aeb7c0 !important;
}

html[data-bs-theme="dark"] .btn-copy-ex {
  color: #f8f9fa;
  background-color: #375a7f;
  border-color: #4d78a6;
}

html[data-bs-theme="dark"] #toc {
  color: #cbd3da;
  border-left-color: #4c545d;
}

html[data-bs-theme="dark"] #toc .nav-link {
  color: #cbd3da;
}

html[data-bs-theme="dark"] #toc .nav-link:hover,
html[data-bs-theme="dark"] #toc .nav-link.active {
  color: #75b8ff;
}

html[data-bs-theme="dark"] table {
  --bs-table-bg: transparent;
  --bs-table-color: #d7dce2;
  --bs-table-border-color: #4c545d;
}

html[data-bs-theme="dark"] footer {
  border-top-color: #4c545d;
  color: #abb4be;
}

html[data-bs-theme="dark"] .template-reference-topic .ref-description,
html[data-bs-theme="dark"] .template-reference-topic #arguments dl,
html[data-bs-theme="dark"] .template-reference-index main > .section.level2 {
  color: var(--bs-body-color);
}

html[data-bs-theme="dark"] .template-reference-index main > .section.level2:has(dl:not(:empty)),
html[data-bs-theme="dark"] .template-reference-topic #arguments dl {
  background-color: var(--db2pq-reference-surface-muted);
  border: 1px solid var(--db2pq-reference-border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}

html[data-bs-theme="dark"] .template-reference-index dt,
html[data-bs-theme="dark"] .template-reference-topic dt {
  color: #f2f4f6;
}

html[data-bs-theme="dark"] .template-reference-index dd,
html[data-bs-theme="dark"] .template-reference-topic dd {
  color: #cbd3da;
}

html[data-bs-theme="dark"] .template-reference-topic dt:not(:first-child),
html[data-bs-theme="dark"] .template-reference-index dt:not(:first-child) {
  border-top: 1px solid #3b444d;
  padding-top: 0.65rem;
  margin-top: 0.65rem;
}

html[data-bs-theme="dark"] .template-reference-topic .ref-description {
  background-color: var(--db2pq-reference-surface);
  border-left: 0.25rem solid #75b8ff;
  border-radius: 0.375rem;
  padding: 0.75rem 1rem;
}

html[data-bs-theme="dark"] .template-reference-topic .ref-description p:last-child,
html[data-bs-theme="dark"] .template-reference-topic dd p:last-child {
  margin-bottom: 0;
}

html[data-bs-theme="dark"] .template-reference-topic .sourceCode {
  background-color: #252a2f;
}

html[data-bs-theme="dark"] .template-reference-topic pre code {
  color: inherit;
  background-color: transparent;
  border: 0;
}
