/* #region Themes */
:root {
  --truffle-beige-0: #fcfbfa;
  --truffle-beige-2: #f5f2ee;
  --truffle-beige-3: #f1ede8;
  --truffle-beige-4: #ede8e2;

  --truffle-brown-5: #45373b;
  --truffle-brown-9: #271f21;

  --ganache-orange: #ebb67e;
  --ganache-orange-transparent: #ebb67e77;
  --ganache-orange-brighter: #ffd68a;
  --ganache-orange-dimmed: #e4a76377;
  --ganache-orange-dimmed-more: #ac92733f;

  --light-turquoise: #99f4e5;
  --turquoise: #3fe0c5;
  --medium-dark-turquoise: #1bd4b5;
  --dark-turquoise: #00c3a2;
  --very-dark-turquoise: #258575;

  --light-porsche: #f7e6d5;
  --porsche: #e4a663;
  --medium-dark-porsche: #c2823c;
  --dark-porsche: #9f611d;

  --light-pink: #f069d6;
  --pink: #e911bd;

  --thunder: #251f21;

  --primary-bg: var(--ganache-orange);
  --primary-bg-hover: var(--ganache-orange-brighter);
  --primary-text: rgba(0, 0, 0, 0.9);
}
[data-theme="dark"],
:root {
  --body-bg-color: #281e21;
  --main-bg-color: #33262a;
  --main-bg-light-contrast: #443338;
  --main-bg-medium-contrast: #5a4d51;
  --main-bg-heavy-contrast: #806f74;
  --medium-bg-color: rgba(255, 255, 255, 0.1);
  --body-text: #fff0e1;
  --link: var(--turquoise);
  --inline-code-color: rgba(255, 255, 255, 0.2);

  --action-bg: rgba(255, 255, 255, 0.1);
  --action-bg-opaque: rgb(61 52 55);
  --action-text: rgba(255, 255, 255, 0.9);
  --action-bg-hover: rgba(255, 255, 255, 0.3);
  --action-bg-hover-opaque: rgb(104, 97, 100);
  --action-shadow: rgba(0, 0, 0, 0.3);
  --action-border: rgba(255, 255, 255, 0.8);

  --monaco-bg: var(--truffle-brown-9);
  --monaco-margin: var(--truffle-brown-5);
  --console-tab-text: rgba(255, 255, 255, 0.9);
  --console-tab-border: rgba(255, 255, 255, 0.9);

  --editor-text-1: var(--dark-turquoise);
  --editor-text-2: var(--turquoise);
  --editor-text-3: var(--medium-dark-turquoise);
  --editor-text-4: var(--dark-turquoise);
  --editor-text-5: var(--light-porsche);
  --editor-text-6: var(--porsche);
  --editor-text-7: var(--medium-dark-porsche);
  --editor-text-8: var(--dark-porsche);
  --editor-text-9: var(--light-pink);
  --editor-text-10: var(--pink);

  --icon-bg: invert(98%) sepia(22%) saturate(1116%) hue-rotate(298deg)
    brightness(103%) contrast(103%);
  --chevron-bg: invert(94%) sepia(11%) saturate(658%) hue-rotate(317deg)
    brightness(102%) contrast(103%);

  --console-line: rgba(255, 255, 255, 0.05);
}
[data-theme="light"],
#theme-switch:checked ~ #page {
  --body-bg-color: var(--truffle-beige-3);
  --main-bg-color: var(--truffle-beige-2);
  --main-bg-light-contrast: #f1f1f1;
  --main-bg-medium-contrast: #aaa;
  --main-bg-heavy-contrast: #bbb;
  --medium-bg-color: var(--truffle-beige-4);
  --body-text: #251f21;
  --link: var(--very-dark-turquoise);
  --inline-code-color: rgba(255, 255, 255, 0.6);

  --nav-bg-color: var(--truffle-beige-4);

  --section-border: rgba(202, 186, 167, 0.45);

  --action-bg: var(--truffle-beige-2);
  --action-bg-opaque: var(--action-bg);
  --action-text: rgba(0, 0, 0, 0.9);
  --action-bg-hover: rgba(0, 0, 0, 0.3);
  --action-bg-hover-opaque: rgb(166, 162, 158);
  --action-shadow: rgba(0, 0, 0, 0.2);
  --action-border: rgba(0, 0, 0, 0.2);

  --monaco-bg: var(--truffle-beige-3);
  --monaco-margin: var(--truffle-beige-4);
  --console-tab-text: var(--truffle-brown-9);
  --console-tab-border: var(--truffle-brown-9);

  --editor-text-1: var(--very-dark-turquoise);
  --editor-text-2: var(--dark-turquoise);
  --editor-text-3: var(--turquoise);
  --editor-text-4: var(--medium-dark-turquoise);
  --editor-text-5: var(--dark-porsche);
  --editor-text-6: var(--dark-porsche);
  --editor-text-7: var(--medium-dark-porsche);
  --editor-text-8: var(--light-porsche);
  --editor-text-9: var(--pink);
  --editor-text-10: var(--light-pink);

  --icon-bg: invert(9%) sepia(8%) saturate(7492%) hue-rotate(301deg)
    brightness(96%) contrast(93%);
  --chevron-bg: invert(9%) sepia(8%) saturate(7492%) hue-rotate(301deg)
    brightness(96%) contrast(93%);

  --console-line: rgba(0, 0, 0, 0.05);
}

