/** The message area **/
@mixin setSelectedContact() {
    background-color: $theme-color-1!important;
    color: #fff!important;
    border: 0!important;

    .information {
        .lastmessage {
            color: #fff;
        }
    }
    .picture {
        border: 0;
    }
}

.message-app {
    display: flex;
    flex-direction: column;
}

#page-message-index #region-main div[role="main"] {
    height: 100%;
}

#page-message-index #region-main div[role="main"] .message-app.main {
    height: 700px;
}

.message-app.main {
    min-height: 400px;
}

.message-drawer-toggle {
  display: block;
  width: 44px;
  height: 44px;

  border-radius: $border-radius;
  border: 0;

  padding: 0;
  margin: 0;

  background-color: $gray-100;
  color: $body-color;
  font-size: 14px;
  line-height: 1;

  cursor: pointer;

  transition: $general-transition;

  &:hover {
    background-color: $red-600;
    color: $white;
  }

  .hidden & {
    display: none;
  }
}

.hidden {
    display: none;
}

.messaging-area-container {

    .status {
        .online-text {
            display: none;
            color: $theme-color-1;
        }

        .offline-text {
            color: $red-600;
        }

        &.online {
            .online-text {
                display: inherit;
            }
            .offline-text {
                display: none;
            }
        }
    }

    a,
    .btn.btn-link {
        color: #4f94cd;
    }

    .section.card {
      margin: 0!important;
    }

    .messaging-area {
      width: calc(100% + 80px);
      margin: 0 -40px -40px;
      clear: both;

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

        img {
            max-width: 100%;
        }

        .contacts-area {
            border-right: 1px solid $border-color;
            height: 630px;

            width: 280px;
            display: inline-block;
            box-sizing: border-box;


            .searchtextarea {
                padding: 0.5rem;
                text-align: center;

                box-sizing: border-box;
                background-color: #fff;
                transition: background-color linear 0.2s;

                &.searching {
                    background-color: $gray-100;
                    transition: background-color linear 0.2s;

                    input {
                        background-color: #fff;
                        transition: background-color linear 0.2s;
                    }
                }

                .searchfilterarea {
                    line-height: 20px;
                    cursor: pointer;

                    .searchfilter {
                        float: left;
                    }

                    .searchfilterdelete {
                        float: left;
                        margin-left: 5px;
                    }
                }
            }

            .searcharea {

                .heading {
                    text-align: center;
                    border-top: 1px solid black;
                    border-bottom: 1px solid black;
                    font-size: 14px;
                    font-weight: bold;
                }

                .course {
                    text-align: center;

                    &:hover {
                        background-color: #4f94cd;
                        color: #fff;
                        border: 0;
                        cursor: pointer;
                    }
                }

                .noresults {
                    padding-top: 20px;
                    text-align: center;
                }
            }

            .contacts {
                height: 420px;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;

                .nocontacts {
                    padding-top: 20px;
                    text-align: center;
                }

                .contact {
                    height: 66px;
                    cursor: pointer;
                    border-radius: $border-radius;
                    margin: 0.5rem;
                    box-sizing: border-box;

                    &.unread {
                        background-color: #f1f1f1;

                        .picture {
                            border-color: #f1f1f1;
                        }

                        .information {
                            width: 60%;
                        }

                        .unread-count-container {
                            display: inline-block;
                            width: 15%;
                        }
                    }

                    &:hover {
                        @include setSelectedContact();
                    }

                    &.selected {
                        @include setSelectedContact();
                    }

                    .picture {
                        line-height: 66px;
                        text-align: center;
                        height: 66px;
                        border-bottom: 1px solid #fff;
                        width: 25%;
                        display: inline-block;
                        box-sizing: border-box;

                        img {
                            border-radius: 50%;
                            height: 34px;
                        }
                    }

                    .information {
                        padding: 6px 0;
                        height: 66px;
                        width: 75%;
                        display: inline-block;
                        box-sizing: border-box;

                        .name {
                            font-weight: bold;

                            img {
                                vertical-align: baseline;
                            }
                        }

                        .lastmessage {
                            word-wrap: break-word;
                            margin: 0;
                            height: 40px;
                            line-height: 17px;
                            overflow: hidden;
                            text-overflow: ellipsis;
                            white-space: nowrap;
                            color: #a1a1a1;
                            padding-right: 10px;
                        }
                    }

                    .unread-count-container {
                        display: none;
                        line-height: 66px;
                        text-align: center;
                        box-sizing: border-box;
                    }
                }
            }

            @mixin setSelectedTab() {
                color: #4f94cd;
            }

            .tabs {
                border-top: 1px solid $border-color;
                box-sizing: border-box;

                .tab {
                    cursor: pointer;
                    height: 100%;
                    background-color: $gray-100;
                    margin: 0;
                    width: 50%;
                    text-align: center;
                    float: left;

                    &:hover {
                        @include setSelectedTab();
                    }

                    .tabimage {
                        height: 30px;
                        line-height: 30px;

                        img {
                            height: 20px;
                        }
                    }
                }

                .tab.selected {
                    @include setSelectedTab();
                }
            }
        }

        .messages-area {
            width: calc(100% - 280px);
            height: 600px;

            box-sizing: border-box;
            margin: 0;
            position: relative;
            float: right;

            .btn-container {
                position: absolute;
                top: 0;
                left: 0;
                padding-left: 15px;
                font-weight: normal;

                &.view-toggle {
                    display: none;
                }

                &.delete-all {
                    display: none;
                }
            }

            .profile-header {
                height: 50px;
                line-height: 50px;
                display: none;

                .btn-container {
                    display: block;

                    .btn-link {
                        padding: 0;
                        line-height: inherit;
                    }
                }
            }

            .profile {
                padding: 30px;
                font-size: 16px;
                height: 600px;

                box-sizing: border-box;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;

                .user-container {
                    height: 100px;

                    .profile-picture {
                        border-radius: 50%;
                        max-height: 100px;
                        display: inline-block;
                    }

                    .name-container {
                        display: inline-block;
                        vertical-align: top;
                        margin-top: 20px;
                        margin-left: 10px;

                        .name {
                            font-weight: bold;
                            display: block;
                        }

                        .status {
                            display: block;
                            font-size: 14px;
                        }
                    }
                }

                .information {
                    margin: 0;
                    display: inline-block;
                    margin-top: 20px;
                    font-size: 14px;
                    list-style: none;

                    .name {
                        display: inline-block;
                        font-weight: bold;
                        text-align: right;
                        margin-right: 10px;
                    }

                    .value {
                        display: inline-block;
                    }
                }

                .actions {
                    padding-top: 80px;

                    .separator {
                        border-bottom: 1px solid $border-color;
                        margin-bottom: 20px;
                        padding-bottom: 5px;

                        a {
                            &.danger {
                                color: #ff6961;
                            }
                        }
                    }
                }
            }

            .messages-header {
                font-weight: bold;
                box-sizing: border-box;
                border-bottom: 1px solid $border-color;
                position: relative;

                .btn-link {
                    padding: 0;
                    line-height: inherit;
                }

                .delete-instructions {
                    display: none;
                }

                .name-container {
                    padding: 2rem;
                    display: inline-block;

                    .name {
                        line-height: 20px;
                    }

                    .status {
                        position: absolute;
                        top: -10px;

                        font-weight: $font-weight-bold;
                        font-size: $font-size-xs;
                        font-weight: normal;
                    }
                }

                .actions {
                    position: absolute;
                    top: 2rem;
                    right: 2rem;
                    font-weight: normal;

                    .cancel-messages-delete {
                        display: none;
                    }
                }
            }

            .messages {
                height: 330px;
                width: 100%;
                overflow-y: auto;
                overflow-x: hidden;
                -webkit-overflow-scrolling: touch;
                box-sizing: border-box;
                padding: 2.5rem;

                .blocktime {
                    clear: both;
                    text-align: center;
                    color: $gray-500;
                    font-size: $font-size-xs;
                    font-weight: $font-weight-bold;
                    margin: $spacer 0;
                }

                .message {

                    .deletemessagecheckbox {
                        display: none;
                        text-align: center;
                        padding-top: 5px;
                    }

                    .content {
                        padding: 1.5rem;
                        border-radius: $border-radius;

                        margin-bottom: 0.5rem;
                        font-size: $font-size-sm;
                        word-wrap: break-word;
                        max-width: 55%;
                        position: relative;

                        &.right {
                          background-color: $gray-100;
                        }

                        &.left {
                          background-color: $theme-color-6;
                        }

                        .text {
                            display: block;

                            p {
                                margin: 0;
                            }
                        }

                        .timesent {
                            font-size: 10px;
                            color: #a1a1a1;
                            float: right;
                        }
                    }

                    .content.left {
                        margin-left: auto;
                    }

                    .content.right {
                        margin-right: auto;
                    }
                }
            }

            .response {
                display: table;
                padding: 1.5rem;
                position: absolute;
                bottom: -31px;
                left: 0;
                width: 100%;
                line-height: 28px;
                text-align: center;
                border-top: 1px solid $border-color;
                box-sizing: border-box;
                background-color: #fff;
                transition: background-color linear 0.2s;

                .delete-confirmation {
                    display: none;

                    .btn.btn-link.confirm {
                        border: 1px solid #4f94cd;
                        height: 30px;

                        &:hover {
                            background-color: #4f94cd;
                            color: #fff;
                            text-shadow: none;
                        }
                    }
                }

                .message-box {
                    display: table-row;

                    .message-text-container {

                        textarea {
                            padding: 1.5rem;
                            vertical-align: middle;
                            width: 100%;
                            height: 120px;
                            margin: 0;
                            resize: none;
                            border: 0;
                            box-shadow: none;
                            box-sizing: border-box;
                            background-color: $gray-100;
                            border-radius: $border-radius;
                            font-size: $font-size-sm;
                            transition: background-color linear 0.2s;

                            &:focus {
                                box-shadow: none;
                            }
                        }
                    }
                }

                &.messaging {
                    background-color: $gray-100;
                    transition: background-color linear 0.2s;

                    .message-box {
                        .message-text-container {
                            textarea {
                                background-color: #fff;
                                transition: background-color linear 0.2s;
                            }
                        }
                    }
                }
            }

            &.editing {
                .messages-header {
                    .btn-container {
                        &.view-all {
                            display: none;
                        }

                        &.delete-all {
                            display: block;
                        }
                    }

                    .delete-instructions {
                        display: block;
                    }

                    .name-container {
                        display: none;
                    }

                    .actions {
                        .messages-delete {
                            display: none;
                        }

                        .cancel-messages-delete {
                            display: block;
                        }
                    }
                }

                .messages {
                    .message {
                        cursor: pointer;

                        &[aria-checked="true"] {
                            .content {
                                background-color: $red-600;
                                border-color: $red-600;
                                color: #fff;

                                .timesent {
                                    color: #fff;
                                }
                            }
                        }

                        &[aria-checked="false"] {
                            .content {
                                &:hover {
                                    background-color: $red-600;
                                    color: #fff;

                                    .timesent {
                                        color: #fff;
                                    }
                                }
                            }
                        }
                    }
                }

                .response {
                    .delete-confirmation {
                        display: block;
                    }

                    .message-box {
                        display: none;
                    }
                }
            }
        }
    }
}

