* {
  scroll-behavior: smooth;
}

body {
  font-family: 'Hind', sans-serif;
  background: #f5f5f5;
  color: #424242;
  width: 100vw;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

body.dark-mode {
  background: #212121;
  color: #eeeeee;
}

body.dark-mode-animate {
  transition: background .3s, color .3s;
}

.container {
  max-width: 768px;
  padding: 32px;
  margin: 0 auto;
  margin-bottom: 64px;
}

a {
  text-decoration: none !important;
  outline: none !important;
  color: #4A90E2;
  position: relative;
}

a.button {
  color: white;
  background: #4A90E2;
  padding: 4px 16px;
  border-radius: 3px;
  border: 2px solid #4A90E2;
  min-width: 96px;
  display: inline-flex; justify-content: center; align-items: center;
  transition: background .15s, color .15s;
}

a.button:hover {
  background: transparent;
  color: #4A90E2;
}

a:not(.button)::after {
  content: ' ';
  position: absolute;
  left: 0px;
  right: 0px;
  bottom: 4px;
  height: 2px;
  background: #4A90E2;
  z-index: -1;
  transform: scaleX(0);
  transition: transform .1s;
}

a:not(.button):hover::after {
  transform: scaleX(1);
}

a.no-underline::after {
  display: none;
}

.buttons {
  text-align: right;
}

pre + .buttons {
  margin-top: -16px;
  margin-bottom: 24px;
}

.buttons a:not(.button) {
  margin: 0 32px;
}

.copy-btn {
  padding: 0;
  width: 38px;
  height: 38px;
  position: relative;
  border: 2px solid #4A90E2;
  background: #4A90E2;
  vertical-align: top;
  border-radius: 3px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background .15s;
  margin-right: 8px;
}

.copy-btn:hover { background: transparent; }

.copy-btn img {
  position: absolute;
  width: 24px;
  transition: opacity .15s;
}

.copy-btn img:last-child { opacity: 0; }
.copy-btn:hover img:last-child { opacity: 1; }
.copy-btn:hover img:first-child { opacity: 0; }

.logo {
  max-width: 380px;
  width: 100%;
  display: block;
  margin: 0 auto;
}

.logo-group {
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

.logo-group .logo.dark {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

body.dark-mode-animate .logo {
  transition: opacity .3s;
}

body.dark-mode .logo.light {
  opacity: 0;
}

body.dark-mode .logo.dark {
  opacity: 1;
}

.bottom-logo {
  max-width: 128px;
  width: 100%;
  display: block;
  margin: 64px auto;
  opacity: 1;
}

body.dark-mode-animate .bottom-logo {
  transition: opacity .3s;
}

body.dark-mode .bottom-logo {
  opacity: .1;
}

.animation {
  max-width: 320px;
  width: 100%;
  display: block;
  margin: 0 auto;
  opacity: 1;
}

body.dark-mode-animate .animation {
  transition: opacity .3s;
}

body.dark-mode .animation.light {
  opacity: 0;
}

.animation.dark {
  opacity: 0;
}

body.dark-mode .animation.dark {
  opacity: 1;
}

.animation-group {
  position: relative;
  max-width: 320px;
  width: 100%;
  margin: 0 auto;
}

.animation-group .animation:not(:first-child) {
  position: absolute;
  top: 0;
  left: 0;
}

h1[main] {
  font-weight: normal;
  font-size: 48px;
}

h1[id], h2[id], h3[id] {
  position: relative;
  cursor: pointer;
}

h1[id]::before, h2[id]::before, h3[id]::before {
  content: ' ';
  position: absolute;
  top: -4px;
  bottom: 0;
  left: -32px;
  width: 24px;
  background-position: center;
  background-repeat: no-repeat;
  background-image: url('./link.svg');
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity .15s, transform .15s;
}

body.dark-mode h1[id]::before,
body.dark-mode h2[id]::before,
body.dark-mode h3[id]::before {
  background-image: url('./link-dark.svg');
}

h1[id]:hover::before, h2[id]:hover::before, h3[id]:hover::before {
  opacity: .5;
  transform: translateX(0px);
}

/*********** 404 ***********/

.not-found .image-group {
  width: 100%;
  margin: 0 auto;
  display: block;
  position: relative;
}

.not-found .image-group img {
  width: 100%;
}

body.dark-mode-animate .not-found .image-group img {
  transition: opacity .3s;
}

.not-found .image-group img.dark {
  position: absolute;
  top: 0; left: 0;
  opacity: 0;
}

body.dark-mode .image-group img.dark { opacity: 1; }
body.dark-mode .image-group img.light { opacity: 0; }

.not-found span.dark { display: none; }
body.dark-mode .not-found span.dark { display: inline; }
body.dark-mode .not-found span.light { display: none; }

/*********** toc ***********/

#toc {
  position: fixed;
  top: 0;
  bottom: 64px;
  right: 0;
  width: calc(50% - 384px);
  display: flex;
  justify-content: flex-end;
  flex-direction: column;
  font-size: 12px;
}

#toc>div {
  padding-left: 48px;
  margin-left: 64px;
  border-left: 1px dashed #cacaca;
  transition: border-color .3s;
}

body.dark-mode #toc>div {
  border-color: #424242;
}

