/* core.less */

// When we upgrade spacerap to v4 release, we will need to change this to be used by the text-white class.
// Because a primary colour that is both AA accessible on grey (footer) and white is not possible, we always
// want white default colour.
$bg-inverse-link-color: #fff !default;

.bg-pulse-grey {
    animation: bg-pulse-grey 2s infinite linear;
}

@keyframes bg-pulse-grey {
    0% {
        background-color: $gray-100;
    }
    50% {
        background-color: darken($gray-100, 5%);
    }
    100% {
        background-color: $gray-100;
    }
}

.dir-rtl {
    .dir-rtl-hide {
        display: none;
    }
}

.dir-ltr {
    .dir-ltr-hide {
        display: none;
    }
}

#region-main > .card {
    overflow-x: auto;
    overflow-y: visible;
    min-height: 45rem;
}

/** Prevent user notifications overlapping with region main settings menu */
#user-notifications {
    display: block;
    overflow: hidden;
}

/** Page layout CSS starts **/
.layout-option-noheader #page-header,
.layout-option-nonavbar #page-navbar,
.layout-option-nofooter #page-footer,
.layout-option-nocourseheader .course-content-header,
.layout-option-nocoursefooter .course-content-footer {
    display: none;
}

/** Page layout CSS ends **/

.mdl-left {
    text-align: left;
}

.mdl-right {
    text-align: right;
}

/*rtl:ignore*/
.text-ltr {
    direction: ltr !important; /* stylelint-disable-line declaration-no-important */
}

#add,
#remove,
.centerpara {
    text-align: left;
}

a.dimmed,
a.dimmed:link,
a.dimmed:visited,
a.dimmed_text,
a.dimmed_text:link,
a.dimmed_text:visited,
.dimmed_text,
.dimmed_text a,
.dimmed_text a:link,
.dimmed_text a:visited,
.usersuspended,
.usersuspended a,
.usersuspended a:link,
.usersuspended a:visited,
.dimmed_category,
.dimmed_category a {
    @extend .text-muted;

    &:before {
      background-color: $gray-300;
    }
}

.unlist,
.unlist li,
.inline-list,
.inline-list li,
.section li.activity,
.section li.movehere,
.tabtree li {
    list-style: none;
    margin: 0;
    padding: 0;
}

  .movehere {
    #page-site-index & {
      background-color: $gray-100;
      padding: 0.5rem;

      display: block;
    }

    a {
      #page-site-index & {
        color: $body-color;
        display: block;
        width: 100%;
      }
    }
  }

.inline,
.inline-list li {
    display: inline;
}

.notifytiny {
    font-size: $font-size-xs;
}

.notifytiny li,
.notifytiny td {
    font-size: 100%;
}

.red,
.notifyproblem {
    background-color: $red-600;
    color: $red-200;

    border-radius: $border-radius;
    font-size: $font-size-xs;
}

.green,
.notifysuccess {
    background-color: lighten($green-700, 10);
    color: darken($green-700, 50);

    border-radius: $border-radius;
    font-size: $font-size-xs;
}

.highlight {
    background-color: $theme-color-8;
    color: $theme-color-3;
    border-bottom: 2px solid $theme-color-8;
}

.fitem.advanced .text-info {
  margin-left: 4px;

  width: 20px;
  height: 20px;
  border-radius: 20px;

  display: inline-flex;
  justify-content: center;

  background-color: $gray-200;

  font-weight: $font-weight-bold;
  color: $gray-700!important;
}

.reportlink {
  margin-top: 30px;
  text-align: right;
}

a.autolink.glossary:hover {
    cursor: help;
}
/* Block which is hidden if javascript enabled, prevents fickering visible when JS from footer used! */
.collapsibleregioncaption {
    white-space: nowrap;
    min-height: $line-height-base * $font-size-base;

    a {
      display: block!important;
      padding: 1rem 2rem;
      border-radius: $border-radius;

      color: $gray-900!important;
      font-size: $font-size-base!important;
      font-weight: $font-weight-sm-bold!important;
      text-align: left!important;

      text-decoration: none;

      position: relative;
    }

    img {
      vertical-align: middle;

      position: absolute;
      right: 2rem;
      top: calc(50% - 9px);
    }
}

.pagelayout-mydashboard.jsenabled .collapsibleregioncaption {
    cursor: pointer;
}

.jsenabled .hiddenifjs {
    display: none;
}

.jsenabled .collapsibleregion {
    overflow: hidden;
    box-sizing: content-box;
}

.collapsibleregioninner {
  margin: 3px 0 0;
  padding: 1rem 1.5rem;
  background-color: $card-bg;
  border-radius: $border-radius;
}

.jsenabled .collapsed .collapsibleregioninner {
    visibility: hidden;
}

.collapsible-actions {
    display: none;
    text-align: right;
}

.jsenabled .collapsible-actions {
    display: block;
}

#page-login-signup {
  .jsenabled .collapsible-actions {
      display: none;
  }
}

.collapsible-actions .collapseexpand,
.course-content .collapsible-actions a {
    background-color: $btn-secondary-bg;
    border: $btn-secondary-border-width solid $btn-secondary-border;
    box-shadow: 0 2px 1px 0 $btn-secondary-shadow;

    margin: $spacer 0;
    padding: 0.5rem 1rem 0.5rem 1.8rem;

    display: inline-flex;

    border-radius: $border-radius;

    font-size: $font-size-xs;
    font-weight: $font-weight-sm-bold;
    color: $btn-secondary-text;

    transition: $general-transition;

    position: relative;

    &:after {
      @extend %fa-icon;
      @extend .fas;

      position: absolute;
      top: calc(50% - 7px);
      left: 14px;

      content: fa-content($fa-var-caret-right);
      /*rtl:raw:
      content: fa-content($fa-var-caret-left);
      right: 14px;
      left: auto;
      */

      font-size: 14px;
      color: inherit;
      opacity: 0.6;
    }

    &:before {
      display: none;
    }

    &:hover {
      text-decoration: none;

      background-color: $btn-secondary-bg-hover;
      border-color: $btn-secondary-border-hover;
      box-shadow: 0 1px 1px $btn-secondary-shadow, 0 2px 2px $btn-secondary-shadow, 0 4px 4px $btn-secondary-shadow, 0 6px 8px $btn-secondary-shadow, 0 8px 16px $btn-secondary-shadow;
      color: $btn-secondary-text-hover;
    }
}

.collapsible-actions .collapse-all {
  position: relative;
  &:after {
    @extend %fa-icon;
    @extend .fas;

    content: fa-content($fa-var-caret-up);

    font-size: 14px;
    color: inherit;
    opacity: 0.6;

    position: absolute;
    top: calc(50% - 7px);
    left: 14px;
  }
}

.yui-overlay .yui-widget-bd {
    background-color: #ffee69;
    border: 1px solid #a6982b;
    border-top-color: #d4c237;
    color: #000;
    left: 0;
    padding: 2px 5px;
    position: relative;
    top: 0;
    z-index: 1;
}

.bold
.warning,
.errorbox .title,
.pagingbar .title,
.pagingbar .thispage {
    font-weight: $font-weight-bold;
}

.errorbox {
  .errormessage {
    margin-bottom: 0;
    margin-right: 0.25rem;
  }
}

img.userpicture {
    width: 35px;
    height: 35px;
    border-radius: $border-radius-max;

    .page-header-image & {
      width: 80px;
      height: 80px;

      border-radius: $border-radius-max;
    }
}

table {
  img.userpicture {
    margin-right: 10px;
    margin-left: 0;
  }
}

.userbutton {
  font-size: $font-size-sm;

  display: flex;
  align-items: center;

  .usertext {
    display: none;
    margin-right: 0.75rem!important;

    .showusername & {
      display: block;
      @include media-breakpoint-between(sm,md) {
      display: none;
      }
    }
  }

}



.usermenu {
  .userpicture {
    width: 40px;
    height: 40px;
  }

  .action-menu-trigger {
    margin-bottom: 0;
  }

  .login {
    font-size: $font-size-xs;

    a {
      text-decoration: none;

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

  .dropdown-toggle {
    box-shadow: none;
    border: none;
    padding: 5px 15px 5px 10px!important;

    @include media-breakpoint-between(sm,md) {
    background-color: transparent;
    padding: 5px 2px!important;
    }

    &:hover {
      background-color: $top-bar-link-hover-bg;
      box-shadow: none;

      @include media-breakpoint-between(sm,md) {
        background-color: transparent;
        }
    }

    &:after {
      display: none;
    }


    .caret {
      @include media-breakpoint-between(sm,md) {
        display: none!important;
      }

      position: absolute;
      top: calc(50% - 12px);
      right: 3px;

      &:after {
        @extend %fa-icon;
        @extend .fas;

        content: fa-content($fa-var-caret-down);
        font-size: 11px;
        color: $top-bar-bg-secondary-text;
        opacity: 0.7;
      }
    }

  }
}


img.resize {
    height: 1em;
    width: 1em;
}

.action-menu .dropdown-toggle {
    text-decoration: none;
}

.action-menu {
    white-space: nowrap;

    &.commands {
      margin: 0;
    }
}

.block img.resize {
    height: 0.9em;
    width: 0.8em;
}
/* Icon styles */
.headermain {
    font-weight: $font-weight-bold;
}

#maincontent {
    display: block;
    overflow: hidden;
}

img.uihint {
    cursor: help;
}

#addmembersform table {
    margin-left: auto;
    margin-right: auto;
}

