/* copy button */
button.copy,
button.copy:after {
  all: unset;
  box-sizing: border-box;
  position: relative;
  display: inline-block;
  width: 1em;
  height: 1.2em;
  border-radius: .2em;
  border: 2px solid #aaa;
  cursor: pointer;
  opacity: .8;
  font-size: .7rem;

  transition: opacity .3s;
}

button.copy {
  margin: 0 .7em;
}

button.copy:hover {
  opacity: 1;
}

button.copy:after {
  content: ' ';
  position: absolute;
  left: 20%;
  top: 20%;
  background-color: #fff;
}

/* info */
.info {
  position: relative;
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  margin: 0 .3em;
  vertical-align: top;
  border-radius: 50%;
  color: #fff;
  font-family: 'Chivo', sans-serif;
  background-color: rgba(0, 0, 0, .4);
  cursor: pointer;
  text-align: center;
  transition: background-color .4s;
  font-size: .8em;
}

.info:before {
  content: 'i';
  font-family: sans-serif;
  position: absolute;
  left: 0px;
  width: 1.15em;
  height: 0.95em;
  font-size: .9em;
}

.info:hover {
  background-color: rgba(0, 0, 0, .7);
}

.info:after {
  content: attr(data-text);
  position: absolute;
  visibility: hidden;
  left: 50%;
  display: inline-block;
  width: 200px;
  max-width: 40vw;
  padding: .4em;
  font-weight: normal;
  font-size: .9rem;
  border-radius: .2em;
  background-color: rgb(59, 59, 59);
  box-shadow: 0 .2em .5em rgba(0, 0, 0, .4);
  transform: translateX(-50%) translateY(-100%);
  z-index: 400;
  opacity: 0;

  transition: opacity .4s;
}

.info:hover:after {
  visibility: visible;
  opacity: 1;
}

/* notification */
@keyframes notify {
  0% {
    opacity: 0;
  }

  15% {
    opacity: 1;
  }

  80% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

.info-label,
.notification {
  position: absolute;
  display: inline-block;
  left: 50%;
  top: 50%;
  max-width: 30vw;
  padding: .4em;
  color: #fff;
  font-weight: normal;
  font-size: .9rem;
  text-align: center;
  line-height: 1.05;
  border-radius: .2em;
  background-color: rgba(59, 59, 59, .85);
  box-shadow: 0 .2em .5em rgba(0, 0, 0, .4);
  z-index: 1000;
  opacity: 0;

  pointer-events: none;

  transform: translateX(-50%) translateY(-100%);

  animation-name: notify;
  animation-duration: 1s;
}

@keyframes info {
  0% {
    opacity: 0;
  }

  60% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

*[data-info-text] {
  cursor: pointer;
}

.info-label {
  font-size: .8rem;
  opacity: 1;
  animation-duration: .6s;
  animation-name: info;
}

/* foldables */
.foldable>.fold-content {
  max-height: 5000px;
  transition: max-height .3s, padding .3s;
  overflow: visible;
  /* padding-top: .5em; */
}

.folded>.fold-content {
  overflow: hidden;
  max-height: 0px;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.fold {
  cursor: pointer;
  padding: 0 .1em;
}

.fold:before {
  position: relative;
  float: left;
  font-size: 1em;
  line-height: 1;
  content: '▾';
  opacity: .5;

  transition: transform .3s, opacity .3s;
  transform: rotate(deg);

}

.fold:hover:before {
  opacity: 1;
}

.folded .fold:before {
  transform: rotate(-90deg)
}


/* toggles */
.toggle {
  display: inline-flex;
  flex-direction: inherit;
  align-items: center;
  background-color: rgba(255, 255, 255, .1);
  border: 1px solid rgba(0, 0, 0, .3);
  padding: 0;
  overflow: hidden;
  font-size: 1.1em;
  font-weight: normal;
  color: #fff;
  border-radius: .5em;
}

.toggle:hover {
  background-color: var(--uiBaseColor);
}

.toggle.on,
.toggle span.on {
  background-color: rgba(0, 0, 0, .6);
  text-shadow: 0 .05em .05em rgba(0, 0, 0, .7);
  color: rgba(255, 255, 255, .9);
  opacity: 1;
}

.toggle.active.on,
.toggle.active span.on {
  background-color: var(--highlight);
}

.toggle span {
  display: inline-block;
  opacity: .6;
  padding: .25em;
  text-shadow: 0 .05em .05em #000;
  font-weight: bold;
  cursor: pointer;
}

.toggle span:not(.on):hover {
  background-color: rgba(0, 0, 0, .3);
  opacity: .8;
}

/* toggle slider */
.toggle.slide {
  all: unset;
  position: relative;
  display: inline-flex;
  align-content: center;
  color: #fff;
  opacity: .8;
  cursor: pointer;
}

.toggle.slide:hover {
  opacity: 1;
}

.toggle.slide:before {
  content: attr(data-off-text);
  padding: 0 .3em;
  opacity: 1;
}

.toggle.slide.on:before {
  opacity: .7;
}

.toggle.slide:after {
  content: attr(data-on-text);
  padding: 0 .3em;
  opacity: .7;
}

.toggle.slide.on:after {
  opacity: 1;
}

.toggle.slide>span {
  all: unset;
  position: relative;
  display: inline-flex;
  align-content: center;
  min-width: 2em;

  pointer-events: none;
}

.toggle.slide.on>span {
  opacity: 1;
}

.toggle.slide.active.on {
  background-color: transparent;
}

.toggle.slide>span:before {
  content: ' ';
  position: absolute;
  top: .4em;
  width: 100%;
  height: .6em;

  background-color: rgba(255, 255, 255, 0.5);
  border-radius: .3em;

  transition: background-color .3s;
}

.toggle.slide>span:after {
  content: ' ';
  position: relative;
  top: .2em;
  width: 1em;
  height: 1em;

  background-color: var(--uiBaseColor);
  box-shadow: 0 0 .2em rgba(0, 0, 0, .6);
  border-radius: .5em;

  transform: translateX(0%);
  transition: transform .3s, background-color .3s;
}


.toggle.on.slide>span:after {
  transform: translateX(100%);
}

.toggle.slide:hover>span:before,
.toggle.slide.on.active:before {
  background-color: var(--uiBaseColor);
}

.toggle.slide:hover>span:after,
.toggle.slide.on.active>span:after {
  background-color: var(--uiBaseColor);
}