#toc a { color: #bdbdbd; transition: color .15s; }
body.dark-mode #toc a { color: #424242; }
#toc a.visible, body.dark-mode #toc a.visible { color: #4A90E2; }
#toc a.h2 { margin-left: 16px; }
#toc a.h3 { margin-left: 32px; }
#toc a:hover, body.dark-mode #toc a:hover { color: #4A90E2; }

@media screen and (max-width: 1200px) {
  #toc { display: none; }
}

/*********** nav ***********/

#nav {
  position: fixed;
  top: 0;
  bottom: 64px;
  left: 0;
  width: calc(50% - 384px);
  background: #f5f5f5;
  transform: translateY(110vh);
  transition: transform .3s, background .3s;
  display: flex;
  flex-direction: column;
}

body.dark-mode #nav {
  background: #212121;
}

#nav.active {
  transform: translateY(0);
}

#nav .contents {
  margin: 32px;
  margin-bottom: 0px;
  flex-grow: 1;
  overflow-y: auto;
}

#nav .search {
  position: relative;
  margin: 32px;
  margin-bottom: 0px;
}

#nav .search input {
  display: block;
  width: calc(100% - 9px);
  font-family: 'Hind', sans-serif;
  font-size: 14px;
  padding: 4px 0;
  padding-left: 8px;
  border: 1px solid #e0e0e0;
  background: white;
  border-radius: 32px;
  outline: none;
  color: inherit;
  transition: background .3s, border-color .3s;
}

body.dark-mode #nav .search input {
  background: black;
  border-color: #424242;
}

#nav .search input::placeholder {
  color: #9e9e9e;
  font-style: italic;
  transition: color .3s;
}

body.dark-mode #nav .search input::placeholder {
  color: #616161;
}

#nav .search p {
  font-size: 10px;
  color: #9e9e9e;
  margin-left: 8px;
  transition: color .3s;
}

body.dark-mode #nav .search p {
  color: #616161;
}

#nav .search .icon {
  position: absolute;
  width: 24px;
  height: 24px;
  top: 4px;
  right: 8px;
}

#nav .search .icon.loading {
  animation-name: rotate;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  -webkit-animation-name: rotate;
  -webkit-animation-duration: 1s;
  -webkit-animation-timing-function: linear;
  -webkit-animation-iteration-count: infinite;
}

#nav .search .icon img {
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  transition: transform .15s, opacity .15s;
}

#nav .search .icon.loading img.handle {
  opacity: 0;
}

#nav .search .icon.loading img.ring {
  transform: scale(1.5) translateX(2.156px) translateY(2.156px);
}

@-webkit-keyframes rotate {
  from {transform: rotate(0deg);}
  to {transform: rotate(360deg);}
}

@keyframes rotate {
  from {transform: rotate(0deg);}
  to {transform: rotate(360deg);}
}

#nav a {
  transition: opacity .5s;
}

#nav a::before {
  content: ' ';
  position: absolute;
  left: -8px; right: -8px;
  top: 8px; bottom: 8px;
  background: #ffd740;
  z-index: -1;
  border-radius: 3px;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: opacity .5s, transform .5s, background .3s;
}