.preferences-container {
    overflow-x: auto;
    width: 100%;

    .table {
      width: max-content;
    }

    .container-fluid {
        padding: 0;

        .span6 {
            min-height: 20px;
        }
    }
    .align-bottom {
        vertical-align: bottom;
    }
    .preference-table {
        thead {
            th {
                text-align: center;

                h4 {
                  margin: 0;
                }

                .config-warning {
                    display: none;
                }

                &.unconfigured {
                    .config-warning {
                        display: inline-block;
                    }
                }
            }
        }
        tr {
            td {
                &:not(:first-child) {
                    text-align: center;
                }
                &:nth-child(even) {
                    background-color: #f7f7f7;
                }
            }
            th:nth-child(even) {
                background-color: #f7f7f7;
            }
        }

        h4 {
            margin: 0;
            font-weight: $font-weight-bold;
            font-size: $font-size-sm;

            color: $table-head-color;
        }

        .preference-row {
            .hover-tooltip-container {
                display: inline-block;
            }

            .preference-name {
                vertical-align: middle;
            }
            .disabled-message {
                text-align: center;
                height: 30px;
                line-height: 30px;
            }
            .preference-state {
                margin: 0;
                padding: 0;
                display: inline-block;
                vertical-align: middle;

                input[type="checkbox"]:checked + .preference-state-status-container {
                    background-color: #5cb85c;

                    .on-text {
                        display: inline-block;
                    }
                    .off-text {
                        display: none;
                    }
                }
                .preference-state-status-container {
                    width: auto;
                    height: 30px;
                    line-height: 30px;
                    text-align: center;
                    padding: 0 20px;
                    border-radius: 30px;
                    background-color: #d9534f;
                    font-weight: $font-weight-bold;
                    font-size: $font-size-xs;
                    color: #fff;
                    cursor: pointer;

                    .loading-icon {
                        display: none;
                    }
                    .on-text {
                        display: none;
                    }
                    .off-text {
                        display: inline-block;
                    }
                }
                &.loading {
                    input[type="checkbox"]:checked + .preference-state-status-container {
                        .on-text,
                        .off-text {
                            display: none;
                        }
                    }

                    .preference-state-status-container {
                        .on-text,
                        .off-text {
                            display: none;
                        }
                        .loading-icon {
                            display: block;
                        }
                    }
                }
            }
            &.loading {
                .preference-name {
                    .loading-icon {
                        display: block;
                    }
                }
            }
        }
    }
}