::selection {
  color: #000;
  background: var(--ganache-orange); /* WebKit/Blink Browsers */
}
.monaco ::selection {
  color: unset;
  background: var(--ganache-orange-dimmed);
}

html {
  -webkit-tap-highlight-color: var(--ganache-orange-transparent);
}

/* #endregion Themes*/
/* #region Global */
html,
body,
#page {
  margin: 0;
  padding: 0;
  color: var(--body-text);
  font-family: "Open Sans", sans-serif;
  line-height: 1.6;
}
#page {
  color: var(--body-text);
  background-color: var(--body-bg-color);
}
#theme-switch {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
.slider,
::-webkit-scrollbar-thumb {
  background: var(--main-bg-medium-contrast);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--main-bg-heavy-contrast);
}
::-webkit-scrollbar-corner {
  background: transparent;
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover,
a:focus {
  color: var(--link);
  text-decoration: underline;
}
i {
  font-size: 1.25em;
  cursor: pointer;
}
h1 {
  color: var(--editor-text-6);
  font-family: "Grand Hotel";
  font-weight: normal;
  margin: 0.5rem 0.5rem 0.5rem 1rem;
}
#sidebar-switch {
  opacity: 0;
  position: absolute;
}
#sidebar-switch:focus-visible ~ #page #sidebar-switch-button {
  outline: 1.5px solid var(--body-text);
  border-radius: 1px;
}

#page aside {
  display: none;
}

#sidebar-switch:checked ~ #page aside {
  display: block;
}
.small {
  font-size: 0.9em;
}
.container {
  display: flex;
  height: 100vh;
  flex-direction: column;
}
main {
  display: flex;
  overflow: auto;
}
/* #endregion Global */
/* #region Header */
header {
  position: relative;
  background-color: var(--nav-bg-color);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.35);
  z-index: 999;
  display: flex;
  align-items: center;
  padding: 1rem;
  border-bottom: solid 1px rgba(0, 0, 0, 0.3);
}
header:after {
  content: "";
  display: block;
  position: absolute;
  margin: 0 auto;
  height: 18px;
  bottom: -18px;
  left: 0;
  right: 0;
  background: radial-gradient(
      ellipse at 50% 0,
      rgba(0, 0, 0, 0.05) 0%,
      rgba(0, 0, 0, 0) 50%
    ),
    radial-gradient(
      ellipse 100% 3px at 50% 0,
      rgba(0, 0, 0, 0.05) 0%,
      rgba(0, 0, 0, 0) 50%
    );
  pointer-events: none;
}
[data-theme="light"] header {
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}
header h1 {
  display: inline-block;
  margin: 0;
  line-height: 1.5em;
  font-size: 1.75rem;
}
#sidebar-switch-button,
#sidebar-switch-button:after,
#sidebar-switch-button:before {
  border: solid 0.5rem var(--body-bg-color);
  cursor: pointer;
  height: 3px;
  position: relative;
  width: 18px;
  display: block;
  background: var(--body-text);
  height: 15px;
}
#sidebar-switch-button:after,
#sidebar-switch-button:before {
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  content: "";
  margin: 0;
  border: 0;
  background: var(--body-bg-color);
  height: 3px;
}
#sidebar-switch-button:after {
  top: auto;
  bottom: 3px;
}

