nav.sequence-nav {
  @extend .topbar;
  border-bottom: 1px solid darken($cream, 20%);
  margin-bottom: $body-line-height;
  position: relative;
  @include border-top-right-radius(4px);

  ol {
    @include box-sizing(border-box);
    display: table;
    height: 100%;
    padding-right: flex-grid(1, 9);
    width: 100%;
    padding-left: 0;

    a {
      @extend .block-link;
    }

    li {
      border-left: 1px solid darken($cream, 10%);
      display: table-cell;
      min-width: 20px;

      &:first-child {
        border-left: none;
      }

      .inactive {
        background-repeat: no-repeat;

        &:hover {
          background-color: lighten($cream, 8%);
        }
      }

      .visited {
        background-color: darken($cream, 4%);
        background-repeat: no-repeat;
        @include box-shadow(0);

        &:hover {
          background-color: $cream;
        }
      }

      .active {
        background-color: #fff;
        background-repeat: no-repeat;
        @include box-shadow(0 1px 0 #fff);

        &:hover {
          background-color: #fff;
        }
      }

      a {
        background-position: center center;
        border: none;
        cursor: pointer;
        display: block;
        height: 17px;
        padding: 15px 0 17px;
        position: relative;
        @include transition(all, .4s, $ease-in-out-quad);
        width: 100%;
        background-position: center 8px;

        //video
        &.seq_video_inactive {
          @extend .inactive;
          background-image: url('../images/sequence-nav/video-icon-visited.png');
        }

        &.seq_video_visited {
          @extend .visited;
          background-image: url('../images/sequence-nav/video-icon-normal.png');
        }

        &.seq_video_active {
          @extend .active;
          background-image: url('../images/sequence-nav/video-icon-current.png');
        }

        //other
        &.seq_other_inactive {
          @extend .inactive;
          background-image: url('../images/sequence-nav/document-icon-visited.png');
        }

        &.seq_other_visited {
          @extend .visited;
          background-image: url('../images/sequence-nav/document-icon-normal.png');
        }

        &.seq_other_active {
          @extend .active;
          background-image: url('../images/sequence-nav/document-icon-current.png');
        }

        //vertical & problems
        &.seq_vertical_inactive, &.seq_problem_inactive {
          @extend .inactive;
          background-image: url('../images/sequence-nav/list-icon-visited.png');
        }

        &.seq_vertical_visited, &.seq_problem_visited {
          @extend .visited;
          background-image: url('../images/sequence-nav/list-icon-normal.png');
        }

        &.seq_vertical_active, &.seq_problem_active {
          @extend .active;
          background-image: url('../images/sequence-nav/list-icon-current.png');
        }

        &:after {
          content: "  ";
          display: block;
          width: 11px;
          height: 11px;
          background: url('../images/sequence-nav/status/dash.png') no-repeat center;
          @include position( absolute, 0 0 6px 50% );
          margin-left: -5px;
        }

        //progress
        &.progress-none {
          &:after {
            background: url('../images/sequence-nav/status/not-started.png') no-repeat center;
          }
        }

        &.progress-some {
          &:after {
            background: url('../images/sequence-nav/status/wrong.png') no-repeat center;
          }
        }

        &.progress-done {
          &:after {
            background: url('../images/sequence-nav/status/check.png') no-repeat center;
          }
        }

        p {
          background: #333;
          color: #fff;
          display: none;
          line-height: lh();
          left: 0px;
          opacity: 0;
          padding: 6px;
          position: absolute;
          top: 48px;
          text-shadow: 0 -1px 0 #000;
          @include transition(all, .1s, $ease-in-out-quart);
          white-space: pre;
          z-index: 99;

          &:empty {
            background: none;

            &::after {
              display: none;
            }
          }

          &::after {
            background: #333;
            content: " ";
            display: block;
            height: 10px;
            left: 18px;
            position: absolute;
            top: -5px;
            @include transform(rotate(45deg));
            width: 10px;
          }
        }

        &:hover {
          background-position: center 8px;

          p {
            display: block;
            margin-top: 4px;
            opacity: 1;
          }
        }
      }
    }
  }

  ul {
    list-style: none;
    height: 100%;
    position: absolute;
    right: 0;
    top: 0;
    width: flex-grid(1, 9);

    li {
      float: left;
      width: 50%;

      &.prev, &.next {

        a {
          background-color: darken($cream, 5%);
          background-position: center center;
          background-repeat: no-repeat;
          border-left: 1px solid darken(#f6efd4, 20%);
          @include box-shadow(inset 1px 0 0 lighten(#f6efd4, 5%));
          @include box-sizing(border-box);
          cursor: pointer;
          display: block;
          text-indent: -9999px;
          @include transition(all, .2s, $ease-in-out-quad);
          line-height: 49px;

          &:hover {
            opacity: .5;
          }

          &.disabled {
            cursor: normal;
            opacity: .4;
          }
        }
      }

      &.prev {
        a {
          background-image: url('../images/sequence-nav/previous-icon.png');

          &:hover {
            background-color: $cream;
          }
        }
      }

      &.next {
        a {
          background-image: url('../images/sequence-nav/next-icon.png');

          &:hover {
            background-color: $cream;
          }
        }
      }
    }
  }

  body.touch-based-device & ol li a:hover p {
    display: none;
  }
}


section.course-content {
  position: relative;

  ol.vert-mod {
    nav.sequence-nav {
      margin-top: -15px;
      @include border-radius(0);
    }
  }

  nav.sequence-bottom {
    margin: lh(2) 0 0;
    text-align: center;

    ul {
      @extend .clearfix;
      background-color: darken(#F6EFD4, 5%);
      background-color: darken($cream, 5%);
      border: 1px solid darken(#f6efd4, 20%);
      @include border-radius(3px);
      @include box-shadow(inset 0 0 0 1px lighten(#f6efd4, 5%));
      @include inline-block();
      padding-left: 0;

      li {
        float: left;

        &.prev, &.next {
          margin-bottom: 0;

          a {
            background-position: center center;
            background-repeat: no-repeat;
            border-bottom: none;
            display: block;
            padding: lh(.5) 4px;
            text-indent: -9999px;
            @include transition(all, .2s, $ease-in-out-quad);
            width: 45px;

            &:hover {
              background-color: $cream;
              color: darken($cream, 60%);
              opacity: .5;
              text-decoration: none;
            }

            &.disabled {
              background-color: lighten($cream, 10%);
              opacity: .4;
            }
          }
        }

        &.prev {
          a {
            background-image: url('../images/sequence-nav/previous-icon.png');
            border-right: 1px solid darken(#f6efd4, 20%);

            &:hover {
              background-color: none;
            }
          }
        }

        &.next {
          a {
            background-image: url('../images/sequence-nav/next-icon.png');

            &:hover {
              background-color: none;
            }
          }
        }
      }
    }
  }
}