.disabled-message {
    display: none;
}

.disabled {
    .disabled-message {
        display: block;

        + form {
            display: none;
        }
    }
}

.general-settings-container {
    .loading-icon {
        display: none;
    }
    .loading {
        .loading-icon {
            display: inline-block;
        }
    }
    label {
        display: inline-block;
    }
}
.processor-container {
    position: relative;

    .loading-container {
        display: none;
        position: absolute;
        width: 100%;
        height: 100%;
        text-align: center;
        background-color: rgba(255, 255, 255, 0.5);

        .vertical-align {
            height: 100%;
            width: 0%;
            display: inline-block;
            vertical-align: middle;
        }
    }

    &.loading {
        .loading-container {
            display: block;
        }
    }
}

.preferences-page-container {
    .checkbox-container {
        margin: 30px 5px;
        line-height: 20px;

        .loading-icon {
            display: none;
        }

        &.loading {
            .loading-icon {
                display: inline-block;
            }
        }
    }
}

#page-message-output-popup-notifications #region-main {
    background-color: transparent!important;
}

.notification-area {

    display: inline-flex;
    height: auto;

    box-sizing: border-box;
    background-color: transparent;
    color: $body-color;

    @include media-breakpoint-down(md) {
      height: auto;
    }

    .control-area {
        padding: 0;
        box-sizing: border-box;
        display: inline-flex;
        width: 300px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-right: 1px solid $border-color;

        @include media-breakpoint-down(md) {
            height: auto;
            width: 100%;
            display: block;

            margin: 0 auto;
            padding: 0;
            border-right: 0;
        }

        .content {
            padding: 0;
            position: relative;

            .content-item-container {
                cursor: pointer;
            }

            &:empty + .empty-text {
                display: block;
            }
        }

        .loading-icon {
            display: none;
        }

        .empty-text {
            display: none;
            text-align: center;
        }

        &.loading {
            .loading-icon {
                display: block;
                text-align: center;
                box-sizing: border-box;
                padding: 5px;
            }

            .content:empty + .empty-text {
                display: none;
            }
        }
    }

    .content-area {
        box-sizing: border-box;
        display: inline-block;
        width: calc(100% - 310px);

        @include media-breakpoint-down(md) {
            width: 100%;
            display: block;
            margin: 0 auto;
        }

        .toggle-mode {
            display: none;
        }

        .header {

            box-sizing: border-box;
            border-bottom: 1px solid $border-color;
            padding: 1rem 2rem 2rem;

            .image-container {
                display: inline-block;
                height: 60px;
                width: 60px;

                img {
                  width: 42px;
                }
            }

            .subject-container {
                max-width: calc(100% - 24px);
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                height: 25px;

                box-sizing: border-box;
            }

            .timestamp {
                font-size: 10px;
                line-height: 10px;
                margin: 0;
                color: $body-color-light;
            }

            &:empty {
                display: none;
            }
        }

        > .content {
            height: auto;

            box-sizing: border-box;
            overflow: auto;
            -webkit-overflow-scrolling: touch;
            padding: 2rem;

            &:empty {
                display: none;

                & + .empty-text {
                    display: block;
                    text-align: left;
                    padding: 0 1rem 1rem;
                }
            }
        }

        .empty-text {
            display: none;
        }

        .footer {
            box-sizing: border-box;

            a {
                display: block;
                margin: -2rem 0 0 2rem;

                @include media-breakpoint-down(md) {
                  margin: -2rem 0 0 0;
                }
            }

            &:empty {
                display: none;
            }
        }
    }
}


