@import '~base/sass/base/variables';
@import '~base/sass/base/functions';
@import '~base/sass/base/grid';
@import '~base/sass/base/mixins';
@import '~base/sass/base/stat-cards';

.courses-content {

}

.courses-list {
  padding: calcRem(25) 0;
  border-top: 1px solid #ccc;
}

.course-list-item {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 1fr 1fr 1fr 1fr;
  grid-column-gap: calcRem(20);
  border-bottom: 1px solid #ccc;
  padding: calcRem(20) 0;
  font-size: calcRem(14);
  align-items: center;

  @media (max-width: $half-screen-breakpoint) {
    grid-template-columns: 1fr;
    grid-row-gap: calcRem(15);
  }

  &.list-header {
    font-size: calcRem(12);
  }

  .sorting-header-button {
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    outline: none;

    span {
      margin-right: calcRem(5);
      text-decoration: underline;
      font-size: calcRem(12);
    }

    &:hover, &:focus {
      cursor: pointer;
    }
  }

  .course-name-link {
    color: $primary-color;
    font-weight: bold;
    text-decoration: none;
  }

  .course-id {
    font-size: calcRem(12);
  }

  .start-date, .self-paced, .enrolments, .completions {
    text-align: center;

    @media (max-width: $half-screen-breakpoint) {
      text-align: left;
    }
  }

  .action-container {
    text-align: right;

    @media (max-width: $half-screen-breakpoint) {
      text-align: left;
      padding-top: calcRem(15);
    }
  }

  .course-action {
    font-size: calcRem(14);
    padding: calcRem(8) calcRem(15);
    font-weight: normal;
    color: $primary-color;
    border: calcRem(1) solid $primary-color;
    background: transparent;
    cursor: pointer;
    border-radius: calcRem(30);
    transition: all 0.3s ease-in-out;
    text-decoration: none;

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

    @media (max-width: $half-screen-breakpoint) {
      display: inline-block;
      min-width: calcRem(200);
      text-align: center;
    }
  }
}

.in-cell-label-value {
  display: flex;
  align-items: baseline;

  .mobile-label {
    flex-grow: 0;
    flex-shrink: 0;
    width: calcRem(90);
    margin-right: calcRem(15);
    font-size: calcRem(12);
    color: #666;

    @media (min-width: $half-screen-breakpoint) {
      display: none;
    }
  }

  .mobile-value {
    flex-grow: 1;
    flex-shrink: 1;
    width: 100%;
  }
}