.ganache-link {
  display: none;
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: center;
}
.ganache-link:focus {
  text-decoration: none;
}
.ganache-link img {
  height: 3em;
  width: 2.675em;
  display: inline-block;
  vertical-align: bottom;
  margin-right: 0.33rem;
}
.ganache-link h1 {
  margin: 0;
  display: inline-flex;
  line-height: 1.5em;
  font-size: 1.75rem;
}
a.ganache-link:hover {
  text-decoration: none;
}
/* large devices (desktops) */
@media (min-width: 992px) {
  .ganache-link {
    display: inline-block;
  }
  #sidebar-switch {
    display: none;
  }
  #sidebar-switch-button {
    display: none;
  }
}
header svg:hover {
  background-color: rgba(255, 255, 255, 0.13);
  border-radius: 16px;
}
.header-action .logo {
  height: 1.5rem;
  width: 1.5rem;
}
#color-switcher {
  position: relative;
  height: 2rem;
  width: 2rem;
}
#color-switcher img {
  height: 2rem;
  width: 1.5rem;
  margin: auto;
}

#theme-switch:checked ~ #page #moon {
  display: block;
}
#theme-switch ~ #page #moon {
  display: none;
}
#theme-switch:checked ~ #page #sun {
  display: none;
}
#theme-switch ~ #page #sun {
  display: block;
}
.header-action {
  display: flex;
  cursor: pointer;
  justify-content: center;
  align-items: center;
  margin-left: 1rem;
  filter: drop-shadow(0 -0.5px 0 rgba(255, 255, 255, 0.14))
    drop-shadow(0 1px 0 rgba(0, 0, 0, 0.15))
    drop-shadow(0 -1px 2px rgba(0, 0, 0, 0.1))
    drop-shadow(0 1px 2px rgba(255, 255, 255, 0.03));
}
[data-theme="light"] .header-action {
  filter: drop-shadow(0 -0.5px 0 rgba(255, 255, 255, 0.25))
    drop-shadow(0 1px 0 rgba(0, 0, 0, 0.05))
    drop-shadow(0 -1px 2px rgba(0, 0, 0, 0.01))
    drop-shadow(0 1px 2px rgba(255, 255, 255, 0.03));
}
.header-action > * {
  transition: background-color 0.2s ease-in-out;
  height: 2rem;
  width: 2rem;
  clip-path: url(#squircleClip);
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--action-bg-opaque);
  box-shadow: inset 0 3px 6px rgb(255 255 255 / 3%),
    inset 0 -3px 6px rgb(0 0 0 / 10%), inset 0 -1px 3px rgb(0 0 0 / 10%);
}
[data-theme="light"] .header-action > * {
  box-shadow: inset 0 3px 6px rgb(255 255 255 / 2.5%),
    inset 0 -3px 6px rgb(0 0 0 / 2.5%);
}
.header-action > *:hover {
  background-color: var(--action-bg-hover-opaque);
}
.header-action > *:active {
  opacity: 0.9;
}

