.console-ui-panel {
  background: linear-gradient(to right, #191a1c, #1b212d);
  height: 0;
  left: 0;
  position: fixed;
  min-height: 0;
  overflow: scroll;
  right: 0;
  top: $header-height;
  transition: min-height $speed ease-out, transform $speed ease-in;
  will-change: transform, min-height;
  -webkit-overflow-scrolling: touch;
  width: 100vw;
  z-index: 199;

  .button {
    background: transparent;
    border: none;
    color: $grey;
    min-width: 0;
    padding: 0 $size-8;

    &.active,
    &:hover {
      background: $blue;
      color: $white;
    }
  }
}

.console-ui-panel-content {
  color: $white;
  display: flex;
  flex-direction: column;
  font-size: $body-size;
  font-weight: $font-weight-semibold;
  justify-content: flex-end;
  min-height: 100%;
  padding: $size-8 $size-8 $size-4;
  transition: justify-content $speed ease-in;

  pre,
  p {
    background: none;
    color: inherit;
    font-size: $body-size;
    min-height: 2rem;
    padding: 0;

    &:not(.console-ui-command):not(.CodeMirror-line) {
      padding-left: $console-spacing;
    }
  }

  .cm-s-hashi.CodeMirror {
    background-color: rgba($black, 0.5) !important;
    font-weight: $font-weight-normal;
    margin-left: $console-spacing;
    padding: $size-8 $size-4;
  }
}

.console-ui-panel-content.hover-copy-button,
.console-ui-panel-content.hover-copy-button-static {
  top: auto;
  bottom: 0;
  right: 0;
}

.console-ui-input {
  align-items: center;
  display: flex;

  input {
    background-color: rgba($black, 0.5);
    border: 0;
    caret-color: $white;
    color: $white;
    flex: 1 1 auto;
    font-family: $family-monospace;
    font-size: 16px;
    font-weight: $font-weight-bold;
    margin-left: -$size-10;
    outline: none;
    padding: $size-10;
    transition: background-color $speed;
  }
}

.console-ui-command {
  line-height: 2;
}

.console-ui-output {
  transition: background-color $speed ease-in-out;
  will-change: background-color;
  padding-right: $size-2;
  position: relative;
  background-color: rgba(#000, 0);
  &:hover {
    background-color: rgba(#000, 0.5);
  }
}

.console-ui-alert {
  margin-left: calc(#{$console-spacing} - 0.33rem);
  position: relative;

  svg {
    position: absolute;
    left: 0;
    top: 0;
  }
}

.panel-open .console-ui-panel {
  box-shadow: $box-shadow-highest;
  min-height: 400px;
}

.panel-open .console-ui-panel.fullscreen {
  bottom: 0;
  top: 0;
  min-height: 100vh;
}

.panel-open {
  .navbar,
  .navbar-sections {
    transition: transform $speed ease-in;
  }
}

.panel-open.panel-fullscreen {
  .navbar,
  .navbar-sections {
    @include from($mobile) {
      transform: translateY(-100px);
    }
  }
}

header .navbar,
header .navbar-sections {
  z-index: 200;
  transform: translateY(0);
  will-change: transform;
}

.console-spinner.control {
  height: 21px;
  width: 21px;
  transform: scale(0.75);
  transform-origin: center;
  &::after {
    height: auto;
    width: auto;
    right: 0.25rem;
    left: 0.25rem;
    top: 0.25rem;
    bottom: 0.25rem;
  }
}

.console-close-button {
  position: absolute;
  top: -3.25rem;
  right: $spacing-xs;
  z-index: 210;

  @include from($mobile) {
    display: none;
  }
}