div.disabled {
  opacity: 0.5;
}

/* notifications */
.notification-area {
    width: 100%;

  .content-item-container {
    margin: 2px;
    border-bottom: 0;
    border-radius: $border-radius;

     &.unread {
       background-color: $theme-color-3;
       color: $white;

       .timestamp {
         color: $white;
       }
     }

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

  .notification.unread {
    margin: 0;
    background-color: $body-color-light;
  }


// New styles for the messaging UI. Once MDL-63303 is done all CSS above this line should be removed.
$message-drawer-width: 430px;

.message-drawer {
    padding: 10px;

    position: fixed;
    top: 10px;
    right: 10px;

    height: calc(100% - 20px);
    width: $message-drawer-width;

    z-index: 99999;

    box-shadow: $box-shadow;

    border-radius: $border-radius;
    background-color: $body-bg;

    display: flex;
    flex-direction: column;
    @include transition();

    @include media-breakpoint-only(sm) {
      width: 100%;
      height: 100%;
      top: 0;
      right: 0;
    }

    &.hidden {
        display: block;
        right: -100%;
    }

    .nav {
      .nav-item {
        font-size: $font-size-sm;
        font-weight: $font-weight-sm-bold;

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

        .active {
          &:before {
            width: 100%;
          }
        }
      }
    }

}

/* for moodle 3.8 */
[data-region="message-drawer"] {
    display: contents;
}

[data-region="send-message-txt"] {
    height: 120px;
}
/* end */

.message-drawer,
.message-app {
  [data-region="no-results-container"] {
    font-size: $font-size-xs;
    color: $body-color-secondary;
  }

  .message-title {
      font-size: $font-size-xs;
      font-weight: $font-weight-bold;
  }

  .close {
    position: absolute;
    top: 7px;
    right: 6px;
    z-index: 10000;
  }

  .card {
    background-color: transparent;
    margin-bottom: 0.5rem;

    .card-header {
      background-color: transparent!important;
      border-bottom: none;
    }

    .text-muted {
      font-size: $font-size-xs;
    }
  }

  .text-gray {
    color: $gray-700;
  }

  .section {
    background-color: $gray-100;
  }

  .section.expanded {
      overflow: hidden;
      border-radius: $border-radius;
      box-shadow: $box-shadow;
      border: 2px solid $theme-color-6;
  }

  .expanded {
    .text-gray {
      color: $gray-900;
    }
  }

  .header-container {
      flex-shrink: 0;
  }

  .body-container {
      flex: 1;
      overflow: hidden;

      & > * {
          position: absolute;
          right: 0;
          left: 0;
          top: 0;
          bottom: 0;
      }
  }

  .footer-container {
      flex-shrink: 0;
  }

  .matchtext {
      background-color: lighten($theme-color-1, 40%);
      color: $body-color;
      height: 1.5rem;
  }
  .contact-status {
      position: absolute;
      left: 11px;
      top: 11px;
      width: 10px;
      height: 10px;
      border-radius: 50%;

      &.online {
          border: 2px solid $body-bg;
          background-color: $green-700;
      }
  }

  .message-txt {
    padding: 0 60px 0 0;
    margin: 0;
    font-size: $font-size-xs;
    color: $body-color-secondary;
  }

  .message {
    img {
      width: auto;
      height: auto;
    }
  }

  .clickable {
      padding: 0.25rem;
      cursor: pointer;
      transition: $general-transition;
      border-radius: $border-radius;

      position: relative;

      &:hover {
          &:before {
            content: '';
            background-color: $border-color;
            width: 5px;
            height: 5px;

            border-radius: $border-radius;

            position: absolute;
            top: 0;
            left: -3px;

            animation: pulse 2s infinite;
          }
      }

  }

  a,
  .btn-link {
      color: inherit;
      text-decoration: none;
  }
  .btn-link {
      font-size: $font-size-xs;
      &:focus {
          box-shadow: none;
      }

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

  .icon {
      margin: 0;
  }

  [data-region="day-container"] {
    padding-top: 2rem;
    font-size: $font-size-sm;
    color: $body-color-secondary;

    position: relative;

    textarea {
        height: 120px!important;
    }

    h6 {
      font-size: $font-size-xs;
    }

    &:before {
      content: '';
      background-color: $border-color;
      width: 60px;
      height: 1px;

      position: absolute;
      top: 0;
      left: calc(50% - 30px);
    }
  }

  [data-region="content-container"] {
    font-size: $font-size-sm;
    color: $body-color-secondary;
  }

  .overview-section-toggle {
      .collapsed-icon-container {
          display: none;
      }
      .expanded-icon-container {
          display: inline-block;
      }

      &.collapsed {
          .collapsed-icon-container {
              display: inline-block;
          }
          .expanded-icon-container {
              display: none;
          }
      }
  }

  .btn.btn-link.btn-icon {
      height: $icon-width;
      width: $icon-width;
      padding: 0;
      border-radius: 50%;
      flex-shrink: 0;
  }

  .view-overview-body {
      .section {
          display: block;
          margin: 0 0 0.5rem!important;

          &.expanded {
              display: flex;
          }
      }
  }

  .view-conversation {
      .content-message-container {
          img {
              max-width: 100%;
          }
      }
  }
  .list-group {
      margin-top: 0;

      .badge {
        position: absolute;
        top: 9px;
        left: 7px;
      }

      .list-group-item {
          box-shadow: none;
          background-color: transparent;

          border-radius: $border-radius;
          border-bottom: 1px solid $border-color;
          margin-bottom: 0;


          &:nth-child(2n) {
            background-color: transparent;
          }

          &:first-child {
              border-top: 0;
          }
          &:last-child {
              border-bottom: 0;
          }
      }
  }

  .list-group-item-action {
    border-radius: 0;
    transition: $general-transition;

    &:hover {
      background-color: $gray-200!important;
    }
  }

  .section {
    border-bottom: 0;

    .collapsing {
        overflow: hidden;
    }
  }

  .lazy-load-list {
      overflow-y: auto;
  }
}

.dir-rtl {
    .message-drawer {
        box-shadow: $box-shadow;
    }
}

.message-search-results-content {
  border-bottom: 1px solid $border-color;
  padding-bottom: 1.5rem;
}

.message-name {
  font-size: $font-size-sm;
}

.message-user-status,
[data-action="view-group-info"] small {
  display: block;
  width: 100%;

  font-size: .65rem;
  font-weight: $font-weight-sm-bold;
  color: $body-color-light;
}

.message-name-favorite {
  position: absolute;
  left: 29px;
  top: -5px;

  width: 20px;
  height: 20px;

  background-color: $yellow-400;
  border-radius: $border-radius-max;

  color: $white;
  text-align: center;
  line-height: 1.1;

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

.c-message-header {
  padding: 10px 10px 10px 0px;
  background-color: $gray-100;
  border-radius: $border-radius;
}

[data-action="view-contact"] div,
[data-action="view-group-info"] {
  position: relative;
}

[data-region="last-message-date"] {
  right: 0;
}

/* moodle 3.7 */
.message-app-bg {
  width: 80%;

  .message-message-txt {
    padding: 10px 20px;
    margin-left: 32px;

    background-color: $gray-100;
    border-radius: 25px;

    font-size: $font-size-sm;
    word-break: break-word;
  }
}

.message-app-bg-secondary {
  width: 80%;

  .message-message-txt {
    background-color: $theme-color-9;

    padding: 10px 20px;
    margin-top: 0.25rem;
    margin-left: 7px;

    border-radius: 25px;
    font-size: $font-size-sm;
    color: $theme-color-1;
  }
}

#page-message-output-popup-notifications {
  [role="main"] {
    h2 {
      margin-bottom: 2rem;
    }

    hr {
      margin: 20px 0;
    }
  }

  #region-main {
    background-color: $drawer-bg;
    color: $body-color-secondary;
  }

}

/* Header of the messages app */
.btn-msg {
  min-width: 55px;
  padding: 10px;
  color: $gray-700;

  border: 2px solid $white;
  background-color: $white;
  border-radius: $border-radius;

  transition: $general-transition;

  &:hover {
    border: 2px solid $gray-300;
  }

  .icon {
    font-size: $font-size-sm;
    color: $gray-700;
  }

  .badge {
    top: 0;
    padding: 3px 7px;
  }

}

  [data-region="unread-count"] {
    padding: 3px 7px!important;
    background-color: $green-700!important;
    color: $white!important;
  }

.btn-msg-gray {
  border: 2px solid $gray-100;
  background-color: $gray-100;

  &:hover {
    border: 2px solid $gray-300;
    background-color: $gray-100;
  }
}

[data-region="empty-message-container"] {
  .text-muted {
    margin-bottom: 1rem;
  }
}

.alert {
  .text-muted {
    color: inherit!important;
    margin-bottom: 0.5rem;
  }
}

.message-drawer-backdrop {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10001;

  background-color: rgba(#000, .60);

  cursor: e-resize;
}

    .emoji-picker-container {
        position: absolute;
        top: -5px;
        right: 0;
        transform: translateY(-100%);
        z-index: 9999;

        .emoji-picker {
            .picker-row {
                // To override the button styling for the message app.
                .emoji-button {
                    height: $picker-emoji-button-size;
                    width: $picker-emoji-button-size;
                }
            }
        }

        @include media-breakpoint-down(xs) {
            right: -1 * map-get($spacers, 2);
        }
    }

    .emoji-auto-complete-container {
        overflow: auto;
        // Add a 50px buffer to account for scroll bars.
        max-height: $picker-row-height + 50px;
        transition: max-height .15s ease-in-out;
        visibility: visible;

        &.hidden {
            display: block;
            max-height: 0;
            visibility: hidden;
            overflow: hidden;
            transition: max-height .15s ease-in-out, visibility 0s linear .15s, overflow 0s linear .15s;
        }
    }

    .emoji-picker .emojis-container, .emoji-picker .search-results-container {
        max-height: 300px!important;
        overflow-y: scroll;
    }