.header-action:focus-visible,
#theme-switch:focus-visible ~ #page label[for="theme-switch"] {
  padding: 1.5px;
  background: var(--body-text);
  clip-path: url(#squircleClip);
  margin: -1.5px -1.5px -1.5px calc(1rem - 1.5px);
}
.header-actions {
  margin: 0 0 0 auto;
  display: flex;
}
.header-action .logo {
  filter: var(--icon-bg);
}
/* #endregion Header */
/* #region Main */
/* #endregion Main */
/* #region Sidebar */
aside {
  height: 100%;
  width: 100%;
  z-index: 2;
  background: var(--main-bg-color);
  overflow-x: scroll;
  scrollbar-width: thin;
  padding-left: 1em;
  max-width: 420px;
  min-width: 370px;
  box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.25);
}
aside ul {
  list-style: none;
  padding: 0 0 2rem 0;
  margin: 1rem 0;
}
aside ul li {
  margin: 0.5rem 1rem 0.5rem 0;
}
/* medium devices (tablets) */
@media (min-width: 768px) {
  aside {
    width: 33.3%;
  }
}
/* large devices (desktops) */
@media (min-width: 992px) {
  aside {
    width: 25%;
    display: block !important;
  }
}
.sidebar > details {
  margin-top: 20px;
}
.sidebar > details > summary {
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.sidebar > details:not([open]) > summary > img {
  transform: rotate(0deg);
}
.sidebar > details > summary > img {
  height: 1rem;
  width: 1rem;
  filter: var(--chevron-bg);
  margin-right: 0.5rem;
  transform: rotate(90deg);
  transition: transform 0.1s ease;
}
.sidebar > details > ul {
  text-transform: none;
  margin-left: 8px;
  margin-top: 5px;
  padding-bottom: 0px;
  border-left-style: dotted;
  border-left-width: 1px;
  border-color: rgba(255, 255, 255, 0.4);
}

.sidebar > details > ul > li {
  padding: 1px 0px 0px 10px;
  margin: 1px;
  white-space: nowrap;
}

.sidebar > details > ul > li:before {
  content: "";
  text-decoration: none;
  display: inline;
  margin-left: -11px;
  font-size: x-small;
  margin-right: 3px;
  color: rgba(255, 255, 255, 0.4);
  width: 10px;
  height: 4px;
  display: inline-block;
  border-top: dotted 1px white;
  opacity: 0.5;
}
/* #endregion Sidebar */

/* #region Article */
article {
  flex: 1;
  overflow: auto;
  padding: 0 1rem;
  scrollbar-width: thin;
}
article > div {
  margin-bottom: 2rem;
}
article .doc-section {
  border-radius: 4px;
  box-shadow: 0 3px 3px rgb(0 0 0 / 30%);
  background-color: var(--main-bg-color);
  border: 1px solid var(--section-border);
  border-top: solid 1px rgba(255, 255, 255, 0.2);
  padding-bottom: 2.1rem;
  contain: content;
  content-visibility: auto;
  contain-intrinsic-height: auto 600px;
}

[data-theme="light"] article .doc-section {
  border-top: solid 1px rgba(255, 255, 255, 0.075);
  box-shadow: 0 3px 3px rgb(0 0 0 / 12%);
}

.doc-section > div.content {
  padding: 0 1.8rem;
}
.doc-section > a[id] {
  /*anchor links*/
  transform: translateY(-1rem);
  display: block;
}
.preamble {
  background: transparent;
  border: none;
  box-shadow: none;
}
.preamble > h2 {
  margin-top: 0rem;
  padding-top: 2rem;
}
.category-header {
  margin-bottom: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.category-header > h2 {
  text-transform: uppercase;
  margin: 0;
  padding: 0.75rem 0rem;
}
.return_type {
  margin: 1em 0;
}
.return_type > p:nth-child(2) {
  display: inline;
}
.signature {
  font-size: 1.1em;
  padding: 1.5em 2em;
  background: var(--medium-bg-color);
  margin-top: 0em;
  font-family: "Share Tech Mono", monospace;
  border-radius: 3px 3px 0 0;
  position: relative;
}
.signature:after {
  content: "";
  display: block;
  position: absolute;
  left: -35%;
  right: -35%;
  margin: 0 auto;
  height: 12px;
  bottom: -12px;
  background: radial-gradient(
      ellipse at 50% 0,
      rgba(0, 0, 0, 0.15) 0%,
      rgba(0, 0, 0, 0) 50%
    ),
    radial-gradient(
      ellipse 100% 3px at 50% 0,
      rgba(0, 0, 0, 0.15) 0%,
      rgba(0, 0, 0, 0) 50%
    );
}
[data-theme="light"] .signature:after {
  background: radial-gradient(
      ellipse at 50% 0,
      rgba(0, 0, 0, 0.025) 0%,
      rgba(0, 0, 0, 0) 25%
    ),
    radial-gradient(
      ellipse 100% 3px at 50% 0,
      rgba(0, 0, 0, 0.15) 0%,
      rgba(0, 0, 0, 0) 75%
    );
}
.signature a {
  display: inline-block;
  text-decoration: none;
  color: var(--body-text);
}
.signature a:after {
  padding: 0 0.25rem;
  content: "#";
  color: rgba(255, 255, 255, 0.5);
  display: inline;
  font-style: italic;
  font-weight: normal;
  font-family: "Open Sans", sans-serif;
  line-height: initial;
  position: absolute; /* prevents the anchor from causing the line to wrap*/
  opacity: 0;
  transition: opacity 0.2s ease;
}
[data-theme="light"] .signature a:after {
  color: rgba(0, 0, 0, 0.5);
}
.signature a:hover:after {
  opacity: 1;
}
.tag {
  font-weight: bold;
  font-size: 1.1em;
  text-transform: capitalize;
}
.tag_example {
  padding-bottom: 1rem !important;
}
article div.wide-content {
  padding: 0 0;
}
code {
  font-size: 16px;
  background-color: var(--inline-code-color);
  border-radius: 1px;
  padding: 2px 3px;
  margin: 0px 1px;
  text-shadow: none !important;
  outline: solid 1px var(--inline-code-color);
  line-height: 19px;
}

/* #endregion Article */

/* #region MonacoEditorFacade */
.monaco {
  padding-left: 12px;
  min-height: 100px;
  background-color: var(--monaco-bg);
  overflow: auto;
  position: relative;
  line-height: 19px;
  transform: translate3d(0px, 0px, 0px);
  contain: strict;
  width: 1e6px;
  position: absolute;
  top: 0;
  opacity: 1;
  transition: opacity 3s ease;
}
.monaco pre {
  margin: 0px;
  padding-bottom: 20px;
  text-size-adjust: 100%;
}
*:focus-visible {
  outline-width: 1.5px;
  outline-style: solid;
  outline-offset: 2px;
  outline-color: var(--body-text);
  border-radius: 1px;
}
.monaco code {
  font-size: 14px;
  background-color: transparent;
  border: none;
  padding: initial;
  margin: initial;
  outline: none;
  line-height: 19px;
  vertical-align: top;
}
.monaco-editor .view-overlays .current-line {
  border-color: #a2828a12 !important; /* this is the border around the current selected line. it doesn't seem to be themeable. */
}
/* #endregion MonacoEditorFacade */

/* #region MonacoEditor */
.run-button {
  -webkit-tap-highlight-color: transparent;
  background: var(--primary-bg);
  color: var(--primary-text);
  position: absolute;
  right: 0;
  padding: 0.15em 0.45em;
  cursor: pointer;
  border-radius: 6px;
  z-index: 1;
  box-shadow: 0 1px 5px var(--action-shadow);
  position: absolute;
  transition: opacity 0.2s ease-in-out, background-color 0.2s ease-in-out;
  border: 0;
  line-height: 1.6;
  font-family: "Open Sans", sans-serif;
  font-size: 1em;
}
.run-button:before {
  content: "▶ ";
  display: inline;
  opacity: 0.9;
}
.run-button:hover {
  background-color: var(--primary-bg-hover);
}
.run-button:active {
  filter: brightness(0.95);
}
.console-line {
  border-bottom: solid 1px var(--console-line);
  padding: 0 1em;
}
.console-line:first-child {
  border-bottom: none;
}
.editor-container {
  position: relative;
  z-index: 0;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.075);
}
[data-theme="light"] .editor-container {
  box-shadow: 0 1px 0 rgb(255 255 255 / 25%);
}
.monaco-outer-container {
  position: relative;
}
.monaco-inner-container {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.075);
  position: relative;
  overflow: hidden;
  border-radius: 6px;
}
[data-theme="light"] .monaco-inner-container {
  box-shadow: 0 1px 0 rgb(255 255 255 / 25%);
}
.console-container::before,
.monaco::before,
.editor-container::before {
  content: " ";
  pointer-events: none;
  width: 100%;
  position: absolute;
  height: 12px;
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), transparent 7px);
  z-index: 1;
  left: 0;
  border-radius: 6px;
}
[data-theme="light"] .console-container::before,
[data-theme="light"] .monaco::before,
[data-theme="light"] .editor-container::before {
  height: 14px;
  background-image: linear-gradient(rgba(0, 0, 0, 0.02), transparent);
}
.console-container {
  margin-top: 0.75rem;
  position: relative;
  z-index: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.075);
  border-radius: 6px;
}
.console {
  font-family: "Droid Sans Mono", monospace, monospace, "Droid Sans Fallback";
  font-size: 14px;
  font-feature-settings: "liga" 0, "calt" 0;
  line-height: 19px;
  letter-spacing: 0px;
  height: 200px;
  position: relative;
  overflow: auto;
  scrollbar-width: thin;
  padding: 0.3em 0.1em;
  display: flex;
  flex-direction: column-reverse;
  border-radius: 0 0 6px 6px;
}
.console::-webkit-scrollbar {
  width: 12px;
}
.console::-webkit-scrollbar-track {
  background: transparent;
}
.slider,
.console::-webkit-scrollbar-thumb {
  background: hsl(345deg 6% 36% / 61%);
}
.console::-webkit-scrollbar-thumb:hover {
  background: hsl(345deg 6% 36% / 70%);
}

.tab-container {
  border-top: solid 1px var(--console-line);
  position: relative;
  z-index: 9;
  font-size: 0.75em;
  text-transform: uppercase;
  border-radius: 6px 6px 0 0;
}
.tab {
  display: inline-block;
  border: none;
  border-bottom: solid 1px var(--body-bg-color);
  opacity: 0.6;
  padding: 1em;
  padding: 1em;
  cursor: pointer;
  color: var(--console-tab-text);
  transition: all 0.15s ease-in-out;
  background-color: transparent;
}
.tab-active,
.tab:hover {
  opacity: 1;
}
.tab-active {
  border-bottom: solid 1px var(--console-tab-border);
}
.monaco-editor,
.monaco-editor .overflow-guard {
  border-radius: 6px;
}
/* #endregion MonacoEditor */