body.dark-mode #nav a::before {
  background: #6a1b9a;
}

#nav a.highlight::before {
  opacity: 1;
  transform: scaleX(1);
}

#nav a.faded {
  opacity: .25;
}

#nav hr {
  border: none;
  border-top: 1px dashed #bdbdbd;
  transition: border-color .3s;
}

body.dark-mode #nav hr {
  border-color: #424242;
}

@media screen and (max-width: 1200px) {
  #nav {
    width: 100vw;
    transition: transform .3s;
  }
}

/*********** tabs ***********/

[tabs] [tab] {
  display: none;
}

[tabs] [tab].active {
  display: block;
}

.tab-toggles {
  border-radius: 3px;
  border: 2px solid #4A90E2;
  height: 32px;
  margin: 0 auto;
  display: flex;
  width: 50%;
}

@media screen and (max-width: 1200px) {
  .tab-toggles {
    width: 100%;
  }
}

.tab-toggles button {
  flex-grow: 1;
  cursor: pointer;
  outline: none;
  height: 32px;
  background: transparent;
  color: #4A90E2;
  padding: 4px 16px;
  margin: 0;
  border: none;
  width: 100%;
  font-size: 14px;
  font-family: inherit;
  display: inline-flex; justify-content: center; align-items: center;
  transition: background .15s, color .15s;
}

.tab-toggles button:not(:last-child) {
  border-right: 2px solid #4A90E2;
}

.tab-toggles button.active {
  color: white;
  background: #4A90E2;
}

/*********** prevnext ***********/

#prevnext {
  display: flex;
  flex-direction: row;
  margin: 0 auto;
  margin-top: 64px;
  margin-bottom: 128px;
  width: 75%;
}

@media screen and (max-width: 1200px) {
  #prevnext {
    width: 100%;
  }
}

#prevnext hr {
  border: none;
  width: 4px;
  height: 24px;
  background: #e0e0e0;
}

body.dark-mode-animate #prevnext hr {
  transition: background .3s;
}

body.dark-mode #prevnext hr {
  background: #313131;
}


#prevnext #prev,
#prevnext #next {
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  opacity: 0;
}

#prevnext #prev.active,
#prevnext #next.active {
  cursor: pointer;
  opacity: 1;
}

#prevnext #prev:hover a::after,
#prevnext #next:hover a::after {
  transform: scaleX(1);
}

#prevnext #prev::before,
#prevnext #next::after 
{
  position: absolute;
  width: 12px; height: 12px; content: ' ';
  border: 4px solid;
  border-color: #e0e0e0;
  border-top: none;
  border-right: none;
}

body.dark-mode-animate #prevnext #prev::before,
body.dark-mode-animate #prevnext #next::after {
  transition: border-color .15s;
}

body.dark-mode #prevnext #prev::before,
body.dark-mode #prevnext #next::after {
  border-color: #313131;
}

#prevnext #prev:hover::before,
#prevnext #next:hover::after,
body.dark-mode #prevnext #prev:hover::before,
body.dark-mode #prevnext #next:hover::after {
  border-color: #4A90E2;
}

#prevnext #prev::before {
  left: 0;
  transform-origin: 2px 2px;
}

#prevnext #next::after {
  right: 0;
  transform-origin: 14px 2px;
}

#prevnext #prev::before {
  transform: rotate(45deg);
}

#prevnext #next::after {
  transform: rotate(-135deg);
}

/*********** header ***********/

#header {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  padding: 24px;
}

/*********** footer ***********/

.footer {
  position: fixed;
  background: #f5f5f5;
  left: 0; right: 0; bottom: 0; height: 64px;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}

body.dark-mode-animate .footer {
  transition: background .3s, color .3s;
}

body.dark-mode .footer {
  background: #212121;
}

.footer hr {
  width: 2px;
  height: 24px;
  background: #e0e0e0;
  margin: 0 32px;
  border: none;
}

body.dark-mode-animate .footer hr {
  transition: background .3s;
}

body.dark-mode .footer hr {
  background: #424242;
}

