@import '../../lib/commonStyles/colors';

.root {
  position: relative;
  display: block;
  overflow-y: auto;
  overflow-x: hidden;
  height: 354px;
  padding: 0 15px;
  background: #fff;
}

.message {
  width: 100%;
  font-size: 14px;
  color: #333333;

  &:first-child {
    margin-top: 10px;
  }

  &:last-child {
    margin-bottom: 10px;
  }
}

.time {
  text-align: center;
  font-size: 12px;
  margin-bottom: 10px;
  color: #a2a2a2;
  clear: both;
}

.sender {
  color: #a2a2a2;
  clear: both;
  margin-bottom: 1px;
}

.imageBody,
.messageBody {
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
  max-width: 90%;
  text-align: left;
  hyphens: auto;
  border-radius: 16px;
  min-height: 13px;
  box-sizing: content-box;
  /* For Firefox */
  white-space: pre-wrap;
  word-break: break-word;
  /* For Chrome and IE */
  word-wrap: break-word;
}

.messageBody {
  background: $sms-bubble-background-color;
  padding: 10px 15px;
}

.messageBody.inbound,
.imageBody.inbound {
  border-bottom-left-radius: 10px;
  background: #efefef;

  &:before {
    z-index: 0;
    position: absolute;
    content: '';
    width: 25px;
    height: 25px;
    bottom: 0px;
    left: -10px;
    background: #efefef;
    border-bottom-right-radius: 33px;
    transform: rotate(-3deg);
  }

  &:after {
    z-index: 0;
    position: absolute;
    content: '';
    width: 30px;
    height: 30px;
    bottom: -1px;
    left: -24px;
    background: #fff;
    border-bottom-right-radius: 30px;
    transform: rotate(-24deg);
  }
}

.messageBody.outbound,
.imageBody.outbound {
  float: right;
  clear: both;
  border-bottom-right-radius: 10px;
  &:before {
    z-index: 0;
    position: absolute;
    content: '';
    width: 25px;
    height: 25px;
    bottom: -2px;
    right: -11px;
    background: $sms-bubble-background-color;
    border-bottom-left-radius: 33px;
    transform: rotate(-6deg);
  }

  &:after {
    z-index: 0;
    position: absolute;
    content: '';
    width: 30px;
    height: 30px;
    bottom: 3px;
    right: -23px;
    background: #fff;
    border-bottom-left-radius: 30px;
    transform: rotate(43deg);
  }
}

.messageBody.big {
  width: 85%;
  max-width: 85%;
}

.clear {
  clear: both;
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  vertical-align: baseline;
}

.loading {
  text-align: center;
  line-height: 40px;
  font-size: 14px;
}

.picture {
  width: 100%;
}
.ext {
  white-space: nowrap;
}

.previewMedia {
  &:hover,
  &.focus-visible,
  &[data-focus-visible-added] {
    .hoverAction {
      left: 0;
      bottom: 0;
      transform: translateY(0);
    }
  }
}
