@import 'base';

.sidemenu {
  position: absolute;
  left: 0;
  width: 20%;
  height: 100%;
  background: $primary-dark;
}

.panel {
  position: absolute;
  width: 40%;
  height: 100%;
  box-shadow: -4px 0 4px 0px rgba(0, 0, 0, .15);
}

#lang-from {
  left: 20%;
}

#lang-to {
  left: 60%;
}

.bar {
  height: 64px;
  line-height: 64px;
  background: $primary-normal;
  color: $primary-light;
  font-weight: bold;
  .title {
    position: absolute;
    width: 100%;
  }
}

.logo, .title {
  color: $primary-lighter;
}

.progress {
  position: absolute;
  background: rgba(0, 255, 0, .2);
  top: 0;
  height: 64px;
  width: 0;
  transition: width .5s;
}

.panel .bar {
  font-size: .8em;
}

.code-container {
  position: absolute;
  background: $primary-dark;
  height: 50%;
  width: 100%;
  .code {
    position: absolute;
    top: 64px;
    bottom: 0;
    left: 0;
    right: 0;
    font-size: .6em;
  }
}

.desc-container {
  position: absolute;
  top: 50%;
  height: 50%;
  width: 100%;
  .desc, .blur {
    background: none;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    overflow: scroll;
    font-size: .6em;
    text-align: left;
  }
  .desc {
    padding: 0 24px;
  }
}

#index {
  position: absolute;
  top: 64px;
  bottom: 64px;
  text-align: left;
  font-size: .7em;
  list-style: none;
  margin: 0;
  padding: 16px 28px;
  overflow: scroll;
  & > li {
    cursor: pointer;
    margin-top: 12px;
    font-weight: bold;
    &.active {
      color: $primary-lighter;
    }
  }
}

#index .sub {
  display: none;
  font-size: .9em;
  margin-bottom: 24px;
  padding-left: 32px;
  & > li {
    cursor: pointer;
    margin-top: 8px;
    &.active {
      color: $primary-lighter;
    }
  }
}

#index > li.active + .sub {
  display: block;
}

.button {
  font-size: .75em;
  color: white;
  cursor: pointer;
}

#next {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0, 255, 0, .2);
  transition: background .5s;
  &:before {
    content: 'Let me try!';
  }
  &.selected {
    background: rgba(255, 0, 0, .2);
    &:before {
      content: 'Back to the answer';
    }
  }
  &.next:before {
    content: 'Next';
  }
}

.match.selected {
  background: rgba(0, 255, 0, .5);
}

#comparison {
  padding-bottom: 24px;
  h2 {
    color: $primary-light;
    margin-bottom: 0;
  }
  h6 {
    color: $primary-light;
    margin-top: 4px;
    margin-bottom: 24px;
    font-weight: normal;
  }
  .line-number {
    color: $primary-lighter;
    margin-top: 16px;
    margin-bottom: 4px;
    text-decoration: underline;
  }

  .group + .group:before {
    color: $primary-light;
    content: " → ";
  }
  .empty:before {
    color: $primary-light;
    font-style: italic;
    content: "(nothing)";
  }
}

.blur {
  display: none;
  backdrop-filter: blur(4px);
}

code {
  font-size: .8em;
  font-family: monospace;
  background: $primary-dark;
  padding: 4px 8px;
  display: inline-block;
  margin: 2px 0;
}

.temp-snippet {
  display: none;
}