@font-face {
  font-family: "lexend";
  src: url(/fonts/lexend.ttf) format("truetype");
}

@font-face {
  font-family: "Cascadia Code PL";
  src: url(/fonts/CascadiaCodePL.ttf) format("truetype");
}

:root {
  color-scheme: light dark;
  overflow-x: hidden;
  font-variant-ligatures: none;

  --font-default: lexend, Verdana, sans-serif;
  --font-code: 'Cascadia Code PL', monspace;
  --font-size: 16px;
  --body-width: 800px;

  --card-shadow: 0 1px 3px rgb(0 0 0 / 12%), 0 1px 2px rgb(0 0 0 / 24%);

  --body-bg: #f2f1f1;
  --default-color: #212427;

  --card-bg: white;
  --card-border: white;

  --section-header-fg: #16997b;
  --main-sub-hover-bg: #f5f5f5;
  --nav-btn-bg: white;
  --nav-btn-border: white;
  --nav-btn-disabled-fg: grey;

  --sidenav-main-bg: #faf9f9;
  --sidenav-main-border: #e3e3e3;

  --link-color: #485ad1;
  --link-color-hover: #4498ff;
  --link-active-color: #ff0084;
  --clickable-hover-bg: #f8f8f8;

  --pre-bg: #faf9f9;

  --search-input-bg: white;
  --search-input-focus-border: #1c8cb7;
  --search-svg-color: grey;
  --search-drop-bg: white;
  --search-drop-border: #e5e5e5;
  --search-drop-mark-bg: #ffe3af;
  --search-drop-mark-fg: black;

  --scrollbar-thumb-bg: #cbcbcb;
  --scrollbar-track-bg: #f1f1f1;

  --arguments-table-bg: #faf9f9;
  --arguments-table-border: #efefef;
  --arguments-table-arg-fg: #008080;

  --menu-separator-fg: #efefef;
  --selection-bg: #16997b;
  --selection-fg: white;
}

[data-theme="dark"] {
  --card-shadow: 0 1px 3px rgb(0 0 0 / 12%), 0 1px 2px rgb(0 0 0 / 24%);

  --body-bg: #333333;
  --default-color: #f1f1f1;

  --card-bg: #3e3e3e;
  --card-border: #4e4e4e;

  --section-header-fg: #28a9db;
  --main-sub-hover-bg: #4a4a4a;
  --nav-btn-bg: #3e3e3e;
  --nav-btn-border: #4e4e4e;
  --nav-btn-disabled-fg: grey;

  --sidenav-main-bg: #363636;
  --sidenav-main-border: #363636;

  --link-color: #95c5ff;
  --link-color-hover: #dd789a;
  --link-active-color: #ed925a;
  --clickable-hover-bg: #4a4a4a;

  --pre-bg: #2e3032;

  --search-input-bg: #3e3e3e;
  --search-input-focus-border: #1c8cb7;
  --search-svg-color: grey;
  --search-drop-bg: #3e3e3e;
  --search-drop-border: #4e4e4e;
  --search-drop-mark-bg: #2c8d00;
  --search-drop-mark-fg: white;

  --scrollbar-thumb-bg: #585858;
  --scrollbar-track-bg: #4a4a4a;

  --arguments-table-bg: #2e3032;
  --arguments-table-border: #2e3032;
  --arguments-table-arg-fg: #91b2ce;

  --menu-separator-fg: #383838;
  --selection-bg: #ed925a;
  --selection-fg: #424242;
}



body {
  /* width: var(--body-width); */
  font-size: var(--font-size);
  font-family: var(--font-default);
  background: var(--body-bg);
  color: var(--default-color);
}

::-moz-selection {
  color: var(--selection-fg);
  background: var(--selection-bg);
}

::selection {
  color: var(--selection-fg);
  background: var(--selection-bg);
}

blockquote {
  background: var(--arguments-table-bg);
  border: 1px solid var(--arguments-table-border);
  padding: 10px;
  margin: 10px 0;
}

.top {
  padding: 10px 15px;
  display: flex;
  align-items: center;
  background-color: var(--card-bg);
  border-radius: 5px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
}

.top-wrapper {
  margin: 5px 0 20px 0;
  position: sticky;
  top: 0;
  padding-bottom: 2px;
  background-color: var(--body-bg);
  z-index: 10;
}

