@import '~styles/mixins';
@import '~styles/adminMixins';

.Detail {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: 0px !important;

  &.header {
    padding-top: $height_page_header;
  }

  .header {
    @include fixedHeader;
    border: none;
    @include box-shadow(0, 2px);

    .id {
      font-size: 12px;
      font-weight: 500;
      margin-left: 10px;
    }
  }

  .form {
    width: 100%;
    background-color: white;
  }

  .display-message {
    padding: 0 20px;
    height: 100%;
    overflow-y: scroll;
    display: flex;
    flex-direction: column-reverse;

    .views-by {
      font-size: 12px;
      text-align: right;
      margin-top: 5px;
    }

    .message-date {
      display: flex;
      justify-content: center;
      align-items: center;
      color: $color-grey;
      margin: 10px 0;
      .line {
        width: 100%;
        height: 1px;
        background-color: rgba($color: $color-grey, $alpha: 0.4);
      }
      .date {
        flex-shrink: 0;
        padding: 0px 15px;
        font-size: 13px;
      }
    }

    .message-container-item {
      padding-top: 10px;
      display: flex;

      .message-picture {
        margin-right: 10px;
        width: 25px;
        height: 25px;
        background-color: $color_user_background;
        border-radius: 25px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-position: center;
        background-size: cover;

        .circle {
          color: white;
          font-size: 12px;
          position: relative;
          left: 0.5px;
          top: -0.5px;
        }
      }

      .message-name {
        position: absolute;
        top: -10px;
        left: 0px;
        font-size: 8px;
        color: black;
        letter-spacing: 0.5px;
      }

      .message-item {
        max-width: 80%;
        padding: 5px 10px;
        border-radius: 4px;
        font-size: 14px;
        background-color: rgba($color: $color-grey, $alpha: 0.4);
        position: relative;

        .pdf-message {
          font-size: 12px;
          border-top: 1px solid rgba($color: $color-grey, $alpha: 0.2);
          padding-top: 5px;
          margin-top: 5px;
        }

        .image-message {
          max-width: 200px;
          max-height: 200px;
          margin-top: 10px;
          margin-bottom: 2px;
          border-radius: 4px;
          overflow: hidden;

          img {
            width: 100%;
          }
        }
      }

      &.me {
        flex-direction: row-reverse;

        .message-picture {
          margin-right: 0;
          margin-left: 10px;
        }

        .message-item {
          color: white;
          background-color: rgba($color: $color-blue, $alpha: 0.6);
          white-space: break-spaces;
        }
      }

      &.prev-me {
        margin-left: 35px;
        padding-top: 2px;

        &.me {
          margin-left: 0px;
          margin-right: 35px;
        }
      }
    }
  }
}