table.flexible .emptyrow {
    display: none;
}

form.popupform,
form.popupform div {
    display: inline;
}

.arrow_button input {
    overflow: hidden;
}

.generaltable {
  margin-bottom: 2 * $spacer;
}
// Accessibility features

// Accessibility: text 'seen' by screen readers but not visual users.
.accesshide {
    @include sr-only();
}

span.hide,
div.hide,
.hidden {
    display: none;
}
// Accessibility: Skip block link, for keyboard-only users.
a.skip-block,
a.skip {
    position: absolute;
    top: -1000em;
    font-size: 0.85em;
    text-decoration: none;
}

a.skip-block:focus,
a.skip-block:active,
a.skip:focus,
a.skip:active {
    position: static;
    display: block;
}

.skip-block-to {
    display: block;
    height: 1px;
    overflow: hidden;
}


// Blogs
.blog_entry {
  .comment-link {
    margin-top: 1rem;
    margin-bottom: 1rem;
    text-align: left;

    .icon {
      display: none;
    }
  }

  .audience {
    text-align: left;
    font-size: $font-size-xs;
    color: $gray-700;
  }

  .tags {
      margin-top: 15px;
  }

  .content {
    margin-left: 43px;
   }
}

.addbloglink {
  margin-bottom: 1rem;
}

.commands {
  margin: 0.25rem;
}


//Book
#page-mod-book-view {
  .block__fake {
    .card-title {
      font-size: $font-size-xs;
      font-weight: $font-weight-sm-bold;
      opacity: 0.6;

      text-align: left;
    }
  }
}


.book_content {
  margin: 10px 0;
  padding: 1.5rem!important;
  background-color: $card-bg;
  border-radius: $border-radius;
  color: $card-text;

  h1, .h1 {
    font-size: 1.35rem;
    color: $card-title;
  }

  h2, .h2 {
    font-size: 1.25rem;
    color: $card-title;
  }

  h3, .h3 {
    font-size: 1.15rem;
    color: $card-title;
  }

  h4, .h4 {
    font-size: 1.05rem;
    color: $card-title;
  }

}

.book_toc_numbered {

  .d-flex {
    display: block!important;
  }

  .action-list {
    a {
      margin: 1px!important;
      padding: .7rem!important;
    }
  }

  ul {
    margin: 0;
    padding-left: 0;

    li {
      list-style: none;
      padding-bottom: 1rem!important;
      margin-bottom: 1rem!important;

      border-bottom: 1px solid darken($card-bg, 5%);

      &:last-child {
        border-bottom: 0;
        margin-bottom: 0!important;
        padding-bottom: 0!important;
      }

      a {
        color: $body-color-secondary;
      }
    }

  }
}

// Group

#doc-contents h1 {
    margin: 1em 0 0 0;
}

#doc-contents ul {
    margin: 0;
    padding: 0;
    width: 90%;
}

#doc-contents ul li {
    list-style-type: none;
}

.groupmanagementtable td {
    vertical-align: top!important;
}

.groupmanagementtable #existingcell,
.groupmanagementtable #potentialcell {
    width: 42%;
}

.groupmanagementtable #buttonscell {
    width: 16%;
}

.groupmanagementtable #buttonscell p.arrow_button input {
    width: auto;
    min-width: 100%;
    margin: 0 auto 10px;
}

.groupmanagementtable #removeselect_wrapper,
.groupmanagementtable #addselect_wrapper {
    width: 100%;
}

.groupmanagementtable #removeselect_wrapper label,
.groupmanagementtable #addselect_wrapper label {
    font-weight: normal;
}

#group-usersummary {
    width: 14em;
}

.groupselector {
    margin-top: 3px;
    margin-bottom: 3px;
    display: inline-block;
}

.groupselector label {
    display: inline-block;
}

// Login
.login-page {
    [name="username"] {
        margin-bottom: -1px;
        border-bottom-right-radius: 0;
        border-bottom-left-radius: 0;
    }

    [type="password"] {
        margin-bottom: 10px;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }
}

// Notes
.notepost {
  padding: 2rem 0;
  margin-bottom: 1rem;
  border-bottom: 1px solid $border-color;

  &:last-of-type {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
  }
}

.notepost .userpicture {
    display: inline-flex;
    margin-right: 25px;
}

.notepost .content,
.notepost .footer {
    clear: both;
    margin-left: 60px;
}

.notesgroup {
    padding: 2rem;

    box-shadow: $box-shadow;
    border-radius: $border-radius;

    &:empty {
      padding: 0;
    }

    .info {
      font-size: $font-size-xs;
      color: $gray-700;

      margin-bottom: 1rem;
      padding-left: 60px;
    }

    .content {
      margin-top: 1rem;
      margin-bottom: 1rem;
    }

    hr {
      display: none;
    }
}


.notestitle {
  margin: 3rem 0 1rem;

  &:first-of-type {
    margin-top: 0;
  }

  a {
    color: $body-color;
    text-decoration: none;

    transition: $general-transition;

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

// My Moodle
.path-my .coursebox {
    margin: $spacer-y 0;
    padding: 0;

    .overview {
        margin: 15px 30px 10px 30px;
    }
}

.path-my .coursebox .info {
    float: none;
    margin: 0;
}

// Modules
.mod_introbox {
    font-size: $font-size-lg;
    font-weight: $font-weight-light;
}

table.mod_index {
    width: 100%;
}

// Comments
.comment-ctrl {
    font-size: 12px;
    display: none;
    margin: 0;
    padding: 0;
}

.comment-ctrl h5 {
    margin: 0;
    padding: 5px;
}

.comment-area {
    background: $gray-100;

    border-radius: $border-radius;

    table & {
      background-color: transparent;
    }

    .fd {
      a {
        width: 100%;
      }
    }
}

.comment-area textarea {
    @extend .form-control;
    margin-bottom: 0.5rem;
    width: 100%!important;
    max-width: 100%!important;
    overflow: auto;

    &.fullwidth {
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }
}

.comment-area .fd {
  margin-top: 10px;
  text-align: right;
}

.comment-meta span {
    color: gray;
}

.comment-link img {
    vertical-align: text-bottom;
}

.comment-list {
    font-size: 12px;
    list-style: none;
    padding: 0;
    margin: 0;

    li {
      margin: 0 0 5px 0;
      padding: 0;
      list-style: none;
      clear: both;
      position: relative;

      border-radius: $border-radius;

       &.first {
           display: none;
       }
   }
}

.comment-list {
  img.userpicture {
    margin: 0!important;
    width: 19px;
    height: 19px;
  }
}



.comment-paging {
    text-align: center;

   .pageno {
       padding: 2px;
   }

   .curpage {
      border: 1px solid #ccc;
  }
}

.comment-message {
  padding: 1rem;
  margin: 0.5rem 0;

  position: relative;

  &:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: calc(50% - 30px);

    width: 60px;
    height: 1px;
    background-color: $border-color;
  }

  .comment-messag-meta {
    font-weight: $font-weight-sm-bold;
    margin-bottom: 0.5rem;

    .picture a {
      &:before {
        display: none;
      }
    }
  }

  .picture {
      width: auto;
      margin-right: 10px;
  }

  .user {
    margin-top: 0.25rem;
    width: 100%;
  }

  .picture {
    display: inline-flex;

    [data-region="blocks-column"] & {
      display: block;
    }

  }

  .text {
      margin: 1rem 0 0 0;
      padding: 0;

      font-size: $font-size-sm;

      p {
        margin: 0 0 0.25rem 0;
        font-size: $font-size-sm;
     }
  }
}

.comment-delete {
    opacity: 0;
    position: absolute;
    top: 9px;
    right: 5px;
    width: auto;

    display: inline-block;
    padding: $badge-padding-y $badge-padding-x;
    margin: 1px 4px 1px 1px;
    font-size: $badge-font-size;
    font-weight: $badge-font-weight;
    line-height: 1.2;
    text-align: center;
    vertical-align: baseline;
    @include border-radius($badge-border-radius);

    transition: $general-transition;

    background-color: $red-600;
    border-radius: $border-radius;

    .comment-message:hover & {
      opacity: 1;
    }

    .icon {
      font-size: 12px;
      color: $red-200;
    }

    a:before,
    &:before {
      display: none;
    }

    &:hover {
      background-color: $red-600;
      .icon { color: $red-200; }
    }
}

.comment-report-selectall {
    display: none;
}

.comment-link {
    display: none;
}

.jsenabled .comment-link {
    display: block;
    text-decoration: none;
}

.jsenabled .showcommentsnonjs {
    display: none!important;
}

.jsenabled .comment-report-selectall {
    display: inline;
}
/**
* Completion progress report
*/
.completion-expired {
    @extend .text-warning;
}

.completion-expected {
    font-size: $font-size-xs;
}

.completion-sortchoice,
.completion-identifyfield {
    font-size: $font-size-xs;
    vertical-align: bottom;
}

.completion-progresscell {
    text-align: right;
}

.completion-expired .completion-expected {
    font-weight: $font-weight-bold;
}
/**
* Tags
*/
img.user-image {
    height: 100px;
    width: 100px;
}



/* tag/search */
#page-tag-search {
  #tag-search-box {
    form {

      @extend .row;
      @extend .no-gutters;

      #searchform_query {
        @extend .col-8;
        margin-right: 0.5rem;

        display: inline-flex;
      }
    }
  }
}