.footer #dmtoggle {
  width: 48px;
  height: 48px;
  position: absolute;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  right: 32px;
  opacity: .25;
  cursor: pointer;
  transition: transform .3s, opacity .15s;
}

body.dark-mode .footer #dmtoggle {
  transform: rotate(-45deg);
}

.footer #dmtoggle:hover {
  opacity: 1;
}

.footer #dmtoggle div {
  position: absolute;
  background: #424242;
  transition: transform .3s, background .3s, opacity .3s;
}

body.dark-mode .footer #dmtoggle div {
  background: #f5f5f5;
}

.footer #dmtoggle .arc, .footer #dmtoggle .darc {
  width: 16px;
  height: 16px;
  border-radius: 16px;
}

body.dark-mode .footer #dmtoggle .arc {
  transform: scale(1.2);
}

.footer #dmtoggle .darc {
  background: #f5f5f5;
  transform: translateX(24px);
}

body.dark-mode .footer #dmtoggle .darc {
  transform: translateX(6px);
  background: #212121;
}

.footer #dmtoggle .ray {
  width: 6px;
  height: 2px;
  border-radius: 2px;
}

.footer #dmtoggle .ray.one { transform: rotate(0deg) translateX(14px); }
.footer #dmtoggle .ray.two { transform: rotate(45deg) translateX(14px); }
.footer #dmtoggle .ray.three { transform: rotate(90deg) translateX(14px); }
.footer #dmtoggle .ray.four { transform: rotate(135deg) translateX(14px); }
.footer #dmtoggle .ray.five { transform: rotate(180deg) translateX(14px); }
.footer #dmtoggle .ray.six { transform: rotate(225deg) translateX(14px); }
.footer #dmtoggle .ray.seven { transform: rotate(270deg) translateX(14px); }
.footer #dmtoggle .ray.eight { transform: rotate(315deg) translateX(14px); }

body.dark-mode .footer #dmtoggle .ray {
  transform: scaleX(0.01);
  opacity: 0;
}

.footer img {
  height: 48px;
}

.footer .nav {
  height: 48px;
  position: absolute;
  left: 32px;
  text-align: center;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  flex-direction: column;
  height: 16px;
  opacity: .5;
  transition: opacity .15s;
}

.footer .nav.active, .footer .nav:hover {
  opacity: 1;
}

.footer .nav .line {
  width: 24px;
  height: 2px;
  background: #424242;
  transition: opacity .15s, transform .15s, background .3s;
  transform-origin: 16px 1px;
}

body.dark-mode .nav .line {
  background: #eeeeee;
}

.footer .nav.active .line {
  transform: rotate(45deg);
}

.footer .nav.active .line:first-child {
  transform: rotate(-45deg);
}

.footer .nav.active .line:last-child {
  opacity: 0;
}

@media screen and (max-width: 1200px) {
  .footer .nav {
    left: 12px;
  }

  .footer #dmtoggle {
    right: 12px;
  }
}

/*********** gitter ***********/

.gitter-chat-embed {
  z-index: 1000;
  transition: transform .3s, opacity .15s;
  padding-top: 64px;
  border-left: none;
}

.gitter-chat-embed.is-collapsed {
  opacity: 0;
}

.gitter-chat-embed .gitter-chat-embed-action-bar {
  padding: 12px;
}

.gitter-chat-embed .gitter-chat-embed-action-bar-item-pop-out {
  flex-grow: 1;
  background-position: 8px center;
  justify-content: flex-start;
  padding-left: 48px;
  color: #424242;
  font-size: 14px;
  font-weight: 100;
  opacity: .5;
  background-image: url('/docs/assets/gitter.svg');
}

.gitter-chat-embed .gitter-chat-embed-action-bar-item-collapse-chat {
  background-image: url('https://www.materialui.co/materialIcons/navigation/close_black_72x72.png');
}

/*********** overlays ***********/

.overlay {
  position: fixed; display: flex;
  z-index: -1000; opacity: 0;
  background: rgba(0, 0, 0, .85); color: white;
  align-items: center; justify-content: center; text-align: center;
  font-size: 48px;
  left: 0; top: 0; bottom: 0; right: 0;
  user-select: none;
  transition: opacity 0s;
}

