// LMS layouts

.content-wrapper {
  margin-top: $baseline;
  padding-bottom: $baseline/2;

  .course-tabs {
    padding: 0 $baseline*2;
    font-size: $font-size-sm;

    .nav-item {
      .nav-link {
        padding: $baseline/2 $baseline*3/4 $baseline*13/20;
        border-style: solid;
        border-width: 0 0 $baseline/5 0;
        border-bottom-color: transparent;
        color: theme-color("secondary");

        @include media-breakpoint-down(md) {
          border: none;
          text-align: left;
          padding: 0 0 $baseline/2 0;
        }
      }

      &.active,
      &:hover {
        .nav-link {
          border-bottom-color: theme-color("primary");
          color: theme-color("primary");
        }
      }
    }
  }

  &.container-fluid {
    max-width: map-get($container-max-widths, xl);
  }
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid $border-color;
  padding: $baseline $baseline*2;

  .page-header-search {
    @include margin-right($baseline);

    flex-grow: 1;

    .search-form {
      display: flex;
    }
  }

  .form-actions {
    @include media-breakpoint-down(xs) {
      margin-top: $baseline/2;
    }
  }

  .page-header-main {
    flex-grow: 1;  // This column should consume all the available space

    .page-title {
      margin-top: $baseline*0.4;
    }
  }

  .page-header-secondary {
    display: flex;
    flex-wrap: wrap;

    @include media-breakpoint-up(md) {
      margin-left: $baseline;

      &:not(:last-child) {
        margin-right: $baseline;
      }
    }
  }
}

.page-content-container {
  border: 1px solid $border-color;
  background-color: $body-bg;
  max-width: map-get($container-max-widths, xl);
  margin: 0 auto;
}

.page-content {
  padding: $baseline*2;

  @include media-breakpoint-up(md) {
    display: flex;

    .page-content-main {
      flex-grow: 1;  // This column should consume all the available space
    }

    .page-content-secondary {
      min-width: 350px;  // Note: setting width only is not obeyed
      max-width: 350px;  // Note: setting width only is not obeyed
      margin-left: $baseline*2;
    }
  }
}