#tag-search-box {
    text-align: center;
    margin: 10px auto;
}

.path-tag {
  .tag-index-items {
    margin-top: 2rem;

    .tagarea {
      border: 1px solid $border-color;
      border-radius: $border-radius;

      margin-bottom: 2rem;
   }
  }

  .media-heading {
    color: $body-color;
    font-weight: $font-weight-sm-bold;
  }

  .muted {
    margin-top: 0.5rem;
    font-size: $font-size-xs;

    &:before {
      background-color: $gray-400;
    }
  }
}

#page-tag-index {
  .tag-index-toc .inline-list{
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;

    border-bottom: $nav-tabs-border-width solid $nav-tabs-border-color;
    font-size: $font-size-base;

    .rtl & {
      text-align: right;
    }

    li {
      display: inline-flex;

      a {
        font-weight: 400!important;

        &:hover {
          color: $theme-color-3;
          border-radius: 0;
        }
      }
    }
  }
}



.path-tag .tag-index-items .tagarea h3 {
    display: block;
    padding: $spacer 1.5 * $spacer;
    margin-bottom: 1rem;

    font-size: $font-size-base;
    font-weight: $font-weight-bold;
    color: $body-color;
    word-wrap: break-word;
    border-bottom: solid 1px $border-color;
}

.path-tag .tagarea .controls,
.path-tag .tagarea .taggeditems {
    @include clearfix();
}

.path-tag .tagarea .controls,
.path-tag .tag-backtoallitems {
    text-align: center;
}

.path-tag .tagarea .controls .gotopage.nextpage {
    float: right;
}

.path-tag .tagarea .controls .gotopage.prevpage {
    float: left;
}

.path-tag .tagarea .controls .exclusivemode {
    display: inline-block;
}

.path-tag .tagarea .controls.controls-bottom {
    margin: $spacer
}

.path-tag .tagarea .controls .gotopage.nextpage::after {
    padding-right: 5px;
    padding-left: 5px;
    content: "»";
}

.path-tag .tagarea .controls .gotopage.prevpage::before {
    padding-right: 5px;
    padding-left: 5px;
    content: "«";
}

span.flagged-tag,
tr.flagged-tag,
span.flagged-tag a,
tr.flagged-tag a {
  color: $red-600;
}

.tag-management-table td,
.tag-management-table th {
    vertical-align: middle;
}

.tag-management-table .inplaceeditable.inplaceeditingon input {
    width: 150px;
}

.path-admin-tag .addstandardtags {
    img {
        margin: 0 5px;
    }
}

.path-tag .tag-relatedtags {
    padding-top: 10px;
}

.path-tag .tag-management-box {
    text-align: right;
}

.path-tag .tag-index-toc {
    padding: 10px;
    text-align: center;
}

.path-tag .tag-index-toc li,
.path-tag .tag-management-box li {
    margin-left: 5px;
    margin-right: 5px;
}

.path-tag {
  .tag-management-box {
    li {
      a {
        position: relative;

        &.edittag,
        &.flagasinappropriate,
        &.addtomyinterests,
        &.removefrommyinterests
        {
          padding-left: 40px!important;

          &:after {
            @extend %fa-icon;
            @extend .fas;

            font-size: 14px;
            color: inherit;
            opacity: 0.6;

            position: absolute;
            top: calc(50% - 7px);
            left: 14px;
          }
        }

        &.edittag {
            &:after {
              content: fa-content($fa-var-cog);
            }
        }

        &.flagasinappropriate {
          &:after {
            content: fa-content($fa-var-flag);
          }
        }

        &.addtomyinterests {
            &:after {
              content: fa-content($fa-var-plus);
            }
        }

        &.removefrommyinterests {
            &:after {
              content: fa-content($fa-var-minus);
            }
        }

        &:before {
          width: 0;
        }

      }
    }
  }
}

.tag_feed {
  margin: 0 0 1rem 0;
  padding: 0 1.5rem;
}

.tag_feed.media-list .media .itemimage {
    float: left;
    margin-right: $spacer;
    width: 30px;
    text-align: center;

    a {
      &:before {
        display: none;
      }
    }

}

.tag_feed.media-list .media .itemimage img {
    margin-right: 2 * $spacer;
}

.tag_feed.media-list .media .media-body {
    padding-right: 10px;
    padding-left: 10px;
}

.tag_feed .media .muted a {
    @extend .text-muted;

    &:before {
      background-color: $gray-400;
    }
}


.tag_cloud .inline-list li {
    margin-right: 2px;
}

.tag_cloud .tag_overflow {
    margin-top: 1em;
    font-style: italic;
}

.block_tags {
  padding: 0;
  background-color: transparent;
  border: 0!important;

  .card-body {
    padding: 0;
  }

  .tag_cloud {
    justify-content: space-between;

    li {
      display: inline-flex;
      margin-bottom: 6px;

      a {
        padding: 3px 6px;
        border-radius: $border-radius;

        background-color: $theme-color-9;
        font-size: $font-size-xs;
        color: $theme-color-3;

        transition: $general-transition;

        &:hover {
          background-color: $theme-color-8;
        }
      }
    }
  }
}


.tag_list ul {
    display: inline;
}

.tag_list.hideoverlimit .overlimit {
    display: none;
}

.tag_list .tagmorelink {
    display: none;
}

.tag_list.hideoverlimit .tagmorelink {
    display: inline;
}

.tag_list.hideoverlimit .taglesslink {
    display: none;
}

/**
* Web Service
*/
#webservice-doc-generator td {
    text-align: left;
    border: 0 solid black;
}

/**
* Enrol
*/
.userenrolment {
    width: 100%;
    border-collapse: collapse;
}

.userenrolment tr {
    vertical-align: top;
}

.userenrolment td {
    padding: 0;
    height: 41px;
}

.userenrolment .subfield {
    margin-right: 5px;
}

.userenrolment .col_userdetails .subfield {
    margin-left: 40px;

    &.subfield_userfullnamedisplay {
      font-weight: $font-weight-bold;
    }
}

.userenrolment .col_userdetails .subfield_picture {
    float: left;
    margin-left: 0;
}

.userenrolment .col_lastseen {
    width: 150px;
}

.userenrolment .col_role {
    width: 262px;
}

.userenrolment .col_role .roles,
.userenrolment .col_group .groups {
    margin-right: 30px;
}

.userenrolment .col_role .role {
    padding: 0;
    margin: 10px 0;
    white-space: nowrap;
}

.userenrolment .col_group .group {
    float: left;
    padding: 3px;
    margin: 3px;
    white-space: nowrap;
}

.userenrolment .col_role .role a,
.userenrolment .col_group .group a {
    margin-left: 3px;
    cursor: pointer;
}

.userenrolment .col_role .addrole,
.userenrolment .col_group .addgroup {
    > a:hover {
        border-bottom: 1px solid $border-color;
    }
}

.userenrolment .col_role .addrole img,
.userenrolment .col_group .addgroup img {
    vertical-align: baseline;
}

.userenrolment .hasAllRoles .col_role .addrole {
    display: none;
}

.userenrolment .col_enrol .enrolment {
    float: left;
    padding: 0 3px 3px;
    margin: 0 3px 3px;
}

.userenrolment .col_enrol .enrolment a {
    float: right;
    margin-left: 3px;
}

#page-enrol-users {
    .enrol_user_buttons {
        text-align: right;

    }
}

#page-enrol-users .enrol-users-page-action input {
    margin-left: 0;
}

.corelightbox {
    background-color: #ccc;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
}

.corelightbox img {
    position: fixed;
    top: 50%;
    left: 50%;
}

.mod-indent-outer {
    display: table;

    @include media-breakpoint-only(sm) {
    display: block;
    }
}

.mod-indent {
    display: table-cell;
}

.label .mod-indent {
    float: left;
    padding-top: 20px;
}
$mod-indent-size: 35px;
/* Creates a series of .mod-indent-# rule declarations based on indent size and number of indent levels. */

@for $i from 1 through 16 {
    $width: ($i * $mod-indent-size);

    .mod-indent-#{$i} {
        width: $width;
    }
}

.mod-indent-huge {
    width: (16 * $mod-indent-size);
}

.mediaplugin.mediaplugin_videojs {
  background-color: #000;
  padding: 10px;
  margin: 12px 0; //to avoid cutting the time popup
  border-radius: $border-radius;

  // force full width audio player
  div[style*="max-width:400px;"],
  div[style*="max-width:720px;"] {
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 100%!important;
  }
}

.vjs-slider-horizontal .vjs-volume-level:before {
  top: calc(50% - 4.5px);
}

/* Audio player size in 'block' mode (can only change width, height is hardcoded in JS) */
.resourcecontent .mediaplugin_mp3 object {
  height: 25px;
  width: 600px;
}

