.dashboard {
  @include clearfix;
  padding: 60px 0px 120px;

  .dashboard-banner {
    background: $yellow;
    border: 1px solid rgb(200,200,200);
    @include box-shadow(0 1px 0 0 rgba(255,255,255, 0.6));
    padding: 10px;
    margin-bottom: 30px;

    &:empty {
      display: none;
      background-color: #FFF;
    }

    h2 {
      margin-bottom: 0;
    }

    p {
      margin-bottom: 0;
    }
  }

  .profile-sidebar {
    background: transparent;
    float: left;
    margin-right: flex-gutter();
    width: flex-grid(3);

    header.profile {
      @include background-image(linear-gradient(-90deg, rgb(255,255,255), rgb(245,245,245)));
      border: 1px solid rgb(200,200,200);
      @include border-radius(4px);
      @include box-sizing(border-box);
      width: flex-grid(12);

      h1.user-name {
        color: $base-font-color;
        font: 700 1.2em/1.2em $sans-serif;
        margin: 0px;
        overflow: hidden;
        padding: 15px 10px 17px;
        text-wrap: nowrap;
        text-overflow: ellipsis;
        text-transform: none;
      }
    }

    .user-info {
      @include clearfix;
      padding: 0px 10px;

      > ul {
        background: rgb(252,252,252);
        border: 1px solid rgb(200,200,200);
        border-top: none;
        //@include border-bottom-radius(4px);
        @include box-sizing(border-box);
        @include box-shadow(inset 0 0 3px 0 rgba(0,0,0, 0.15));
        @include clearfix;
        margin: 0px;
        padding: 20px 10px 10px;
        width: flex-grid(12);

        li {
          @include clearfix;
          border-bottom: 1px dotted rgb(220,220,220);
          list-style: none;
          margin-bottom: 15px;
          padding-bottom: 17px;

          &:hover {
            .title .icon {
              opacity: 1;
            }
          }

          span {
            display: block;
          }

          span.title {
            color: $lighter-base-font-color;
            font-family: $sans-serif;
            font-size: 13px;

            .icon {
              background-size: cover;
              float: left;
              height: 19px;
              margin: 0 6px 0 0;
              opacity: 0.6;
              @include transition(all, 0.15s, linear);
              width: 19px;

              &.email-icon {
                @include background-image(url('../images/portal-icons/email-icon.png'));
              }

              &.name-icon {
                @include background-image(url('../images/portal-icons/course-info-icon.png'));
              }

              &.location-icon {
                @include background-image(url('../images/portal-icons/home-icon.png'));
              }

              &.language-icon {
                @include background-image(url('../images/portal-icons/language-icon.png'));
              }
            }
          }

          span.data {
            color: $lighter-base-font-color;
            font-weight: 700;
            margin-left: 26px;
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
          }
        }
      }
    }

    .news-carousel {
      @include clearfix;
      margin: 30px 10px 0;
      border: 1px solid rgb(200,200,200);
      background: rgb(252,252,252);
      @include box-shadow(inset 0 0 3px 0 rgba(0,0,0, 0.15));

      * {
        font-family: $sans-serif;
      }

      header {
        @include clearfix;
        height: 50px;
      }

      .page-dots {
        float: right;
        margin: 18px 15px 0 0;

        li {
          float: left;
          margin-left: 6px;
        }
      }

      .page-dot {
        display: block;
        width: 11px;
        height: 11px;
        border-radius: 11px;
        background: $light-gray;

        &:hover {
          background: #ccc;
        }

        &.current {
          background: $blue;
        }
      }

      h4 {
        float: left;
        margin-left: 15px;
        font-size: 15px;
        line-height: 48px;
        font-weight: 700;
        text-transform: uppercase;
      }

      .pages {
        position: relative;
      }

      .page {
        display: none;
        position: absolute;
        top: 0;
        left: 0;

        &:first-child {
          display: block;
        }
      }

      section {
        padding: 0 10px;
      }

      .news-image {
        height: 180px;
        margin-bottom: 15px;

        img {
          width: 100%;
          border: 1px solid $light-gray;
        }
      }

      h5 {
        margin-bottom: 8px;
        margin-left: 5px;

        a {
          font-size: 16px;
          font-weight: 700;
        }
      }

      .excerpt {
        margin-left: 5px;
        font-size: 13px;
        padding-bottom: 40px;
      }
    }
  }

  .my-courses {
    float: left;
    margin: 0px;
    width: flex-grid(9);

    > header {
      border-bottom: 1px solid rgb(210,210,210);
      margin-bottom: 30px;
    }

    .empty-dashboard-message {
      padding: 60px 0px;
      text-align: center;

      p {
        color: $lighter-base-font-color;
        font-style: italic;
        margin-bottom: 20px;
        text-shadow: 0 1px rgba(255,255,255, 0.6);
      }

      a {
        background: rgb(240,240,240);
        @include background-image(linear-gradient(-90deg, rgb(245,245,245) 0%, rgb(243,243,243) 50%, rgb(237,237,237) 50%, rgb(235,235,235) 100%));
        border: 1px solid rgb(220,220,220);
        @include border-radius(4px);
        @include box-shadow(0 1px 8px 0 rgba(0,0,0, 0.1));
        @include box-sizing(border-box);
        color: $base-font-color;
        font-family: $sans-serif;
        @include inline-block;
        letter-spacing: 1px;
        margin-left: 5px;
        padding: 5px 10px;
        text-shadow: 0 1px rgba(255,255,255, 0.6);

        &:hover {
          color: $blue;
          text-decoration: none;
        }
      }
    }

    .my-course {
      clear: both;
      @include clearfix;
      margin-right: flex-gutter();
      margin-bottom: 50px;
      padding-bottom: 50px;
      border-bottom: 1px solid $light-gray;
      position: relative;
      width: flex-grid(12);
      z-index: 20;
      @include transition(all, 0.15s, linear);

      &:last-child {
        margin-bottom: none;
      }

      .cover {        
        @include box-sizing(border-box);
        float: left;
        height: 100%;
        max-height: 100%;
        margin: 0px;
        overflow: hidden;
        position: relative;
        @include transition(all, 0.15s, linear);
        width: 200px;
        height: 120px;

        img {
          width: 100%;
        }
      }

      .info {
        @include clearfix;
        padding: 0 10px 0 230px;

        > hgroup {
          padding: 0;
          width: 100%;

          .university {
            color: $lighter-base-font-color;
            font-family: $sans-serif;
            font-size: 16px;
            font-weight: 400;
            margin: 0 0 6px;
            text-transform: none;
            letter-spacing: 0;
          }

          .date-block {
            position: absolute;
            top: 0;
            right: 0;
            font-family: $sans-serif;
            font-size: 13px;
            font-style: italic;
            color: $lighter-base-font-color;
          }

          h3 a {
            display: block;
            margin-bottom: 10px;
            font-family: $sans-serif;
            font-size: 34px;
            line-height: 42px;
            font-weight: 300;

            &:hover {
              text-decoration: none;
            }
          }
        }

        .course-status {
          background: $yellow;
          border: 1px solid rgb(200,200,200);
          @include box-shadow(0 1px 0 0 rgba(255,255,255, 0.6));
          margin-top: 17px;
          margin-right: flex-gutter();
          padding: 5px;
          width: flex-grid(8);
          float: left;
          @include box-sizing(border-box);

          p {
            color: $lighter-base-font-color;
            font-style: italic;
            letter-spacing: 1px;
            text-align: center;
          }
        }

        .course-status-completed {
          background: #ccc;
          color: #fff;

          p {
            color: #222;

            span {
              font-weight: bold;
            }
          }
        }

        .enter-course {
          @include button(simple, $blue);
          @include box-sizing(border-box);
          @include border-radius(3px);
          display: block;
          float: left;
          font: normal 15px/1.6rem $sans-serif;
          letter-spacing: 0;
          padding: 6px 32px 7px;
          text-align: center;
          margin-top: 16px;

          &.archived {
            @include button(simple, #eee);
            font: normal 15px/1.6rem $sans-serif;
            padding: 6px 32px 7px;

            &:hover {
              text-decoration: none;
            }
          }

          &:hover {
            text-decoration: none;
          }
        }
      }
    }

    .message-status {
      @include clearfix;
      @include border-radius(3px);
      display: none;
      z-index: 10;
      margin: 20px 0 10px;
      padding: 15px 20px;
      font-family: $sans-serif;
      background: tint($yellow,70%);
      border: 1px solid #ccc;

      .message-copy {
        font-family: $sans-serif;
        font-size: 13px;
        margin: 0;

        a {
          font-family: $sans-serif;
        }

        .grade-value {
          font-size: 1.2rem;
          font-weight: bold;
        }

        strong {
          font-weight: 700;
        
          a {
            font-weight: 700;
          }
        }
      }

      .actions {
         @include clearfix;
        list-style: none;
        margin: 0;
        padding: 0;

        .action {
          float: left;
          margin: 0 15px 0 0;

          .btn, .cta {
            display: inline-block;
          }

          .btn {
            @include box-sizing(border-box);
            @include border-radius(3px);
            float: left;
            font: normal 0.8rem/1.2rem $sans-serif;
            letter-spacing: 1px;
            padding: 6px 12px;
            text-align: center;

            &.disabled {
              cursor: default !important;

              &:hover {
                background: #eee;
                background-image: -webkit-linear-gradient(top, #EEE 0%, #C2C2C2 50%, #ABABAB 50%, #B0B0B0 100%);
                background-image: -moz-linear-gradient(top, #EEE 0%, #C2C2C2 50%, #ABABAB 50%, #B0B0B0 100%);
                background-image: -ms-linear-gradient(top, #EEE 0%, #C2C2C2 50%, #ABABAB 50%, #B0B0B0 100%);
                background-image: -o-linear-gradient(top, #EEE 0%, #C2C2C2 50%, #ABABAB 50%, #B0B0B0 100%);
                background-image: linear-gradient(top, #EEE 0%, #C2C2C2 50%, #ABABAB 50%, #B0B0B0 100%);
              }
            }
          }

          .cta {
            float: left;
            font: normal 0.8rem/1.2rem $sans-serif;
            letter-spacing: 1px;
            padding: 6px 12px;
            text-align: center;
          }
        }
      }

      .exam-registration-number {
        font-family: $sans-serif;
        font-size: 18px;

        a {
          font-family: $sans-serif;
        }
      }

      &.exam-register {

        .message-copy {
          margin-top: 5px;
          width: 55%;
        }
      }

      &.exam-schedule {
        .exam-button {
          margin-top: 5px;
        }
      }

      .exam-button {
        @include button(simple, $pink);
        margin-top: 0;
        float: right;
      }

      .contact-button {
        @include button(simple, $pink);
      }

      .button {
        display: inline-block;
        margin-top: 10px;
        padding: 9px 18px 10px;
        font-size: 13px;
        font-weight: bold;
        letter-spacing: 0;

        &:hover {
          text-decoration: none;
        }
      }

      &.is-shown {
        display: block;
      }

      &.course-status-processing {

      }

      &.course-status-certnotavailable {
        // background: #fee8d6;
      }

      &.course-status-certrendering {
        // background: #d9e7db;

        .cta {
          margin-top: 2px;
        }
      }

      &.course-status-certavailable {
        // background: #d9e7db;
      }
    }


    a.unenroll {
      float: right;
      display: block;
      font-style: italic;
      color: #a0a0a0;
      text-decoration: underline;
      font-size: .8em;
      margin-top: 32px;

      &:hover {
        color: #333;
      }
    }
  }
}