.index-btn {
  cursor: pointer;
  padding: 10px;
  margin-left: 5px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.index-btn:hover {
  background-color: var(--clickable-hover-bg);
}

input {
  color: var(--default-color);
  font-family: var(--font-default);
}

a {
  color: var(--link-color);
  text-decoration: none;
}

a:hover {
  color: var(--link-color-hover);
}

a.link-block {
  display: block;
  margin: 2px 0;
}

a.active {
  color: var(--link-active-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--section-header-fg);
  font-weight: normal;
}

ul,
ol {
  margin-left: 0;
  padding-left: 30px;
}

pre {
  background-color: var(--pre-bg);
  padding: 15px 10px !important;
  border-radius: 5px;
  font-size: 16px !important;
  line-height: 22px !important;
  display: flex;
}

pre:last-child {
  margin-bottom: 0;
}

code {
  font-size: 16px !important;
  font-family: var(--font-code);
}

pre>code {
  width: 100%;
  overflow-y: hidden;
}

table td {
  padding: 5px 0;
}

/* Search */
.search {
  position: relative;
  flex: 1;
}

.search input {
  border-radius: 4px;
  width: 100%;
  font-size: 16px;
  border: none;
  padding: 10px 10px 10px 38px;
  background: var(--search-input-bg);
  box-sizing: border-box;
}

.search input:focus {
  border-color: var(--search-input-focus-border);
  outline: none;
}

.search input::placeholder {
  font-family: var(--font-default);
}

#search__drop {
  display: none;
  position: absolute;
  top: 100%;
  max-height: 400px;
  overflow: auto;
  width: 100%;
  border-radius: 3px;
  background-color: var(--search-drop-bg);
  border: 1px solid var(--search-drop-border);
  padding: 10px;
  box-shadow: var(--card-shadow);
  box-sizing: border-box;
}

#search__drop mark {
  background-color: var(--search-drop-mark-bg);
  color: var(--search-drop-mark-fg);
  border-radius: 2px;
  padding: 0 2px;
}

.search__res {
  cursor: pointer;
  padding: 3px 5px;
  text-decoration: none;
  color: var(--default-color);
  display: block;
  border-radius: 3px;
}

.search__res:hover {
  background-color: var(--clickable-hover-bg);
}

.search svg {
  position: absolute;
  left: 10px;
  top: 10px;
}

.search svg>* {
  stroke: var(--search-svg-color);
}

/* End Search */
/* Sections */
/* End Sections */
/* Nav */
.nav {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
}

.nav-btn {
  cursor: pointer;
  padding: 8px 10px;
  text-decoration: none;
  display: flex;
  align-items: center;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--nav-btn-border);
  border-radius: 4px;
  background-color: var(--nav-btn-bg);
}

.nav-btn:not(.disabled):hover {
  background: var(--clickable-hover-bg);
}

.nav-btn>svg {
  min-width: 14px;
}

.nav__prev {
  margin-right: 20px;
}

.nav__next {
  margin-left: 20px;
}

.nav__prev>svg,
.nav__up>svg {
  margin-right: 10px;
}

.nav__next>svg {
  margin-left: 10px;
}

.nav-btn.disabled {
  pointer-events: none;
  cursor: default;
  color: var(--nav-btn-disabled-fg);
}

/* End Nav */

/* Sections & Headers */
div.section {
  background-color: var(--card-bg);
  margin: 15px 0 15px 0;
  padding: 15px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  border-radius: 5px;
}

div.section__header {
  color: var(--section-header-fg);
  font-size: 1.2rem;
  margin-bottom: 20px;
}

div.section__header:empty {
  display: none;
}

div.section h4,
h3 {
  color: var(--section-header-fg);
  font-size: 1.2rem;
  margin-bottom: 20px
}

div.section h4:first-child,
div.section h3:first-child,
div.section h2:first-child,
div.section h1:first-child,
div.section table:first-child {
  margin-top: 0;
}

.section.top-most {
  margin: 30px 0 30px 0;
  padding: 20px;
}

.section.top-most h4,
.section.top-most h3,
.section.top-most h2,
.section.top-most h1 {
  font-size: 1.6rem;
  color: var(--default-color);
  margin-top: 0px;
  margin-bottom: 0px;
}

h3.section {
  margin-bottom: 20px !important;
}

h2.chapter {
  margin-bottom: 20px !important;
}

.node-type:not(:empty) {
  font-size: 1rem;
  margin-bottom: 3px;
}

h1.main {
  color: var(--section-header-fg) !important;
}

div.section>p:last-child {
  margin-bottom: 0;
}

div.section:last-of-type {
  margin-bottom: 0 !important;
}

/* End Sections & Headers */
/* Tables */
table td {
  padding: 3px 0;
}

thead th {
  text-align: left;
  color: var(--section-header-fg);
  padding-bottom: 10px;
  font-weight: normal;
}

table.menu {
  margin-top: 20px;
  table-layout: fixed;
  width: 100%;
  max-width: 100%;
  padding: 4rem 1rem 1rem 1rem;
  position: relative;
  border: 1px solid var(--arguments-table-border);
  background-color: var(--arguments-table-bg);
  border-radius: 3px;
}

table.menu tbody {
  display: flex;
  flex-direction: column;
}

table.menu::before {
  content: 'Menu';
  position: absolute;
  left: 0;
  top: 1rem;
  line-height: 1rem;
  padding-bottom: 1rem;
  padding-left: 1rem;
  color: var(--section-header-fg);
  border-bottom: 1px solid var(--menu-separator-fg);
  width: calc(100% - 1rem);
}

table.menu tbody tr {
  display: flex;
  flex-direction: row;
}

table.menu tbody tr td:first-child {
  flex: 1;
}

table:not(.menu) {
  width: 100%;
}

table:not(.arguments-table):not(.syntax-table):not(.menu) {
  padding: 1rem;
  border: 1px solid var(--arguments-table-border);
  background-color: var(--arguments-table-bg);
  border-radius: 3px;
}