.resourcecontent audio.mediaplugin_html5audio {
    width: 600px;
}
/** Large resource images should avoid hidden overflow **/
.resourceimage {
    max-width: 100%;
}
/* Audio player size in 'inline' mode (can only change width, as above) */
.mediaplugin_mp3 object {
    height: 15px;
    width: 300px;
}

audio.mediaplugin_html5audio {
    width: 300px;
}

.mediaplugin, .mediaplugin video {
   .section li.activity & {
    max-width: calc(100% - 60px);
   }


  table & {
    width: auto;
  }
  .card & {
    width: 100%;
  }

  .forumpost & {
    width: 100%;
    max-width: 1020px;
  }
}

/* TinyMCE moodle media preview frame should not have padding */
.core_media_preview.pagelayout-embedded #content {
    padding: 0;
}

.core_media_preview.pagelayout-embedded #maincontent {
    height: 0;
}

body#page-lib-editor-tinymce-plugins-moodlemedia-preview {
    padding: 0;
    margin: 0;
    min-width: 0;
    background: none;
}

.path-rating .ratingtable {
    width: 100%;
    margin-bottom: 1em;
}

.path-rating .ratingtable th.rating {
    width: 100%;
}

.path-rating .ratingtable td.rating,
.path-rating .ratingtable td.time {
    white-space: nowrap;
    text-align: center;
}


.initialbarlabel {
    display: inline-block;
    width: 6em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.initialbar {
  text-align: left;
}

/* Moodle Dialogue Settings (moodle-core-dialogue)  */
.moodle-dialogue-base .moodle-dialogue-lightbox {
    background-color: #000;
}

// Prevent adding backdrops to popups in popups.
.pagelayout-popup {
    .moodle-dialogue-base {
        .moodle-dialogue-lightbox {
            background-color: transparent;
        }
        .moodle-dialogue {
            box-shadow: $popover-box-shadow;
        }
    }
}

.moodle-dialogue-base .hidden,
.moodle-dialogue-base .moodle-dialogue-hidden {
    display: none;
}

.no-scrolling {
    overflow: hidden;
}

.moodle-dialogue-base .moodle-dialogue-fullscreen {
    left: 0;
    top: 0;
    right: 0;
    bottom: -50px;
    position: fixed;
}

.moodle-dialogue-base .moodle-dialogue-fullscreen .moodle-dialogue-content {
    overflow: auto;
}

.moodle-dialogue-base .moodle-dialogue-wrap {
  position: relative;
  width: auto;
  margin: $modal-dialog-margin;
  // allow clicks to pass through for custom click handling to close modal
  pointer-events: auto;

  // When fading in the modal, animate it to slide down
  .modal.fade & {
    @include transition($modal-transition);
    transform: $modal-fade-transform;
  }
  .modal.show & {
    transform: $modal-show-transform;
  }

  // When trying to close, animate focus to scale
  .modal.modal-static & {
    transform: $modal-scale-transform;
  }
}

// Show is a bootstrap 2 class - but we use it for modals. We don't want to enable it everywhere because they removed
// it for a reason (conflicts with jquery .show()).
.modal.show {
    display: block;
}

.moodle-dialogue-base .moodle-dialogue-wrap.moodle-dialogue-content {
    @extend .modal-content;
}

.moodle-dialogue-base .moodle-dialogue-wrap .moodle-dialogue-hd {
    position: relative;
    text-align: left;

    border-radius: 5px 5px 0 0;
}

.moodle-dialogue-base .moodle-dialogue-wrap .moodle-dialogue-hd.yui3-widget-hd {
  padding: 14px 20px;
  background: initial;
  position: relative;

  text-align: left;
  font-size: $font-size-sm;
  font-weight: $font-weight-sm-bold;

  word-wrap: break-word;
  color: inherit;

  border-bottom: 1px solid $gray-200;
  border-radius: 5px 5px 0 0;

  h1, h2, h3, h4 {
    margin: 0;
    font-size: $font-size-sm;
  }
}

.yui3-skin-sam .yui3-panel .yui3-widget-bd {
  padding: 10px 20px 20px;
}

@include media-breakpoint-only(sm) {
.yui3-panel.moodle-dialogue {
  z-index: 10010!important;
  max-width: 100%
}
}

.moodle-dialogue-base .moodle-dialogue-wrap .moodle-dialogue-hd h1 {
    @extend .modal-title;
    font-size: 1rem;
}

.moodle-dialogue-base .moodle-dialogue-fullscreen .moodle-dialogue-content {
    overflow: auto;
    position: absolute;
    top: 0;
    bottom: 50px;
    left: 0;
    right: 0;
    margin: 0;
    border: 0;
}

.moodle-dialogue-exception .moodle-exception-param label {
    font-weight: $font-weight-bold;
}

.moodle-dialogue-exception .param-stacktrace label {
    background-color: #eee;
    border: 1px solid #ccc;
    border-bottom-width: 0;
}

.moodle-dialogue-exception .param-stacktrace pre {
    border: 1px solid #ccc;
    background-color: #fff;
}

.moodle-dialogue-exception .param-stacktrace .stacktrace-file {
    color: navy;
    font-size: $font-size-sm;
}

.moodle-dialogue-exception .param-stacktrace .stacktrace-line {
    @extend .text-warning;
    font-size: $font-size-sm;
}

.moodle-dialogue-exception .param-stacktrace .stacktrace-call {
    color: #333;
    font-size: 90%;
    border-bottom: 1px solid #eee;
}

.moodle-dialogue-base .moodle-dialogue .moodle-dialogue-content .moodle-dialogue-ft {
    @extend .modal-footer;
}

.moodle-dialogue-base .moodle-dialogue .moodle-dialogue-content .moodle-dialogue-ft:empty {
    display: none;
}

.moodle-dialogue-base .moodle-dialogue .moodle-dialogue-content .moodle-dialogue-ft.yui3-widget-ft {
    // Undo some YUI damage.
    background: initial;
}

.moodle-dialogue-base .moodle-dialogue.mod_quiz_preflight_popup .moodle-dialogue-bd #mod_quiz_preflight_form legend {
  padding: 1rem 20px 0;
}

.moodle-dialogue-base .moodle-dialogue.mod_quiz_preflight_popup .moodle-dialogue-bd #mod_quiz_preflight_form .fitem {
  margin: 10px;

  @include media-breakpoint-only(sm) {
  width: auto;
  }

  .btn { margin: 0 10px 20px 0; }
}

@include media-breakpoint-only(sm) {
  .moodle-dialogue-base .moodle-dialogue.mod_quiz_preflight_popup {
    max-width: calc(100% - 40px);
    left: 20px;
  }
}


.moodle-dialogue-confirm .confirmation-message {
    margin: 0.5rem 0;
}

.moodle-dialogue-confirm .confirmation-dialogue input {
    min-width: 80px;
}

.moodle-dialogue-exception .moodle-exception-message {
    margin: 0 0 1rem 0;
}

.moodle-dialogue-exception .moodle-exception-param {
    margin-bottom: 0.5em;
}

.moodle-dialogue-exception .moodle-exception-param label {
    width: 150px;
}

.moodle-dialogue-exception .param-stacktrace label {
    display: block;
    margin: 0;
    padding: 4px 1em;
}

.moodle-dialogue-exception .param-stacktrace pre {
    display: block;
    height: 200px;
    overflow: auto;

    font-size: $font-size-xs;
    padding: 1rem;
}

.moodle-dialogue-exception .param-stacktrace .stacktrace-file {
    display: inline-block;
    margin: 4px 0;
}

.moodle-dialogue-exception .param-stacktrace .stacktrace-line {
    display: inline-block;
    width: 50px;
    margin: 4px 1em;
}

.moodle-dialogue-exception .param-stacktrace .stacktrace-call {
    padding-left: 25px;
    margin-bottom: 4px;
    padding-bottom: 4px;
}

.moodle-dialogue .moodle-dialogue-bd .content-lightbox {
    opacity: 0.75;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: white;
    text-align: center;
    padding: 10% 0;
}
/* Apply a default max-height on tooltip text */
.moodle-dialogue .tooltiptext {
    max-height: 300px;
}

.moodle-dialogue-base .moodle-dialogue.moodle-dialogue-tooltip {
    z-index: 3001;

    .moodle-dialogue-bd {
        overflow: auto;
    }
}

/**
 * Chooser Dialogues (moodle-core-chooserdialogue)
 *
 * This CSS belong to the chooser dialogue which should work both with, and
 * without javascript enabled
 */
/* Hide the dialog and it's title */
.chooserdialoguebody,
.choosertitle {
    display: none;
}

.moodle-dialogue.chooserdialogue .moodle-dialogue-content .moodle-dialogue-ft {
    margin: 0;
}

.chooserdialogue .moodle-dialogue-wrap .moodle-dialogue-bd {
    padding: 0;
}
/* Center the submit buttons within the area */
.choosercontainer #chooseform .submitbuttons {
    padding: 0.7em 0;
    text-align: right;
}
/* Fixed for safari browser on iPhone4S with ios7@mixin */

@media (max-height: 639px) {
    .ios.safari .choosercontainer #chooseform .submitbuttons {
        padding: 45px 0;
    }
}