.overlay.fade {
  background: rgba(0, 0, 0, .5);
}

.overlay.active {
  opacity: 1; z-index: 1000; transition: opacity .15s;
}

/*********** code previews ***********/

.pre-holder {
  display: flex;
  flex-direction: row;
}

.pre-holder .code-holder {
  width: 65%;
}

.pre-holder .preview-holder {
  flex-grow: 1;
  padding: 12px;
  padding-right: 2px;
  padding-bottom: 29px;
}

iframe.preview {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
  border-radius: 3px;
  overflow: hidden;
  background: #ffffff;
}

.pre-holder + .buttons {
  margin-top: -16px;
}

@media screen and (max-width: 768px) {
  .pre-holder {
    flex-direction: column;
  }

  .pre-holder .code-holder {
    width: 100%;
  }

  .pre-holder .preview-holder {
    width: 100%;
    min-height: 256px;
    padding: 0;
    margin-top: -12px;
  }

  iframe.preview {
    min-height: 256px;
  }

  .pre-holder + .buttons {
    margin-top: 12px;
    margin-bottom: 24px;
  }
}

/*********** hljs overrides ***********/

span[code] {
  background: rgba(128, 128, 128, .12);
  font-family: 'Source Code Pro', monospace;
  font-size: 14px;
  padding: 4px;
  border-radius: 3px;
}

pre[copy] {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

pre[copy]::after {
  position: absolute;
  right: 0; top: 0; height: 64px;
  content: '< click to copy';
  color: #4A90E2; border-radius: 3px;
  background: #212121;
  font-family: 'Hind', sans-serif;
  font-size: 14px; font-weight: bold;
  display: flex; justify-content: center; align-items: center;
  padding: 0 16px;
  transform: translateX(100%);
  transition: all .15s;
}

pre:not([copy]) code:not(.processed),
pre:not([copy]) code:not(.processed) * {
  color: transparent !important;
}

body.dark-mode pre[copy]::after {
  background: #111111;
}

pre[copy]:hover::after {
  transform: translateX(0);
}

code .line {
  cursor: pointer;
  background: transparent;
  transition: background .1s;
  position: relative;
  padding: 1px 0;
  min-width: 720px;
}

code .line span[line-counter] {
  width: 24px;
  margin-right: 12px;
  padding-right: 12px;
  text-align: right;
  font-size: 10px;
  line-height: 16px;
  display: inline-block;
  color: transparent;
  border-right: 2px solid rgba(255, 255, 255, .015);
  transition: border-color .1s, color .1s;
}

code .line span[line-counter].prim {
  color: #616161;
}

body.dark-mode code .line span[line-counter].prim {
  color: #424242;
}

code .line:hover span[line-counter],
body.dark-mode code .line:hover span[line-counter] {
  border-color: #7187ff;
  color: #7187ff;
}

code .line.highlight {
  background: rgb(40, 46, 73);
  color: #ffffff;
}

body.dark-mode code .line.highlight {
  background: rgb(28, 29, 48);
}

code .line:hover {
  background: #424242;
}

body.dark-mode code .line:hover {
  background: #212121;
}

.hljs {
  background: #212121;
  color: #e0e0e0;
  padding: 24px;
  border-radius: 3px;
  font-size: 13px;
  font-family: 'Source Code Pro', 'Courier New', Courier, monospace;
}

pre:not([copy]) code.hljs {
  padding: 24px 0px;
}

body.dark-mode .hljs {
  background: #111111;
}

.hljs-keyword {
  color: #7187ff;
  font-weight: normal;
}

.hljs-built_in {
  color: #b388ff;
}

.hljs-subst {
  color: #B8E986;
}

.hljs-number {
  color: #ffc400;
}

.hljs-literal {
  color: #ffc400;
}

.hljs-title {
  color: #ffffff;
  font-weight: normal;
}

.hljs-attr {
  color: #ffea00;
}

.hljs-string {
  color: #69f0ae;
}

.func-arrow {
  color: #18ffff;
}


.hljs-comment {
  color: #757575;
  transition: color .3s;
}

body.dark-mode .hljs-comment {
  color: #757575;
}
