html {
  font-size: 16px;
}

body {
  background-color: var(--theme-background-base);
  color: var(--theme-color-base);
  overflow-x: hidden;

  &.-unselectable {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
  }
}

.-no-animations {
  animation: none !important;
  transition: none !important;

  * {
    animation: none !important;
    transition: none !important;

    &:before,
    &:after {
      animation: none !important;
      transition: none !important;
    }
  }
}

#app {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.3s $ease-out-expo;
  background-color: var(--theme-background-base);
  color: var(--theme-color-base);
}

.app__loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.app__wrapper {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.app__layout {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0px;
}

/* Flex helpers
*/

.column {
  display: flex;
  flex-direction: row;

  &.-wrap {
    flex-wrap: wrap;
  }

  > .-tight {
    flex-basis: auto;
    flex-grow: 0;

    label {
      white-space: nowrap;
    }
  }

  > .-fill {
    flex-basis: 100%;
    max-width: 100%;
  }

  > .-center {
    align-self: center;
  }

  > .-end {
    align-self: end;
  }

  > .-start {
    align-self: start;
  }

  > .-nowrap {
    white-space: nowrap;
  }

  > .-unshrinkable {
    flex-shrink: 0;
  }

  > div {
    margin-right: 8px;
    flex-grow: 1;

    > .btn {
      white-space: nowrap;
    }

    &:last-child {
      margin-right: 0;
    }
  }

  > label {
    margin-bottom: 0;
  }
}

blockquote {
  padding: 0.25rem 0.5rem;
  margin-left: 0;
  margin-bottom: 0;
  border-left: 1px solid white;
  opacity: 0.6;
}

code {
  font-family: $font-monospace;

  &.-filled {
    background-color: var(--theme-base-o25);
    color: var(--theme-color-base);
    border-radius: 4px;
    padding: 0.25rem;
  }
}

p {
  &.-nl {
    white-space: pre-line;
  }

  > i {
    vertical-align: bottom;
  }
}

/* Transitions
*/

.fade-scale {
  &-enter-active {
    transition:
      all 0.1s $ease-out-expo,
      transform 0.1s $ease-elastic;
    pointer-events: none;
  }

  &-leave-active {
    transition: all 0.2s $ease-out-expo;
  }

  &-leave,
  &-enter-to {
    opacity: 1;
    transform: none;
  }

  &-enter,
  &-leave-to {
    opacity: 0;
    transform: scale(1.2);
  }
}

.flip-list-move {
  transition: transform 0.1s linear;
}

#app.-no-animations *.flip-list-move {
  transition: transform 0.1s linear !important;
}

@keyframes highlight {
  0% {
    opacity: 0.75;
  }

  100% {
    opacity: 0;
  }
}

/* Stylized divider with text
*/

.divider-container {
  container-type: inline-size;

  .divider--vertical {
    @container (min-width: 380px) {
      margin: 0 1rem;
      flex-direction: column;
      align-items: center;
      min-height: 100px;
      width: auto;

      &:before,
      &:after {
        height: auto;
        width: 1px;
        margin: 0;
      }

      &:before {
        margin-bottom: 1rem;
      }

      &:after {
        margin-top: 1rem;
      }
    }
  }
}

.divider {
  $self: &;
  margin: 1rem 0;
  display: flex;
  align-items: center;
  text-transform: uppercase;
  color: var(--theme-background-300);
  width: 100%;

  &:before,
  &:after {
    content: '';
    height: 1px;
    background-color: var(--theme-background-150);
    flex-grow: 1;
  }

  &:before {
    margin-right: 1rem;
  }

  &:after {
    margin-left: 1rem;
  }
}