.choosercontainer #chooseform .submitbuttons input {
    min-width: 100px;
    margin: 0 0.5em;
}
/* Various settings for the options area */
.choosercontainer #chooseform .options {
    position: relative;
    border-bottom: 2px solid $white;
}
/* Only set these options if we're showing the js container */
.jschooser .choosercontainer #chooseform .alloptions {
    overflow-x: hidden;
    overflow-y: auto;
    max-width: 240px;

    .option {
        input[type=radio] {
            display: inline-block;
        }

        .typename {
            display: inline-block;
            width: 55%;
        }
    }
}
/* Settings for option rows and option subtypes */
.choosercontainer #chooseform .moduletypetitle,
.choosercontainer #chooseform .option,
.choosercontainer #chooseform .nonoption {
    margin-bottom: 0;
    padding: 0 1.6em 0 1.6em;
}

.choosercontainer #chooseform .moduletypetitle {
    text-transform: uppercase;
    padding-top: 1.2em;
    padding-bottom: 0.4em;
}

.choosercontainer #chooseform .option .typename,
.choosercontainer #chooseform .nonoption .typename {
    padding: 0 0 0 0.5em;
}

.choosercontainer #chooseform .modicon + .typename {
    padding-left: 0;
}

.choosercontainer #chooseform .option input[type=radio],
.choosercontainer #chooseform .option span.typename {
    vertical-align: middle;
}

.choosercontainer #chooseform .option label {
    display: block;
    margin: 0;
    padding: ($spacer / 2) 0;
    border-bottom: 1px solid $border-color;
    z-index: 1;

    cursor: pointer;
}

.choosercontainer #chooseform .option .icon {
    margin: 0;
    padding: 0 0.25rem 0 0;
}

.choosercontainer #chooseform .nonoption {
    padding-left: 2.7em;
    padding-top: 0.3em;
    padding-bottom: 0.1em;
}

.choosercontainer #chooseform .subtype {
    margin-bottom: 0;
    padding: 0 1.6em 0 3.2em;
}

.choosercontainer #chooseform .subtype .typename {
    margin: 0 0 0 0.2em;
}
/* The instruction/help area */
.jschooser .choosercontainer #chooseform .instruction,
.jschooser .choosercontainer #chooseform .typesummary {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 240px;
    margin: 0;
    padding: 1.6em;
    background-color: $modal-content-bg;
    overflow-x: hidden;
    overflow-y: auto;
    line-height: 2em;
}
/* Selected option settings */
.jschooser .choosercontainer #chooseform .instruction,
.choosercontainer #chooseform .selected .typesummary {
    display: block;
}

.chooserdialogue-course-modchooser .modicon .icon {
    width: 24px;
    height: 24px;
    font-size: 24px;
}

.choosercontainer #chooseform .selected {
  background-color: $theme-color-9;
  margin-top: -1px;
  padding-top: 1px;
}

@include media-breakpoint-down(xs) {
    .jsenabled .choosercontainer #chooseform .alloptions {
        max-width: 100%;
    }

    .jsenabled .choosercontainer #chooseform .instruction,
    .jsenabled .choosercontainer #chooseform .typesummary {
        position: static;
    }
}

/* Form element: listing */
.formlistingradio {
    padding-bottom: 25px;
    padding-right: 10px;
}

.formlistinginputradio {
    float: left;
}

.formlistingmain {
    min-height: 225px;
}

.formlisting {
    position: relative;
    margin: 15px 0;
    padding: 1px 19px 14px;
    background-color: white;
    border: 1px solid #ddd;

    @include border-radius(4px);
}

.formlistingmore {
    position: absolute;
    cursor: pointer;
    bottom: -1px;
    right: -1px;
    padding: 3px 7px;
    font-size: 12px;
    font-weight: $font-weight-bold;
    background-color: whitesmoke;
    border: 1px solid #ddd;
    color: #9da0a4;

    @include border-radius(4px 0 4px 0);
}

.formlistingall {
    margin: 15px 0;
    padding: 0;

    @include border-radius(4px);
}

.formlistingrow {
    cursor: pointer;
    border-bottom: 1px solid;
    border-color: #e1e1e8;
    border-left: 1px solid #e1e1e8;
    border-right: 1px solid #e1e1e8;
    background-color: #f7f7f9;

    @include border-radius(0 0 4px 4px);
    padding: 6px;
    top: 50%;
    left: 50%;
    min-height: 34px;
    float: left;
    width: 150px;
}

body.jsenabled .formlistingradio {
    display: none;
}

body.jsenabled .formlisting {
    display: block;
}

/* Badges styles */
a.criteria-action {
    padding: 0 3px;
    float: right;
}

div.criteria-description {
    padding: 10px 15px;
    margin: 5px 0;
    background: none repeat scroll 0 0 #f9f9f9;
    border: 1px solid #eee;
}

ul.badges {
    margin: 0;
    padding: 0;
    list-style: none;
}

.badges li {
    position: relative;
    display: inline-block;
    padding-top: 1em;
    text-align: center;
    vertical-align: top;
    width: 150px;

    [data-region="blocks-column"] & {
      width: 100%;
      background-color: $white;
      border-radius: $border-radius;
    }
}

.block {
  ul.badges {

    li {
      padding-top: 0.5rem;
    }

    a {
      width: calc(100% - 20px);
      margin: 0 10px;

      display: inline-flex;
      align-items: center;

      .badge-image {
        width: 40px;
        height: auto;
      }

      .badge-name {
        margin-left: 0.5rem;

        font-weight: $font-weight-sm-bold;
        color: $body-color;
        text-align: left;
        line-height: 1.3;
      }
    }
  }
}

.badges li .badge-name {
    display: block;
    padding: 5px;
}

.badges li > img {
    position: absolute;
}

.badges li .badge-image {
    width: 100px;
    height: 100px;
    left: 10px;
    top: 0;
    z-index: 1;
}

.badges li .badge-actions {
    position: relative;
}

.badges li .expireimage {
    width: 100px;
    height: 100px;
    left: 25px;
    top: 0;
    position: absolute;
    z-index: 10;
    opacity: 0.85;
}

#badge-image {
    background-color: transparent;
    padding: 0;
    position: relative;
    min-width: 100px;
    width: 20%;
    display: inline-block;
    vertical-align: top;
    margin-top: 17px;
    margin-bottom: 20px;

    .expireimage {
        width: 100px;
        height: 100px;
        left: 0;
        top: 0;
        opacity: 0.85;
        position: absolute;
        z-index: 10;
    }

    .singlebutton {
        padding-top: 5px;
        display: block;

        button {
            margin-left: 4px;
        }
    }
}

#badge-details {
    display: inline-block;
    width: 79%;
}

#badge-overview {
  h3 {
    margin: 2rem 0 1rem;
    padding-top: 2rem;

    font-size: 1.25rem;

    border-top: 1px solid $border-color;

    &:first-of-type {
      border-top: 0;
      padding-top: 0;
    }
  }
}

#badge-overview dl,
#badge-details dl {
    margin: 0 0 2rem;
    font-size: 14px;

    dt,
    dd {
        vertical-align: top;
        padding: 5px 0;
    }

    dt {
        clear: both;
        display: inline-block;
        width: 20%;
        min-width: 100px;
    }

    dd {
        display: inline-block;
        width: 79%;
        margin-left: 1%;
    }
}

#issued-badge-table {
  .badges {
    a {
      &:before {
        display: none;
      }

      .badge-name {
        font-size: $font-size-sm;
        font-weight: $font-weight-bold;
      }
    }
  }
}

.badge-profile {
    vertical-align: top;
}

.connected {
    @extend .text-success;
}

.notconnected {
    @extend .text-danger;
}

.connecting {
    @extend .text-warning;
}

#page-badges-award .recipienttable tr td {
    vertical-align: top;
}

#page-badges-award .recipienttable tr td.actions .actionbutton {
    margin: 0.3em 0;
    padding: 0.5em 0;
    width: 100%;
}

#page-badges-award .recipienttable tr td.existing,
#page-badges-award .recipienttable tr td.potential {
    width: 42%;
}

#issued-badge-table .activatebadge {
    display: inline-block;
}

.statusbox.active {
    background-color: $state-success-bg;
}

.statusbox.inactive {
    background-color: $state-warning-bg;
}

.statusbox {
    text-align: center;
    margin-bottom: 5px;
    padding: 5px;
}

.statusbox .activatebadge {
    display: inline-block;
}

.statusbox .activatebadge input[type=submit] {
    margin: 3px;
}

.activatebadge {
    margin: 0;
    text-align: left;
    vertical-align: middle;
}

img#persona_signin {
    cursor: pointer;
}

.addcourse {
    float: right;
}

.invisiblefieldset {
    display: inline;
    padding: 0;
    border-width: 0;
}

/** Page header */
$logo-height: 120px;
$logo-padding: 20px;
$logo-position: -$logo-height / 2 - $logo-padding;
$logo-position-md: -$logo-height / 2 - $logo-padding + 20px;

.c-hero-with-logo {
  margin-bottom: $logo-position;

  @include media-breakpoint-only(md) {
  margin-bottom: $logo-position-md;
  }

  @include media-breakpoint-only(sm) {
  margin-bottom: 0;
  }
}

.c-hero-without-logo {
  margin-bottom: 0;

  .page-context-header {
    display: none;
  }

}

