.messenger {
  margin-top: 50px;

  .messenger-title {
    margin-bottom: 20px;
  }

  .messenger-body {
    height: 100%;
    $newMsg-height: 70px;
    $min-height: 400px;
    background-color: rgba(#e0e6ed, 0.75);
    min-height: $min-height;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    position: relative;
    overflow: hidden;

    .messages {
      min-height: calc(#{$min-height} - #{$newMsg-height});
      margin-bottom: $newMsg-height;
      padding: 20px 10px;

      &.no-msg {
        display: flex;
        justify-content: center;
        align-items: center;

        p {
          color: #000;
        }
      }

      .message {
        width: 100%;
        margin-bottom: 30px;
        --avatar-width: 50px;

        .txt {
          width: 60%;
          background: #fff;
          @include borderRadius(15px);
          padding: 15px;
          padding-bottom: 35px;
          margin-bottom: 10px;
          position: relative;

          @media (max-width: 768px) {
            width: calc(100% - 60px);
          }

          img {
            width: 100%;
            margin-bottom: 15px;
          }

          p:not(.date) {
            color: #000;
          }

          .date {
            position: absolute;
            bottom: 0;
            font-size: 12px;
          }
        }

        svg {
          width: var(--avatar-width);
          display: block;
        }

        &.user {
          .txt {
            margin-right: calc(var(--avatar-width) - 5px);

            .date {
              left: 5px;
            }
          }
        }

        &.asan-admin {
          .txt {
            margin-right: auto;
            margin-left: calc(var(--avatar-width) - 5px);

            .date {
              right: 5px;
            }
          }

          svg {
            margin-right: auto;
          }
        }

        &.unread {
          .txt {
            background: rgba(orange, 0.2);
          }
        }
      }
    }

    .newMsg {
      background-color: rgba(#8a92a9, 0.16);
      width: 100%;
      height: $newMsg-height;
      position: absolute;
      bottom: 0;
      left: 0;

      .relativePos {
        display: flex;
        justify-content: flex-start;
        align-items: center;
      }

      input[type='text'] {
        border: none;
        background-color: #fff;
        padding: 20px;
        padding-left: 150px;
        width: calc(100% - 70px);
        margin-right: 5px;
        @include borderRadius(50px);
        @include boxSizing(border-box);
      }

      input[type='file'] {
        width: 0;
        height: 0;
        visibility: hidden;
      }

      label {
        background-image: url("data:image/svg+xml,%3Csvg fill='rgba(6,84,149,0.5)' version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 605.942 605.942' style='enable-background:new 0 0 605.942 605.942;' xml:space='preserve'%3E%3Cg%3E%3Cpath d='M435.099,0c-45.632,0-88.544,17.777-120.822,50.055L50.036,314.276c-66.603,66.622-66.603,175.018,0,241.64 c32.269,32.259,75.171,50.026,120.808,50.026s88.544-17.768,120.812-50.026l19.757-19.751l-12.321,0.588 c-0.062,0.005-0.728,0.033-1.889,0.033c-5.709,0-25.776-0.746-44.309-10.312l-2.815-1.454l-2.43,2.027 c-21.425,17.915-48.706,27.779-76.806,27.779c-32.034,0-62.118-12.432-84.714-35.009c-22.592-22.591-35.037-52.68-35.037-84.724 s12.445-62.127,35.037-84.724L350.37,86.149c22.592-22.591,52.685-35.037,84.729-35.037c32.04,0,62.128,12.446,84.724,35.037 c46.666,46.703,46.666,122.696,0.005,169.399L354.798,420.19c-8.291,8.306-19.771,12.881-32.331,12.881 c-13.641,0-26.847-5.394-36.242-14.808c-9.018-9.008-14.181-21.563-14.176-34.463c0-12.604,4.776-24.304,13.431-32.938 L432.541,204.36l-36.099-36.094L249.366,314.75c-18.479,18.479-28.539,43.284-28.334,69.84 c0.206,26.444,10.538,51.222,29.09,69.772c18.871,18.867,45.226,29.687,72.321,29.687c26.244,0,50.566-9.863,68.486-27.765 l164.986-164.628c66.589-66.631,66.589-175.018,0-241.601C523.643,17.777,480.731,0,435.099,0z'/%3E%3C/g%3E%3C/svg%3E%0A");
        background-size: 100%;
        -webkit-background-size: 100%;
        background-repeat: no-repeat;
        display: block;
        width: 35px;
        height: 35px;
        cursor: pointer;
        position: absolute;
        top: 50%;
        left: 10px;
        @include transform(translateY(-50%));
      }

      img {
        width: 50px;
        height: 50px;
        object-fit: cover;
        @include borderRadius(50%);
        @extend %defaultBoxShadow;
        border: 2px solid $theme;
        position: absolute;
        top: 50%;
        left: 5px;
        @include transform(translateY(-50%));
      }

      #clearFile {
        display: inline-block;
        color: red;
        font-size: 25px;
        position: absolute;
        top: 0;
        left: 40px;
        cursor: pointer;
      }

      button {
        position: absolute;
        top: 50%;
        left: 80px;
        @include transform(translateY(-50%));
        @include borderRadius(25px);
      }

      .validationMsg {
        position: absolute;
        right: 15px;
        bottom: 65px;

        p {
          color: red;
        }
      }
    }
  }
}
