:root {
  --default-gray: #f4f4f4;
  --default-font-color: #000;
  --hover-link-color: #5b5def;
  --footer-background: var(--default-gray);
  --footer-font-color: #27282c;
  --footer-go-to-top-color: white;
  --color-scrollbar: rgba(39, 40, 44, 0.4);
  --color-scrollbar-track: var(--default-gray);
  --background-color: #fff;
  --code-background: rgba(39, 40, 44, 0.05);
  --border-color: rgba(39, 40, 44, 0.2);
  --max-width: 1160px;
  --bottom-spacing: 16px;
  --horizontal-spacing-for-content: 16px;
  --sidebar-width: 280px;
  --footer-height: 64px;
  --active-tab-border-color: var(--bs-primary);
  --inactive-tab-border-color: var(--bs-dark);
  --active-section-color: var(--bs-primary);
  --inactive-section-color: var(--bs-dark);
}

html,
body {
  width: unset;
  height: unset;
}

.bd-sidebar .sidebar {
  border: unset;
  width: auto;
}

.main-content > * {
  margin-left: 0;
  margin-right: 0;
}

.main-content :is(h1, h2) {
  font-weight: 400;
}

.footer {
  clear: unset;
  display: block;
  align-items: unset;
  position: unset;
  min-height: unset;
  font-size: unset;
  line-height: unset;
  letter-spacing: unset;
  color: unset;
  margin-top: unset;
  background-color: unset;
}

div.toc--part,
div.toc--row,
.sidebar--inner {
  scroll-margin-top: 150px;
}

#toc-offcanvas #toc-label {
  display: none;
}

/* --- Tabs --- */
.tabs-section-body > div[data-togglable] {
  display: none;
}

.tabs-section-body > div[data-togglable][data-active] {
  display: block;
}

/* --- Code blocks --- */
code.language-plaintext {
  display: inline;
}

.symbol:empty {
  padding: 0;
}

.symbol:not(.token),
code {
  background-color: var(--bs-gray-100);
  align-items: center;
  box-sizing: border-box;
  white-space: pre-wrap;
  font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
  font-size: 13px;
  overflow: auto;
}

.symbol:not(.token),
code.block {
  display: block;
  padding: 1em;
  border-radius: 8px;
  line-height: 24px;
  position: relative;
}

/* --- Anchor wrapper (header links with # mouse hover) --- */
.main-subrow:hover .anchor-icon {
  opacity: 1;
  transition: 0.2s;
}

.main-subrow .anchor-icon {
  opacity: 0;
  transition: 0.2s 0.5s;
}

.main-subrow .anchor-icon::before {
  content: "#";
  color: var(--bs-blue) !important;
  font-size: 1.2rem;
}

.main-subrow .anchor-icon:hover {
  cursor: pointer;
}

.main-subrow .anchor-icon:hover > svg path {
  fill: var(--hover-link-color);
}

@media (hover: none) {
  .main-subrow .anchor-icon {
    display: none;
  }
}

.main-subrow .anchor-wrapper {
  position: relative;
  width: 24px;
  height: 16px;
  margin-left: 3px;
}

.inline-flex {
  display: inline-flex;
}

/* --- tables --- */
.table {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.table-row {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--border-color);
  padding: 11px 0 12px 0;
  background-color: var(--background-color);
}

.table-row:last-of-type {
  border-bottom: none;
}

.table-row .brief-comment {
  color: #666;
}

/* rows */
.title-row {
  display: grid;
  grid-template-columns: auto auto 7em;
  width: 100%;
}

@media (min-width: 960px) {
  .title-row {
    grid-template-columns: 20% auto 7em;
  }
}

/* keyValue pair */
.keyValue {
  display: grid;
  grid-gap: 8px;
}

@media (min-width: 960px) {
  .keyValue {
    grid-template-columns: 20% 80%;
  }
}

/* Subrows */
.main-subrow {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  padding: 0;
}

.main-subrow > div {
  margin-bottom: 8px;
}

.pull-right {
  float: right;
  display: inline-block;
}

.main-subrow .pull-right,
.table-row .pull-right,
.table .pull-right {
  float: none;
  margin-left: auto;
}

/* --- Scrollbar --- */
html ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html ::-webkit-scrollbar-thumb {
  border-radius: 6px;
  background: var(--color-scrollbar);
}

html ::-webkit-scrollbar-track {
  background-color: var(--color-scrollbar-track);
}

/* Override Dokka sidebar behavior for offcanvas */
.dokka-sidebar {
  max-height: max-content !important;
  width: auto !important;
  position: static !important;
  overflow-y: visible !important;
}