.c-top-logo {
  position: relative;

  .logo {
    margin-top: 30px;
    margin-left: auto;
    margin-right: auto;

    padding: $logo-padding;

    background-color: $white;
    border-radius: $border-radius;
    position: relative;
    z-index: 1;
    text-align: center;

    box-shadow: 0 20px 50px 0 rgba(0,0,0,.25);

    @include media-breakpoint-between(sm, md) {
    padding: 10px;
    }

    @include media-breakpoint-only(sm) {
      display: none;
    }

    img {
      max-width: 100%;
      height: auto;
      max-height: $logo-height;

      @include media-breakpoint-only(md) {
      max-height: $logo-height / 2;
      }
    }

  }

}

ul.dragdrop-keyboard-drag {
  margin: 0;
  padding: 0;

  li {
    margin-bottom: .25rem;
    list-style-type: none;

    &:last-child {
        margin: 0;
    }

    a {
      display: block;
      background: $white;
      border: 1px solid $btn-secondary-border;
      box-shadow: $btn-box-shadow;
      border-radius: $border-radius;

      padding: $btn-padding-y $btn-padding-x;

      font-size: 0.75 * $font-size-base;
      font-weight: $btn-font-weight;
      color: $body-color-secondary;
      word-wrap: break-word;

      cursor: pointer;

      &:before {
        display: none;
      }

      &:hover {
        color: $theme-color-3;
      }
    }
  }
}

a.disabled:hover,
a.disabled {
    text-decoration: none;
    cursor: default;
    font-style: italic;
    color: #808080;
}

.progressbar_container {
    margin: 0 auto;
}

/* IE10 only fix for calendar titling */
.ie10 .yui3-calendar-header-label {
    display: inline-block;
}

dd:before,
dd:after {
    display: block;
    content: " ";
}

dd:after {
    clear: both;
}

// Active tabs with links should have a different
// cursor to indicate they are clickable.
.nav-tabs > .active > a[href],
.nav-tabs > .active > a[href]:hover,
.nav-tabs > .active > a[href]:focus {
    cursor: pointer;
}

.inplaceeditable {
    &.inplaceeditingon {
        position: relative;

        .editinstructions {
            font-size: $font-size-xs;
            margin-right: 0;
            margin-left: 0;
            top: -20px;
            left: 0;
            right: auto;
            white-space: nowrap;
        }

        input {
            width: 330px;
            vertical-align: text-bottom;
            margin-bottom: 0;
            position: relative;
        }

        select {
            margin-bottom: 0;
        }
    }

    .quickediticon img {
        opacity: 0.2;
    }

    .quickeditlink {
        color: inherit;
        text-decoration: inherit;
    }

    &:hover .quickeditlink .quickediticon img,
    .quickeditlink:focus .quickediticon img {
        opacity: 1;
    }

    &.inplaceeditable-toggle .quickediticon {
        display: none;
    }

    &.inplaceeditable-autocomplete {
        display: block;
    }
}

/** Chart area. */
.chart-area {

    .chart-table-data {
        display: none;
    }

    .chart-table {
        .chart-output-htmltable caption {
            white-space: nowrap;
        }
        /** When accessible, we display the table only. */
        &.accesshide {
            .chart-table-expand {
                display: none;
            }
            .chart-table-data {
                display: block;
            }
        }
    }
}

    .chart-table-expand a {
      margin-top: 1rem;
      display: block;
      width: 100%;
      text-align: center;
    }

[data-drag-type="move"] {
    cursor: move;
}

.clickable {
    cursor: pointer;
}

.overlay-icon-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.6);

    .loading-icon {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);

        .icon {
            height: 30px;
            width: 30px;
            font-size: 30px;
        }
    }
}

.editor_atto_content_wrap {
    background-color: white;
    color: #333;
}

.editor_atto_content {
    padding: 4px;
    resize: vertical;
    overflow: auto;
}

.editor_atto_content_wrap,
.editor_atto + textarea {
    width: 100%;
    padding: 0;
}

.editor_atto + textarea {
    border-radius: 0;
    resize: vertical;
    margin-top: -1px;
}

div.editor_atto_toolbar {
    display: block;
    background: $black;
    min-height: 35px;
    border: 1px solid $input-border-color;
    width: 100%;
    padding: 0 0 3px 0;
}

div.editor_atto_toolbar button {
    padding: 6px 7px!important;
    background: none;
    border: 0;
    margin: 0;
    border-radius: 0;
    cursor: pointer;
    transition: $general-transition;
}

div.editor_atto_toolbar button + button {
    border-left: 1px solid rgba($gray-800, 0.6);
}

div.editor_atto_toolbar button[disabled] {
    opacity: .45;
    background: none;
    cursor: default;
}

.editor_atto_toolbar button:hover {
    background-image: none;
    background-color: $gray-700;
}

.editor_atto_toolbar button:active,
.editor_atto_toolbar button.highlight {
    background-color: $theme-color-3!important;
    background-image: none!important;
}

/* Make firefox button sizes match other browsers */
div.editor_atto_toolbar button::-moz-focus-inner {
    border: 0;
    padding: 0;
}

div.editor_atto_toolbar button .icon {
    padding: 0;
    margin: 2px 0;
}

div.editor_atto_toolbar div.atto_group {
    display: inline-flex;
    border-radius: $border-radius;
    border: 0;
    margin: 6px 0px 3px 6px;
    background: $gray-900;
    overflow: hidden;
}

.editor_atto_content img {
    resize: both;
    overflow: auto;
}

.editor_atto {
  z-index: 10000;
}

.atto_hasmenu {
    /* IE8 places the images on top of each other if that is not set. */
    white-space: nowrap;
}

.atto_menuentry .icon {
    width: 16px;
    height: 16px;
}

.atto_menuentry {
    clear: left;
}

.atto_menuentry h1,
.atto_menuentry h2,
.atto_menuentry p {
    margin: 4px;
}

/*.atto_form label.sameline {
    display: inline-block;
    min-width: 10em;
}*/

.atto_form textarea.fullwidth,
.atto_form input.fullwidth {
    width: 100%;
}

.atto_form {
    padding: 0.5rem;
}

/*.atto_form label {
    display: block;
    margin: 0 0 5px 0;
}*/

.atto_control {
    position: absolute;
    right: -6px;
    bottom: -6px;
    display: none;
    cursor: pointer;
}

.atto_control .icon {
    background-color: white;
}

div.editor_atto_content:focus .atto_control,
div.editor_atto_content:hover .atto_control {
    display: block;
}

.editor_atto_menu.yui3-menu-hidden {
    display: none;
}

/* Get broken images back in firefox */
.editor_atto_content img:-moz-broken {
    -moz-force-broken-image-icon: 1;
    min-width: 24px;
    min-height: 24px;
}

/* Atto menu styling */
.moodle-dialogue-base .editor_atto_menu .moodle-dialogue-content .moodle-dialogue-bd {
    padding: 0;
    z-index: 1000;
}

.editor_atto_menu .dropdown-menu > li > a {
    margin: 3px 14px;
}

.editor_atto_menu .open ul.dropdown-menu {
    padding-top: 5px;
    padding-bottom: 5px;
}

.editor_atto_wrap {
    position: relative;
}
/*rtl:ignore*/
.editor_atto_wrap textarea {
    direction: ltr;
}

.editor_atto_notification .atto_info,
.editor_atto_notification .atto_warning {
    display: inline-block;
    background-color: #f2f2f2;
    padding: 0.5em;
    padding-left: 1em;
    padding-right: 1em;
    border-bottom-left-radius: 1em;
    border-bottom-right-radius: 1em;
}

.editor_atto_notification .atto_info {
    background-color: #f2f2f2;
}

.editor_atto_notification .atto_warning {
    background-color: #ffd700;
}

.editor_atto_toolbar,
.editor_atto_content_wrap,
.editor_atto + textarea {
    box-sizing: border-box;
}

.editor_atto_content.form-control {
    width: 100%;
    border-top: 0;
}

/** Atto fields do not have form-control because that would break the layout of the editor.
    So they need these extra styles to highlight the editor when there is a validation error. */
.has-danger .editor_atto_content.form-control,
.has-danger .editor_atto_content.form-control-danger {
    width: 100%;
    margin-top: 10px;
    font-size: $font-size-xs;
    color: $red-600;
}

.open.atto_menu > .dropdown-menu {
    display: block;
}
div.editor_atto_toolbar button .icon {
    color: $gray-100;
}

.atto_equation_library button {
  padding: 8px!important;
}

.atto_charmap_selector button {
    padding: 10px;
    margin: 2px;
}

.w-auto {
    width: auto;
}

/* Other */
.dataprivacy-main {
  a {
    text-decoration: none;
  }

  h3, .h3 {
    font-size: $font-size-lg;
    color: $body-color;
  }

  h4, .h4 {
    font-size: $font-size-base;
    color: $body-color;
  }
}

#page-admin-tool-installaddon-index #installfromrepobox {
  text-align: left;
  padding: 0;
}

.tool-lp-menu {
  padding: 0;
}

