@import 'colors';
@import 'fonts';

.nav-trials {
  text-align: center;
  margin-top: 50px;

  li {
    display: inline-block;
    font-size: 13px;
    margin: 0;

    a {
      display: inline-block;
      padding: 10px 20px;
      text-transform: uppercase;
      font-family: $lightFontFamily;
      letter-spacing: 1px;
//      background-color: $navBlue;
      color: white;
//      border-radius: 2px;
    }

    &.active a {
      background-color: $seaBlue;
      color:  $mainBlue;
    }

    &:hover a {
      background-color: $seaBlue;
    }
  }

  li + li {
    margin-left: 10px;
  }
}

.previous-period {
  text-align: left;
}

.next-period {
  text-align: right;
}

.period {
  color: white;
  font-family: $lightFontFamily;
  display: inline-block;
  line-height: 30px;
  padding: 0 15px;
  border: 1px solid white;
  border-radius: 20px;
}

a.period {
  color: $mainBlue;
  border-color: $mainBlue;
  background-color: $seaBlue;

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

.row-show-ranking {
  margin-top: 30px;
}

.ranked-time-trial {
  margin-top: 20px;
  margin-bottom: 30px;

  .trial-name {
    display: block;
    padding: 10px;
    font-family: $lightFontFamily;
    font-size: 16px;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    background-color: $navBlue;
    box-shadow: 0 1px 2px $lightGray;
    letter-spacing: 1px;
    color: white;

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

  .time-trial-rankings {
    border-radius: 0;
  }

  .btn-run-trial {
    margin-top: 10px;
  }
}

.list-time-trial-rankings {
  font-family: $mono;
  margin: 0;
  padding: 0;
  background-color: white;
  box-shadow: 0 1px 2px $lightGray;
  border: 2px solid white;

  li {
    list-style: none;
    border-bottom: 1px solid $smokeWhite;
    padding: 5px 8px;

    &:last-child {
      border-bottom-color: transparent;
    }

    .rank {
      width: 20px;
      display: inline-block;
    }

    .rank:after {
      content: ".";
    }

    .time {
      float: right;
    }

    &.current-player {
      background-color: $smokeWhite;
      color: $currentPlayerColor;

      .player-avatar .handle {
        color: $currentPlayerColor;
      }
    }

    &.empty {
      color: $gray;
    }

    &.out-of-window {
      border-top: 1px solid $mainBlue;
      padding-top: 4px;
    }
  }
}

.list-recent-runs {
  margin: 0;
  padding: 0;
  background-color: white;
  box-shadow: 0 1px 2px $lightGray;
  border: 2px solid white;

  li {
    list-style: none;
    border-bottom: 1px solid $smokeWhite;
    padding: 5px 8px;

    .time-ago {
      color: $mediumGray;
      font-size: 14px;
      font-family: $lightFontFamily;
      float: right;
//      display: inline-block;
      margin-right: 10px;
    }

    .finish-time {
      font-family: $mono;
      float: right;
    }

    &:last-child {
      border-bottom-color: transparent;
    }
  }
}

.show-time-trial {

  h3 {
    margin-top: 0;
  }

  .trial-picture {
    margin-bottom: 20px;
    height: 200px;
    background-color: $seaBlue;
    background-repeat: no-repeat;
    background-position: center;
  }

  .nav {
    margin-top: 30px;
    margin-bottom: 30px;
    background-color: $navBlue;
    box-shadow: 0px 1px 2px $lightGray;

    li {
      margin: 0;

      a {
        color: white;
        text-decoration: none;

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

      &.active {
        a {
          background-color: $seaBlue;
        }
      }
    }
  }
}