.table-subcaption {
  margin-top: 5px;
  margin-bottom: 15px;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.8;
}

table.arguments-table {
  background-color: var(--arguments-table-bg);
  border-radius: 3px;
  border: 1px solid var(--arguments-table-border);
  padding: 10px 10px 10px 15px;
}

table.arguments-table tr>td:first-child {
  font-family: var(--font-code);
  color: var(--arguments-table-arg-fg);
  padding-right: 10px;
  min-width: 100px;
}

table.arguments-table tr>td:first-child>i {
  font-style: normal !important;
}

table.arguments-table tr>td:nth-child(2) p {
  margin: 0;
}

table.syntax-table {
  display: block;
  overflow: hidden;
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
  overflow-wrap: break-word;
}

table.syntax-table tr>td:nth-child(1) {
  max-width: 150px;
}

table.syntax-table tr>td:nth-child(2) {
  padding-right: 10px;
  padding-left: 10px;
  white-space: nowrap;
  font-size: 13px;
  opacity: 0.8;
}

table.syntax-table tr>td:nth-child(3) {
  overflow-wrap: anywhere;
  white-space: break-spaces;
  overflow: hidden;
}

/* End Tables */
/* First Card on index.html */
.main-sub {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  align-items: center;
}

.main-sub a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border-radius: 3px;
}

.main-sub a:hover {
  cursor: pointer;
  background-color: var(--main-sub-hover-bg);
}

.main-sub svg {
  fill: var(--default-color);
}

/* End First Card on index.html */


/* Referenced Publications */
.pub-ref {
  padding: 10px 0;
}

/* End Referenced Publications */
dd>p:only-child {
  margin: 5px 0;
}

dt>b {
  color: var(--section-header-fg);
}

.body__inner {
  display: flex;
}

.body__main {
  flex: 1;
  display: flex;
  flex-direction: row;
  margin-left: 560px;
  justify-content: center;
  max-width: 100%;
  padding-bottom: 5px;
}

.body__main__inner {
  display: flex;
  flex-direction: column;
  width: var(--body-width);
  padding-right: 550px;
}

/* Sidenav */
.sidenav {
  width: 500px;
  background-color: var(--card-bg);
  padding: 15px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  border-radius: 5px;
  position: fixed;
  overflow: hidden;
  top: 15px;
  left: 15px;
  bottom: 15px;
  display: flex;
  flex-direction: column;
}

.sidenav__main {
  overflow: auto;
  flex: 1;
  padding-right: 5px;
  padding-left: 5px;
  background-color: var(--sidenav-main-bg);
  border: 1px solid var(--sidenav-main-border);
  border-radius: 3px;
  font-size: 14px;
}

.sidenav__main ul {
  padding-left: 17px;
}

.sidenav__main>ul {
  padding-left: 0;
  margin-top: 7px;
}

.sidenav__main>ul>li:not(:first-child):not(:nth-child(2)) {
  margin-top: 20px;
}

.sidenav__main li {
  list-style: none;
  margin: 3px 0;
}

.sidenav__main li>div {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.sidenav__main li>div>span {
  opacity: 0.7;
  color: var(--link-color);
  margin-right: 5px;
  font-size: 12px;
}

.sidenav__header {
  display: flex;
  align-items: center;
  padding: 0 0 15px 5px;
  font-size: 1.3rem;
  justify-content: space-between;
}

.sidenav__header>div {
  padding: 5px;
  cursor: pointer;
  border-radius: 4px;
}

.sidenav__header>div:hover {
  background-color: var(--clickable-hover-bg);
}

.sidenav__footer {
  display: flex;
  justify-content: left;
  align-items: center;
  padding: 15px 0 0 0;
}

.sidenav__footer a {
  opacity: 0.7;
  font-size: small;
  margin-left: 10px;
}

#theme-btn--dark {
  display: none;
}

[data-theme="dark"] #theme-btn--light {
  display: none;
}

[data-theme="dark"] #theme-btn--dark {
  display: flex;
}


/* width */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

/* Track */
::-webkit-scrollbar-track {
  background: var(--scrollbar-track-bg);
  border-radius: 3px;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb-bg);
  border-radius: 3px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #555;
}

@media screen and (max-width: 1400px) {
  .sidenav {
    display: none;
  }

  .body__main {
    margin-left: 0;
  }

  .body__main__inner {
    padding-right: 0;
  }
}


/* Mobile */
@media screen and (max-width: 800px) {
  :root {
    padding: 0;

    --font-size: 15px;
    --body-width: 100%;
  }

  .nav-btn {
    font-size: 12px;
  }

  .nav__prev>svg,
  .nav__up>svg {
    margin-right: 8px;
  }

  .nav__next>svg {
    margin-left: 8px;
  }

  .nav__prev {
    margin-right: 15px !important;
  }

  .nav__next {
    margin-left: 15px !important;
  }

  .section {
    margin: 10px 0 10px 0 !important;
  }

  .section.top-most {
    margin-top: 20px !important;
  }


}