/*Hover Tooltip */
.hover-tooltip-container {
    position: relative;

    .hover-tooltip {
        opacity: 0;
        visibility: hidden;
        position: absolute;
        /*rtl:ignore*/
        left: 50%;
        top: calc(-50% - 5px);
        transform: translate(-50%, -50%);
        background-color: $body-color;
        border: 1px solid rgba(0, 0, 0, .2);
        color: $white;
        border-radius: $border-radius;
        box-sizing: border-box;
        padding: 0.5rem 1rem;
        font-size: $font-size-sm;
        white-space: nowrap;
        transition: opacity 0.15s, visibility 0.15s;
        z-index: 1000;

        &:before {
            content: '';
            display: inline-block;
            border-left: 8px solid transparent;
            border-right: 8px solid transparent;
            border-top: 8px solid $gray-900;
            position: absolute;
            bottom: -8px;
            left: calc(50% - 8px);
        }

        &:after {
            content: '';
            display: inline-block;
            border-left: 7px solid transparent;
            border-right: 7px solid transparent;
            border-top: 7px solid $gray-900;
            position: absolute;
            bottom: -6px;
            left: calc(50% - 7px);
            z-index: 2;
        }
    }

    &:hover {
        .hover-tooltip {
            opacity: 1;
            visibility: visible;
            transition: opacity 0.15s 0.5s, visibility 0.15s 0.5s;
        }
    }
}

/* mod workshop */
.path-mod-workshop {

  .userplan {

    .actions .btn {
      font-size: $font-size-xs;
    }

    dt, dd {
     padding: $spacer;

     @include media-breakpoint-only(sm) {
       width: 98%;
     }

     &.active {
       color: $white!important;

       background-color: $theme-color-3;
       border: none;

        a {
          color: $white!important;
        }
     }

     .active,
     .phasetitle {
        font-size: $font-size-lg!important;
        font-weight: $font-weight-sm-bold!important;
        margin-bottom: $spacer!important;
        display: block;
     }
   }

   .tasks {
     li {
       margin-bottom: 0.5rem;
     }
   }


  }

}

.gradesreport {
  overflow-x: auto;
}
/* Enrol */
#page-enrol-instances {
  .generaltable {
    .cell {
      text-align: left!important;

      img.spacer {
        display: none;
      }
    }
  }
}


.recordauthor {
  position: relative;
  padding: $alert-padding-y 5rem $alert-padding-y $alert-padding-x;
  margin-bottom: 2rem;
  border: $alert-border-width solid transparent;

  font-size: $font-size-sm;
  text-align: left;

  @include border-radius($alert-border-radius);

  @extend .alert-info;

  text-align: center!important;
  width: auto!important;
  margin: 2rem auto 0;
}

.recipename {
  margin: 2rem 0;
  text-align: left;
}

.picturesingle {
  text-align: left;

  img {
    border-radius: $border-radius;
  }
}

.recipedescription {
  padding: 2rem;
  background-color: $gray-100;
  border-radius: $border-radius;

  margin: 0!important;
  width: auto!important;
}

.recipetype {
  margin: 1rem 0;
  font-size: $font-size-xs;
  text-align: left;
}

.recipelink {
  margin-bottom: 2rem;
  text-align: left;
}


/* wiki */
.wiki_headingtitle {
  margin: 1rem 0 2rem;
}

.wiki_headingtime {
    font-style: normal;
    color: $gray-700;
    margin-bottom: 2rem;
}

a.wiki_newentry:link, a.wiki_newentry:visited {
  color: $theme-color-3;
  font-style: normal;
}

#page-mod-wiki-history,
#page-mod-wiki-map,
#page-mod-wiki-admin,
#page-mod-wiki-comments,
#page-mod-wiki-edit,
#page-mod-wiki-create {
  .settings-menu {
    form {
      input {
        display: inline-flex;
        width: auto;
      }
    }
  }
}

.checkbox {
  abbr {
    .icon {
      left: -2px;
      font-size: 11px;
    }
  }
}

.progress-actions {
  li {
    display: inline-flex;
    margin-right: 0.5rem;

    &:last-child {
      margin-right: 0;
    }
  }
}


/* mod admin/tool/lp/competencies */
.path-admin-tool-lp {
    [data-region="managecompetencies"] {

      ul li > span {
        display: inline-flex;
        width: calc(100% - 30px);
      }

      ul [aria-selected="true"] > span {
        border-color: $theme-color-3;
        background-color: $theme-color-3;
        color: $white;

        img {
          width: 12px;
          height: auto;
        }
      }

      [data-region="filtercompetencies"] {
        input {
          margin-left: 0;
          margin-right: 0.5rem;
        }
      }

      ul[data-enhance="tree"] {
        padding: 10px;
        margin: 0;
        border-radius: $border-radius;
      }

      .card {
        ul {
          margin: 0 0 1rem 0;
        }
      }
    }
}


/* import */
.ics-search {
  margin-bottom: 1rem;

  input[type=text] {
    width: auto;
    display: inline-flex;
  }
}

/* scorm */
#page-mod-scorm-report {
  .scormattemptcounts {
    display: block;

    position: relative;
    padding: $alert-padding-y 5rem $alert-padding-y $alert-padding-x;
    margin-bottom: 2rem;
    border: $alert-border-width solid transparent;

    font-size: $font-size-sm;
    text-align: left;

    @include border-radius($alert-border-radius);

    @extend .alert-info;

    margin-left: 0;
    margin-bottom: 1rem;
  }
}

#page-mod-scorm-player #scormpage #scorm_object {
  width: 100%;
  border: 0;
}

#page-mod-scorm-player #scormpage #scorm_toc_title {
  font-size: $font-size-sm;
  margin-bottom: $spacer;
}

.yui3-skin-sam .yui3-treeview-selected>.yui3-treeview-row {
  padding: 10px;

  border: 0;
  background-color: transparent;
  border-radius: $border-radius;

  a {
    &:before {
      display: none;
    }

    .icon {
      font-size: 12px;
    }
  }
}

#scorm_navpanel {
  display: none;
}

/* assign */
@include media-breakpoint-only(sm) {
  #page-mod-assign-view {
    #intro {
      margin: 0!important;
    }
  }
}

.path-mod-assign {
  .submissionlinks {
    text-align: left;

    @include media-breakpoint-only(sm) {
      margin-bottom: 0!important;

      .btn {
        width: 100%;
        display: block;
        margin: 0 0 10px 0!important;

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


/* feedback */
#page-mod-feedback-complete {
  .col-form-label {
    margin-right: 1rem;
  }
}

/* quiz */
#page-mod-quiz-report {
    .mform.mdl-align {
      text-align: left;
    }

    .toggleincludeauto {
      margin: 1rem 0;
      text-align: left;

      a {
        &:before {
          display: none;
        }
      }
    }

    .mform + h3 {
      margin-top: 2rem;
    }

    .highlight {
      background-color: $theme-color-8!important;
      border-color: $theme-color-8;
      color: $theme-color-3;
    }
}

    .gradedattempt {
      background-color: $theme-color-8;
      border-color: $theme-color-8;
      color: $theme-color-3;
    }

#page-mod-quiz-report {
  table#attempts {
    width: max-content;
    max-width: max-content;
    .header,
    .cell {
      padding: 0.75rem;
    }

    td {
      border-color: $table-border-color;
    }
  }
}

#page-mod-quiz-report div#commands, #page-mod-quiz-report .controls {
  margin-top: 1rem;
  margin-bottom: 2rem;
  text-align: left;
}

#techinfo_caption {
  .btn-icon {
    padding: 0;
    display: inline-flex!important;
  }
}

#page-mod-quiz-view .quizinfo, #page-mod-quiz-view #page .quizgradefeedback,
#page-mod-quiz-view #page .quizattempt {
  text-align: left;
  margin: 1rem 0 2rem;
}


/* mod forum */
.post-content-container {
  p {
    margin-bottom: 1.3rem;
  }
}

.discussionlocked {
  @extend .alert-danger;
  padding-left: 60px!important;

  &:after {
    @extend %fa-icon;
    @extend .fas;

    position: absolute;
    top: calc(50% - 7px);
    left: 24px;

    content: fa-content($fa-var-lock);

    font-size: 14px;
    color: inherit;
    opacity: 0.6;
  }
}

#page-mod-forum-search {
  .forumsearch {
      margin-right: 0!important;
  }
}

@include media-breakpoint-between(sm,md) {
.singlebutton.forumaddnew {
    width: 100%;

    .btn {
      width: 100%;
    }
  }
}

/* page-admin-tool-customlang-edit */
.path-admin-tool-customlang {
  fieldset.buttonsbar {
   margin: 2rem auto 0;
   padding: 1rem 0;

   border-top: 1px solid $border-color;
   text-align: right;
 }
}

/* mod wiki */
.wiki_restore_yes, .wiki_deletecomment_yes,
.wiki_restore_no, .wiki_deletecomment_no {
  float: none;
  display: inline-block;
  margin-right: 0.25rem;
}

.editor_atto_notification .atto_info, .editor_atto_notification .atto_warning {
  border-radius: $border-radius;
  font-size: $font-size-xs;
  margin: 5px 0;
  background-color: $yellow-200!important;
  color: $yellow-900;

  .icon {
    color: $yellow-700;
    margin-right: 0.25rem;
  }

  img {
    margin-right: 0.25rem;
  }
}

/* admin/tool/dataprivacy/pluginregistry.php */
.dataprivacy-main {
  .type-expand, .component-expand {
    margin-bottom: 1rem;

    .icon {
      margin: 0.25rem 0.5rem 0.25rem 0;

      font-size: 12px;
      line-height: 1.5;
    }
  }

  .component-expand {
    margin: 0;
  }
}

/* competencies page e.g admin/tool/lp/user_competency.php?id=1*/
#page-admin-tool-lp-user_competency {
  .competency-heading {
    background-color: $theme-color-9;
    padding: 1rem;
    border-radius: $border-radius;

    color: $theme-color-3;
  }
}

[data-region="competency-summary"] {
  dl {
    padding: 2rem;
    margin: 2rem 0;

    border: 1px solid $gray-200;
    border-radius: $border-radius;

    dd {
      padding: 1rem 0;
      margin-bottom: 2rem;
      border-bottom: 1px solid $gray-200;

      &:last-of-type {
        padding-bottom: 0;
        margin-bottom: 0;
        border-bottom: 0;
      }
    }
  }
}

#page-admin-tool-dataprivacy-summary {
  [role="main"] {

    .card-header {
      padding: 0;
      margin-top: 0;
      margin-bottom: 10px;

      h3 {
        font-size: $font-size-base;
        font-weight: $font-weight-bold;
      }
    }

    .card-body {
      padding: 0!important;
      font-size: $font-size-sm;

      h4 {
        font-size: $font-size-sm;
        opacity: 0.7;
      }
    }

    .card {
      background-color: transparent;
    }
  }
}


#page-admin-tool-lp-plan {
  [data-region="plan-summary"] {
    margin: 2rem 0!important;

    dd {
      margin-bottom: 1rem!important;
    }
  }
}


/* more */
#page-admin-tool-monitor-managerules {
  [role="main"] {
    h2 {
      margin-top: 2rem;
      margin-bottom: 2rem;
    }

    a + div {
      margin-top: 2rem;
    }
  }
}

// Emoji picker.
$picker-width: 100% !default;
$picker-width-xs: 320px !default;
$picker-height: 440px !default;
$picker-row-height: 40px !default;
$picker-emoji-button-size: 40px !default;
$picker-emoji-button-font-size: 24px !default;
$picker-emoji-category-count: 9 !default;
$picker-emojis-per-row: 7 !default;

.emoji-picker {
    background-color: $body-bg;
    border-radius: $border-radius;

    width: $picker-width;
    height: $picker-height;
    box-shadow: $box-shadow-lg;

    .category-button {
        padding: .375rem 0;
        height: 100%;
        width: $picker-width / $picker-emoji-category-count;
        border-top: none;
        border-left: none;
        border-right: none;
        border-bottom: 2px solid transparent;

        &.selected {
            border-bottom: 2px solid map-get($theme-colors, 'primary');
        }
    }

    .emojis-container,
    .search-results-container {
        min-width: $picker-emojis-per-row * $picker-emoji-button-size;
    }

    .picker-row {
        height: $picker-row-height;

        .category-name {
            line-height: $picker-row-height;
        }

        .emoji-button {
            height: $picker-emoji-button-size!important;
            width: $picker-emoji-button-size!important;
            line-height: $picker-emoji-button-size;
            font-size: $picker-emoji-button-font-size;
            overflow: hidden;

            @include hover-focus {
                color: inherit;
                text-decoration: none;
            }
        }
    }

    .emoji-preview {
        padding: 10px;
        border-radius: $border-radius;
        background-color: $body-bg;
        font-size: $picker-row-height;
        line-height: $picker-row-height;
    }

    .emoji-short-name {
        line-height: $picker-row-height / 2;
    }

    @include media-breakpoint-down(xs) {
        width: $picker-width-xs;
    }
}

.emoji-auto-complete {
    height: $picker-row-height;
    overflow-y: auto;

    .btn.btn-link.btn-icon.emoji-button {
        height: $picker-emoji-button-size!important;
        width: $picker-emoji-button-size!important;
        line-height: $picker-emoji-button-size;
        font-size: $picker-emoji-button-font-size;

        &.active {
            background-color: $gray-200;
        }
    }
}

.toast-wrapper {
    max-width: $toast-max-width;
    max-height: 0;
    // Place these above any modals and other elements.
    z-index: 1051;

    > :first-child {
        margin-top: $spacer;
    }
}

#page-mod-quiz-report .bold .reviewlink {
  display: inline-flex;
  align-items: center;

  padding: $badge-padding-y $badge-padding-x;
  font-size: $badge-font-size;
  font-weight: $badge-font-weight;
  vertical-align: baseline;
  border-radius: $badge-border-radius;
  transition: $general-transition;
  @extend .badge-link;
  @extend .badge-secondary;
}


/* Blog */
.blog {
  width: 100%;
  padding: 1.5rem;
  margin-bottom: 1.5rem;

  border: 1px solid $border-color;
  border-radius: $border-radius;

  position: relative;

  .blog-entry-author {
    font-size: $font-size-xs;
    color: $body-color-secondary;

    .blog-author-picture {
      display: inline-flex;
      align-items: center;

      .userpicture {
        margin-right: 10px;
      }

    }
  }

  .tag_list {
    margin-top: 0.5rem;
  }

  .blog-entry-cover {
    overflow: hidden;
    width: calc(100% + 3rem);
    margin: 0 -1.5rem 1.5rem;
    border-radius: $border-radius;

    img {
      width: 100%;
    }
  }

  .blog-entry-topic {
    a {
      display: block;
      margin: 1rem 0;
      font-size: 1.5rem;
      font-weight: $font-weight-sm-bold;
      color: $body-color;
    }
  }

  .blog-entry-date {
    color: $body-color-light;
  }

  .blog-entry {
    font-size: $font-size-sm;
  }

  .blog-entry-footer {
    padding-top: 1rem;
    margin-top: 1rem;
    margin-bottom: 0;
    border-top: 1px solid $border-color;
  }

  .comment-link {
    margin-top: 1rem;
  }

  .attachments {
    margin-top: 1rem;
    width: 100%;
    display: inline-flex;
    align-items: center;
    font-size: $font-size-sm;

    a {
      margin: 0;
      font-size: inherit;
    }
  }

}

#feedback_viewresponse_form {
  .col-md-3 {
    padding-right: 20px;
  }
}


// Policy popup
.eupopup-container-bottom {
  left: 30px;
  right: 30px;
  bottom: 30px;

  width: calc(100% - 60px);
  max-width: 600px;

  text-align: left;
}

.eupopup-container {
  padding: 1rem 4rem 1rem 1.25rem;
  margin: 0;

  position: fixed;
  left: 30px;
  bottom: 20px;
  z-index: 99998;

  background-color: $gray-900;
  max-width: 500px!important;

  border-radius: $border-radius;
  border: none;
  box-shadow: none;

  font-size: $font-size-sm;
  color: $gray-100;
  line-height: 1.5;

  @include media-breakpoint-between(sm, md) {
      width: calc(100% - 40px);
      max-width: calc(100% - 40px);
      left: 20px;
  }

  a {
    color: $gray-300;
    font-weight: $font-weight-sm-bold;

    &:before {
      background-color: $gray-400;
    }

    &:hover {
      color: $gray-400;
    }

  }

  .eupopup-closebutton {
    opacity: 1;
    padding: 9px;
    margin-left: 20px;

    display: inline-flex;
    justify-content: center;
    align-items: center;

    position: absolute;
    top: 10px;
    right: 10px;

    background-color: $gray-800;
    width: 30px;
    height: 30px;

    border: none;
    border-radius: $border-radius;

    font-size: $font-size-sm;
    color: $gray-100;
    text-align: center;

    cursor: pointer;

    transition: $general-transition;

    &:hover {
      background-color: $theme-color-3;
      color: $theme-color-9;
    }

    i {
      padding: 4px;
      margin: 0;
    }
    }

  .eupopup-button {
    margin: 0 10px 0 0;

    display: inline-block;
    text-align: center;

    vertical-align: middle;

    border-radius: $btn-border-radius;

    padding: 0.65rem 1.15rem;
    font-size: .75rem;
    font-weight: $btn-font-weight;
    line-height: 180%;

    background-color: $gray-800;

    &:hover {
      background-color: $theme-color-3;
      color: $theme-color-9;
      text-decoration: none;
    }

    &:empty {
      display: none;
    }
  }

  .eupopup-body ul {
    margin: 10px 0;
  }

  .eupopup-head:empty {
    display: none;
  }
}

.policy_buttons {
  .float-right {
    a {
      display: inline-block;
      text-align: center;

      vertical-align: middle;

      border-radius: $btn-border-radius;

      padding: $btn-padding-y $btn-padding-x;

      font-size: $btn-font-size;
      font-weight: $btn-font-weight;
      line-height: 180%;

      &:hover {
        text-decoration: none;
      }

      .icon {
        margin-left: 0.35rem;
      }
    }
  }
}


// Book Activity Module
.path-mod-book .book_toc ul {
  ul {
    margin-top: .35rem;
    margin-left: .35rem;
    font-size: $font-size-xs;

    li {
      margin-bottom: .35rem!important;
      padding-bottom: .35rem!important;

      a {
        opacity: .7;
      }
    }
  }
}