// Using BEM syntax explained here: https://csswizardry.com/2013/01/mindbemding-getting-your-head-round-bem-syntax/

// Module: Contact Name
.module-contact-name {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-right: 8px;
  overflow-x: hidden;
}

.module-contact-name span {
  text-overflow: ellipsis;
  overflow-x: hidden;
  width: 100%;
  text-align: left;
  user-select: none;
}

.module-contact-name__profile-number {
  font-style: italic;
}

// Module: Message

.module-message {
  position: relative;
  display: inline-flex;
  flex-direction: row;
  align-items: stretch;
}

.module-message--expired {
  animation: module-message__shake 0.2s linear infinite;
}

@keyframes module-message__shake {
  0% {
    transform: translateX(0px);
  }
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(0px);
  }
  75% {
    transform: translateX(5px);
  }
  100% {
    transform: translateX(0px);
  }
}

// Spec: container < 438px
.module-message--incoming {
  margin-left: 0;
  margin-right: 32px;
}
.module-message--outgoing {
  float: right;
  margin-right: 0;
  margin-left: 32px;
}

.module-message__buttons {
  position: absolute;
  top: 0;
  bottom: 0;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  opacity: 0;
}

.module-message:hover .module-message__buttons {
  opacity: 1;
}

.module-message__buttons--incoming {
  left: 100%;
}
.module-message__buttons--outgoing {
  right: 100%;
}

.module-message__buttons__download {
  height: 24px;
  width: 24px;
  display: inline-block;
  cursor: pointer;
  @include color-svg('../images/download.svg', $color-light-45);
  &:hover {
    @include color-svg('../images/download.svg', $color-gray-90);
  }
}

.module-message__buttons__download--incoming {
  margin-left: 12px;
}
.module-message__buttons__download--outgoing {
  margin-right: 12px;
}

.module-message__buttons__reply {
  height: 24px;
  width: 24px;
  display: inline-block;
  cursor: pointer;
  @include color-svg('../images/reply.svg', $color-light-45);
  &:hover {
    @include color-svg('../images/reply.svg', $color-gray-90);
  }
}

.module-message__buttons__reply--incoming {
  margin-left: 12px;
}
.module-message__buttons__reply--outgoing {
  margin-right: 12px;
}

.module-message__buttons__menu {
  height: 24px;
  width: 24px;
  display: inline-block;
  cursor: pointer;
  @include color-svg('../images/ellipsis.svg', $color-light-45);
  &:hover {
    @include color-svg('../images/ellipsis.svg', $color-gray-90);
  }
}

.module-message__buttons__menu--incoming {
  margin-left: 12px;
}

.module_message__buttons__menu--outgoing {
  margin-right: 12px;
}

.module-message__error-container {
  width: 28px;
  position: relative;
}

.module-message__error {
  width: 20px;
  height: 20px;
  display: inline-block;
  position: absolute;
  bottom: 4px;
  @include color-svg('../images/error.svg', $color-core-red);
}

.module-message__error--outgoing {
  left: 8px;
}

.module-message__error--incoming {
  right: 8px;
}

.module-message__container {
  position: relative;
  display: inline-block;
  border-radius: 16px;
  padding-right: 12px;
  padding-left: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
  min-width: 0px;
}

.module-message__container--outgoing {
  background-color: $color-light-10;
}

// In case the color gets messed up
.module-message__container--incoming {
  background-color: $color-conversation-grey;
}

.module-message__container--incoming-red {
  background-color: $color-conversation-red;
}
.module-message__container--incoming-deep_orange {
  background-color: $color-conversation-deep_orange;
}
.module-message__container--incoming-brown {
  background-color: $color-conversation-brown;
}
.module-message__container--incoming-pink {
  background-color: $color-conversation-pink;
}
.module-message__container--incoming-purple {
  background-color: $color-conversation-purple;
}
.module-message__container--incoming-indigo {
  background-color: $color-conversation-indigo;
}
.module-message__container--incoming-blue {
  background-color: $color-conversation-blue;
}
.module-message__container--incoming-teal {
  background-color: $color-conversation-teal;
}
.module-message__container--incoming-green {
  background-color: $color-conversation-green;
}
.module-message__container--incoming-light_green {
  background-color: $color-conversation-light_green;
}
.module-message__container--incoming-blue_grey {
  background-color: $color-conversation-blue_grey;
}

// START

.module-message__attachment-container {
  // Entirely to ensure that images are centered if they aren't full width of bubble
  text-align: center;
  position: relative;
  cursor: pointer;

  margin-left: -12px;
  margin-right: -12px;
  margin-top: -10px;
  margin-bottom: -10px;

  border-radius: 16px;
  overflow: hidden;

  background-color: $color-white;
}

.module-message__attachment-container--with-content-below {
  margin-bottom: 7px;
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 0px;
}

.module-message__attachment-container--with-content-above {
  margin-top: 4px;
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
}

.module-message__img-attachment {
  margin-bottom: -3px;

  // redundant with attachment-container, but we get cursor flashing on move otherwise
  cursor: pointer;
}

.module-message__audio-attachment {
  margin-top: 2px;
}

.module-message__audio-attachment--with-content-below {
  margin-bottom: 5px;
}

.module-message__audio-attachment--with-content-above {
  margin-top: 6px;
}

.module-message__generic-attachment {
  display: flex;
  flex-direction: row;
}

.module-message__generic-attachment--with-content-below {
  padding-bottom: 6px;
}

.module-message__generic-attachment--with-content-above {
  padding-top: 4px;
}

.module-message__generic-attachment__icon-container {
  position: relative;
}

.module-message__generic-attachment__icon {
  background: url('../images/file-gradient.svg') no-repeat center;
  height: 44px;
  width: 56px;
  margin-left: -13px;
  margin-right: -14px;
  margin-bottom: -4px;

  // So we can center the extension text inside this icon
  display: flex;
  flex-direction: row;
  align-items: center;
}

.module-message__generic-attachment__icon-dangerous-container {
  position: absolute;

  top: -1px;
  right: -4px;

  height: 16px;
  width: 16px;

  border-radius: 50%;
  background-color: $color-white;
}

.module-message__generic-attachment__icon-dangerous {
  height: 16px;
  width: 16px;

  @include color-svg('../images/error-filled.svg', $color-core-red);
}

.module-message__generic-attachment__icon__extension {
  font-size: 10px;
  line-height: 13px;
  letter-spacing: 0.1px;
  text-transform: uppercase;

  // Along with flow layout in parent item, centers text
  text-align: center;
  width: 25px;
  margin-left: auto;
  margin-right: auto;

  // We don't have much room for text here, cut it off without ellipse
  overflow-x: hidden;
  white-space: nowrap;
  text-overflow: clip;

  color: $color-gray-90;
}

.module-message__generic-attachment__text {
  flex-grow: 1;
  margin-left: 8px;
  // The width of the icon plus our 8px margin
  max-width: calc(100% - 37px);
}

.module-message__generic-attachment__file-name {
  color: $color-gray-90;
  font-size: 14px;
  line-height: 18px;
  font-weight: 300;
  margin-top: 2px;

  // Handling really long filenames - cut them off
  overflow-x: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.module-message__generic-attachment__file-name--incoming {
  color: $color-white;
}

.module-message__generic-attachment__file-size {
  color: $color-gray-90;
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.3px;
  margin-top: 3px;
}

.module-message__generic-attachment__file-size--incoming {
  color: $color-white;
}

.module-message__author {
  color: $color-white;
  font-size: 13px;
  font-weight: 300;
  line-height: 18px;
  height: 18px;
  overflow-x: hidden;
  overflow-y: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.module-message__author__profile-name {
  font-style: italic;
}

.module-message__text {
  color: $color-gray-90;
  font-size: 14px;
  line-height: 18px;
  text-align: start;

  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap;

  a {
    text-decoration: underline;
    color: $color-gray-90;
  }
}

.module-message__text--incoming {
  color: $color-white;
  a {
    text-decoration: underline;
    color: $color-white;
  }
}

.module-message__text--error {
  font-style: italic;
}

.module-message__metadata {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-top: 3px;
  margin-bottom: -3px;
}

// With an image and no caption, this section needs to be on top of the image overlay
.module-message__metadata--with-image-no-caption {
  position: absolute;
  bottom: 9px;
  z-index: 2;

  width: 100%;
  // Because this is absolutely positioned, we 100% is too big, take it down by parent
  //   padding sizes.
  padding-right: 24px;
}

.module-message__metadata__date {
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.3px;
  color: $color-gray-60;
  text-transform: uppercase;
}
.module-message__metadata__date--incoming {
  color: $color-white-08;
}
.module-message__metadata__date--with-image-no-caption {
  color: $color-white;
}

.module-message__metadata__spacer {
  flex-grow: 1;
}

.module-message__metadata__status-icon {
  width: 12px;
  height: 12px;
  display: inline-block;
  margin-left: 6px;
  margin-bottom: 2px;
}

.module-message__metadata__status-icon--sending {
  @include color-svg('../images/sending.svg', $color-gray-60);
  animation: module-message__metdata__status-icon--spinning 4s linear infinite;
}

.module-message__metadata__status-icon--pow {
  @include color-svg('../images/pow.svg', $color-gray-60);
  animation: module-message__metdata__status-icon--spinning 4s linear infinite;
}

@keyframes module-message__metdata__status-icon--spinning {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

.module-message__metadata__status-icon--sent {
  @include color-svg('../images/check-circle-outline.svg', $color-gray-60);
}
.module-message__metadata__status-icon--delivered {
  @include color-svg('../images/double-check.svg', $color-gray-60);
  width: 18px;
}
.module-message__metadata__status-icon--read {
  @include color-svg('../images/read.svg', $color-gray-60);
  width: 18px;
}

// When status indicators are overlaid on top of an image, they use different colors
.module-message__metadata__status-icon--with-image-no-caption {
  background-color: $color-white;
}

.module-message__send-message-button {
  cursor: pointer;
  font-weight: 300;
  font-size: 13px;
  line-height: 18px;
  color: $color-signal-blue;
  background-color: $color-light-02;
  border: 1px solid $color-black-012;

  margin-top: 8px;
  margin-bottom: -10px;
  margin-left: -12px;
  margin-right: -12px;

  text-align: center;
  padding: 10px;

  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 16px;
}

.module-message__author-avatar {
  position: absolute;
  bottom: 0px;
  right: calc(100% + 4px);
}

.module-message__typing-container {
  height: 16px;

  display: flex;
  flex-direction: row;
  align-items: center;
}

// Module: Expire Timer

.module-expire-timer {
  width: 12px;
  height: 12px;
  display: inline-block;
  margin-left: 6px;
  margin-bottom: 2px;
  @include color-svg('../images/timer-60.svg', $color-gray-60);
}

.module-expire-timer--55 {
  @include color-svg('../images/timer-55.svg', $color-gray-60);
}
.module-expire-timer--50 {
  @include color-svg('../images/timer-50.svg', $color-gray-60);
}
.module-expire-timer--45 {
  @include color-svg('../images/timer-45.svg', $color-gray-60);
}
.module-expire-timer--40 {
  @include color-svg('../images/timer-40.svg', $color-gray-60);
}
.module-expire-timer--35 {
  @include color-svg('../images/timer-35.svg', $color-gray-60);
}
.module-expire-timer--30 {
  @include color-svg('../images/timer-30.svg', $color-gray-60);
}
.module-expire-timer--25 {
  @include color-svg('../images/timer-25.svg', $color-gray-60);
}
.module-expire-timer--20 {
  @include color-svg('../images/timer-20.svg', $color-gray-60);
}
.module-expire-timer--15 {
  @include color-svg('../images/timer-15.svg', $color-gray-60);
}
.module-expire-timer--10 {
  @include color-svg('../images/timer-10.svg', $color-gray-60);
}
.module-expire-timer--05 {
  @include color-svg('../images/timer-05.svg', $color-gray-60);
}
.module-expire-timer--00 {
  @include color-svg('../images/timer-00.svg', $color-gray-60);
}

.module-expire-timer--incoming {
  background-color: $color-white-08;
}

// When status indicators are overlaid on top of an image, they use different colors
.module-expire-timer--with-image-no-caption {
  background-color: $color-white;
}

// Module: Quoted Reply

.module-quote-container {
  margin-left: -6px;
  margin-right: -6px;
  margin-top: -4px;
  margin-bottom: 5px;
}

.module-quote-container--with-content-above {
  margin-top: 3px;
}

.module-quote {
  position: relative;
  border-radius: 4px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;

  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  overflow: hidden;

  border-left-width: 4px;
  border-left-style: solid;
}

.module-quote--no-click {
  cursor: auto;
}

.module-quote--with-content-above {
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.module-quote--with-reference-warning {
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 0px;
}

.module-quote--outgoing {
  border-left-color: $color-conversation-grey;
  background-color: $color-conversation-grey-tint;
}
.module-quote--outgoing-red {
  border-left-color: $color-conversation-red;
  background-color: $color-conversation-red-tint;
}
.module-quote--outgoing-deep_orange {
  border-left-color: $color-conversation-deep_orange;
  background-color: $color-conversation-deep_orange-tint;
}
.module-quote--outgoing-brown {
  border-left-color: $color-conversation-brown;
  background-color: $color-conversation-brown-tint;
}
.module-quote--outgoing-pink {
  border-left-color: $color-conversation-pink;
  background-color: $color-conversation-pink-tint;
}
.module-quote--outgoing-purple {
  border-left-color: $color-conversation-purple;
  background-color: $color-conversation-purple-tint;
}
.module-quote--outgoing-indigo {
  border-left-color: $color-conversation-indigo;
  background-color: $color-conversation-indigo-tint;
}
.module-quote--outgoing-blue {
  border-left-color: $color-conversation-blue;
  background-color: $color-conversation-blue-tint;
}
.module-quote--outgoing-teal {
  border-left-color: $color-conversation-teal;
  background-color: $color-conversation-teal-tint;
}
.module-quote--outgoing-green {
  border-left-color: $color-conversation-green;
  background-color: $color-conversation-green-tint;
}
.module-quote--outgoing-light_green {
  border-left-color: $color-conversation-light_green;
  background-color: $color-conversation-light_green-tint;
}
.module-quote--outgoing-blue_grey {
  border-left-color: $color-conversation-blue_grey;
  background-color: $color-conversation-blue_grey-tint;
}

.module-quote--incoming {
  border-left-color: $color-white;
  background-color: $color-conversation-grey-tint;
}
.module-quote--incoming-red {
  background-color: $color-conversation-red-tint;
}
.module-quote--incoming-deep_orange {
  background-color: $color-conversation-deep_orange-tint;
}
.module-quote--incoming-brown {
  background-color: $color-conversation-brown-tint;
}
.module-quote--incoming-pink {
  background-color: $color-conversation-pink-tint;
}
.module-quote--incoming-purple {
  background-color: $color-conversation-purple-tint;
}
.module-quote--incoming-indigo {
  background-color: $color-conversation-indigo-tint;
}
.module-quote--incoming-blue {
  background-color: $color-conversation-blue-tint;
}
.module-quote--incoming-teal {
  background-color: $color-conversation-teal-tint;
}
.module-quote--incoming-green {
  background-color: $color-conversation-green-tint;
}
.module-quote--incoming-light_green {
  background-color: $color-conversation-light_green-tint;
}
.module-quote--incoming-blue_grey {
  background-color: $color-conversation-blue_grey-tint;
}

.module-quote__primary {
  flex-grow: 1;
  padding-left: 8px;
  padding-right: 8px;
  padding-top: 7px;
  padding-bottom: 7px;

  max-width: 100%;
}

.module-quote__primary__author {
  font-size: 13px;
  line-height: 18px;
  font-weight: 300;
  color: $color-gray-90;

  overflow-x: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.module-quote__primary__profile-name {
  font-style: italic;
}

.module-quote__primary__text {
  font-size: 14px;
  line-height: 18px;
  color: $color-gray-90;

  a {
    color: $color-gray-90;
  }

  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap;

  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  // Note: -webkit-line-clamp doesn't work for RTL text, and it forces you to use
  //   ... as the truncation indicator. That's not a solution that works well for
  //   all languages. More resources:
  //     - http://hackingui.com/front-end/a-pure-css-solution-for-multiline-text-truncation/
  //     - https://medium.com/mofed/css-line-clamp-the-good-the-bad-and-the-straight-up-broken-865413f16e5
}

.module-quote__primary__type-label {
  font-style: italic;
  color: $color-gray-90;
  font-size: 13px;
  line-height: 18px;
}

.module-quote__primary__filename-label {
  font-size: 12px;
}

.module-quote__close-container {
  position: absolute;
  top: 4px;
  right: 4px;
  height: 16px;
  width: 16px;

  background-color: rgba(255, 255, 255, 0.75);
  border-radius: 50%;
}

.module-quote__close-button {
  width: 100%;
  height: 100%;
  cursor: pointer;
  @include color-svg('../images/x.svg', $grey);
}

.module-quote__icon-container {
  flex: initial;
  min-width: 54px;
  width: 54px;
  position: relative;

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.module-quote__icon-container__inner {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;

  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.module-quote__icon-container__circle-background {
  display: flex;
  align-items: center;
  justify-content: center;

  height: 32px;
  width: 32px;
  border-radius: 50%;
  background-color: $color-white;
}

.module-quote__icon-container__icon {
  width: 24px;
  height: 24px;
}

.module-quote__icon-container__icon--file {
  @include color-svg('../images/file.svg', $color-signal-blue);
}
.module-quote__icon-container__icon--image {
  @include color-svg('../images/image.svg', $color-signal-blue);
}
.module-quote__icon-container__icon--microphone {
  @include color-svg('../images/microphone.svg', $color-signal-blue);
}
.module-quote__icon-container__icon--play {
  @include color-svg('../images/play.svg', $color-signal-blue);
}
.module-quote__icon-container__icon--movie {
  @include color-svg('../images/movie.svg', $color-signal-blue);
}

.module-quote__generic-file {
  display: flex;
  flex-direction: row;
  align-items: center;
}
.module-quote__generic-file__icon {
  background: url('../images/file-gradient.svg');
  background-size: 75%;
  background-repeat: no-repeat;
  height: 28px;
  width: 36px;
  margin-left: -4px;
  margin-right: -6px;
  margin-bottom: 5px;
}
.module-quote__generic-file__text {
  font-size: 14px;
  line-height: 18px;
  color: $color-gray-90;

  max-width: calc(100% - 26px);
  overflow-x: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.module-quote__reference-warning {
  height: 26px;
  display: flex;
  flex-direction: row;
  align-items: center;

  background-color: $color-white-085;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  padding-left: 8px;
  padding-right: 8px;
}

.module-quote__reference-warning__icon {
  height: 16px;
  width: 16px;
  @include color-svg('../images/broken-link.svg', $color-gray-60);
}

.module-quote__reference-warning__text {
  margin-left: 6px;
  color: $color-gray-90;
  font-size: 13px;
  line-height: 18px;
}

// Module: Embedded Contact

.module-embedded-contact {
  // Cursor is always a pointer because this component is always wired up to the contact detail screen
  cursor: pointer;
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.module-embedded-contact--with-content-above {
  padding-top: 4px;
}

.module-embedded-contact--with-content-below {
  padding-bottom: 4px;
}

.module-embedded-contact__text-container {
  flex-grow: 1;
  margin-left: 8px;

  max-width: calc(100% - 58px);
}

.module-embedded-contact__contact-name {
  font-size: 14px;
  line-height: 18px;
  font-weight: 300;
  margin-top: 6px;
  color: $color-gray-90;

  max-width: 100%;
  white-space: nowrap;
  overflow-x: hidden;
  text-overflow: ellipsis;
}

.module-embedded-contact__contact-name--incoming {
  color: $color-white;
}

.module-embedded-contact__contact-method {
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.3px;
  margin-top: 3px;
  color: $color-gray-60;

  max-width: 100%;
  white-space: nowrap;
  overflow-x: hidden;
  text-overflow: ellipsis;
}

.module-embedded-contact__contact-method--incoming {
  color: $color-white-07;
}

// Module: Friend Request
.module-message-friend-request {
  width: 100%;
}

.module-message-friend-request__container {
  flex: 1;
}

.module-friend-request__buttonContainer {
  margin-top: 8px;
  justify-content: space-around;
  border-top: 1px solid $color-gray-90;
  padding-top: 4px;
}

.module-friend-request__buttonContainer--incoming {
  border-top: 1px solid $color-white-07;
}

.module-friend-request__buttonContainer button {
  flex: 0.5;
  padding: 8px;
  background-color: transparent;
  border: 0;
  overflow: hidden;
  outline: none;
  color: $color-gray-90;
}

.module-friend-request__buttonContainer--incoming button {
  color: $color-white;
}

.module-friend-request__buttonContainer button:first-of-type {
  border-right: 1px solid $color-gray-90;
}

.module-friend-request__buttonContainer--incoming button:first-of-type {
  border-right: 1px solid $color-white-07;
}

.module-friend-request__buttonContainer button:last-of-type {
  border-right: 0;
}

.module-friend-request__buttonContainer--incoming button:last-of-type {
  border-right: 0;
}

.module-friend-request__title {
  padding-bottom: 4px;
  color: $color-gray-60;
  text-align: center;
}

.module-friend-request__title--incoming {
  color: $color-white-08;
}

// Module: Contact Detail

.module-contact-detail {
  text-align: center;
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.module-contact-detail__avatar {
  margin-bottom: 4px;
}

.module-contact-detail__contact-name {
  font-size: 20px;
  font-weight: bold;
}

.module-contact-detail__contact-method {
  font-size: 14px;
  margin-top: 10px;
}

.module-contact-detail__send-message {
  cursor: pointer;

  border-radius: 4px;
  background-color: $blue;
  display: inline-block;
  padding: 6px;
  margin-top: 20px;

  color: $color-white;

  flex-direction: column;
  align-items: center;

  button {
    @include button-reset;
  }
}

.module-contact-detail__send-message__inner {
  display: flex;
  align-items: center;
}

.module-contact-detail__send-message__bubble-icon {
  height: 17px;
  width: 18px;
  display: inline-block;
  margin-right: 5px;
  @include color-svg('../images/chat-bubble.svg', white);
}

.module-contact-detail__additional-contact {
  text-align: left;
  border-top: 1px solid $color-light-10;
  margin-top: 15px;
  padding-top: 8px;
}

.module-contact-detail__additional-contact__type {
  color: $color-light-45;
  font-size: 12px;
  margin-bottom: 3px;
}

// Module: Group Notification

.module-group-notification {
  margin-top: 14px;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.3px;
  color: $color-gray-60;
  text-align: center;
}

.module-group-notification__change {
  margin-top: 10px;
}

.module-group-notification__contact {
  font-weight: 300;
}

// Module: Reset Session Notification

.module-reset-session-notification {
  margin-top: 14px;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.3px;
  color: $color-gray-60;
  text-align: center;
}

// Module: Safety Number Notification

.module-safety-number-notification {
  margin-top: 14px;
  text-align: center;
}

.module-safety-number-notification__icon {
  height: 24px;
  width: 24px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 7px;
  @include color-svg('../images/shield.svg', $color-gray-60);
}

.module-safety-number-notification__text {
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.3px;
  color: $color-gray-60;
}

.module-safety-number-notification__contact {
  font-weight: 300;
}

.module-verification-notification__button {
  margin-top: 5px;
  display: inline-block;
  cursor: pointer;
  font-size: 13px;
  font-weight: 300;
  line-height: 18px;
  padding: 12px;
  color: $color-signal-blue;
  background-color: $color-light-02;
  border-radius: 4px;
}

// Module: Verification Notification

.module-verification-notification {
  margin-top: 14px;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.3px;
  color: $color-gray-60;
  text-align: center;
}

.module-verification-notification__contact {
  font-weight: 300;
}

.module-verification-notification__icon--mark-verified {
  height: 24px;
  width: 24px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 4px;
  @include color-svg('../images/verified-check.svg', $color-gray-60);
}

.module-verification-notification__icon--mark-not-verified {
  height: 24px;
  width: 24px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 7px;
  @include color-svg('../images/shield.svg', $color-gray-60);
}

// Module: Timer Notification

.module-timer-notification {
  margin-top: 14px;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.3px;
  color: $color-gray-60;
  text-align: center;
}

.module-timer-notification__icon-container {
  margin-left: auto;
  margin-right: auto;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 4px;
}

.module-timer-notification__icon {
  height: 20px;
  width: 20px;
  display: inline-block;
  @include color-svg('../images/timer.svg', $color-gray-60);
}

.module-timer-notification__icon--disabled {
  @include color-svg('../images/timer-disabled.svg', $color-gray-60);
}

.module-timer-notification__icon-label {
  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.3px;
  margin-left: 6px;
  text-transform: uppercase;

  // Didn't seem centered otherwise
  margin-top: 1px;
}

.module-timer-notification__message {
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0.3px;
}

.module-notification--with-click-handler {
  cursor: pointer;
}

.module-notification__icon {
  height: 24px;
  width: 24px;
  margin-left: auto;
  margin-right: auto;
}

// Module: Contact List Item

.module-contact-list-item {
  padding-top: 5px;
  padding-bottom: 5px;
  display: flex;
  flex-direction: row;
  align-items: center;

  color: $color-gray-60;
}

.module-contact-list-item--with-click-handler {
  cursor: pointer;
}

.module-contact-list-item__text {
  margin-left: 8px;
}

.module-contact-list-item__text__name {
  font-weight: 300;
  font-size: 14px;
}

.module-contact-list-item__text__profile-name {
  font-style: italic;
}

.module-contact-list-item__text__additional-data {
  margin-top: 3px;
  font-size: 14px;
}

.module-contact-list-item__text__verified-icon {
  @include color-svg('../images/verified-check.svg', $color-gray-60);
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: text-bottom;

  // Trying to account for the whitespace around the check mark
  margin-bottom: -1px;
}

// Module: Conversation Header

.module-conversation-header {
  padding-left: 16px;
  padding-right: 16px;
  display: flex;
  flex-direction: row;
  align-items: center;

  height: $header-height;
  color: $color-gray-90;

  background-color: $color-white;
  border-bottom: 1px solid $color-black-02;
}

.module-conversation-header__back-icon {
  @include color-svg('../images/back.svg', $color-gray-90);
  display: inline-block;
  margin-left: -10px;
  margin-right: -2px;
  width: 35px;
  height: 35px;
  min-width: 35px;
  vertical-align: text-bottom;
  cursor: pointer;
}

.module-conversation-header__title-container {
  flex-grow: 1;
  flex-shrink: 1;
  min-width: 0;
  display: block;

  text-align: center;
  height: 48px;
}

.module-conversation-header__title-flex {
  margin-left: auto;
  margin-right: auto;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  height: 48px;
  max-width: 100%;
}

.module-conversation-header__avatar {
  min-width: 28px;
}

.module-conversation-header__title {
  margin-left: 8px;

  min-width: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 300;
  color: $color-gray-90;

  // width of avatar (28px) and our 8px left margin
  max-width: calc(100% - 36px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  display: flex;
  align-items: center;

  -webkit-user-select: text;
}

.module-conversation-header__title__profile-name {
  font-style: italic;
}

.module-conversation-header__title__verified-icon {
  @include color-svg('../images/verified-check.svg', $color-gray-90);
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  vertical-align: text-bottom;
}

.module-conversation-header__expiration {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding-left: 8px;
  padding-right: 8px;
}

.module-conversation-header__expiration__clock-icon {
  @include color-svg('../images/timer.svg', $color-gray-60);
  height: 20px;
  width: 20px;
  display: inline-block;
}

.module-conversation-header__expiration__setting {
  margin-left: 5px;
  text-align: center;
}

.module-conversation-header__gear-icon {
  @include color-svg('../images/gear.svg', $color-gray-60);
  height: 20px;
  width: 20px;
  margin-left: 4px;
  cursor: pointer;
}

// Module: Message Detail

.module-message-detail {
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  padding: 20px;
}

.module-message-detail__message-container {
  padding-top: 20px;
  padding-bottom: 20px;

  &:after {
    content: '.';
    visibility: hidden;
    display: block;
    height: 0;
    clear: both;
  }
}

.module-message-detail__label {
  font-weight: 300;
  padding-right: 5px;
}

.module-message-detail__unix-timestamp {
  color: $color-light-10;
}

.module-message-detail__delete-button-container {
  text-align: center;
  margin-top: 10px;
}

.module-message-detail__delete-button {
  @include button-reset;

  background-color: $color-core-red;
  color: $color-white;
  box-shadow: 0 0 10px -3px rgba(97, 97, 97, 0.7);
  border-radius: 5px;
  border: solid 1px $color-light-35;
  cursor: pointer;
  margin: 1em auto;
  padding: 1em;
}

.module-message-detail__contact-container {
  margin: 20px;
}

.module-message-detail__contact {
  margin-bottom: 8px;
  display: flex;
  flex-direction: row;
  align-items: center;
}

.module-message-detail__contact__text {
  margin-left: 10px;
  flex-grow: 1;
}

.module-message-detail__contact__error {
  color: $color-core-red;
  font-weight: 300;
}

.module-message-detail__contact__status-icon {
  width: 12px;
  height: 12px;
  display: inline-block;
  margin-bottom: 2px;
}

.module-message-detail__contact__status-icon--sending {
  @include color-svg('../images/sending.svg', $color-gray-60);
  animation: module-message-detail__contact__status-icon--spinning 4s linear
    infinite;
}

@keyframes module-message-detail__contact__status-icon--spinning {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

.module-message-detail__contact__status-icon--sent {
  @include color-svg('../images/check-circle-outline.svg', $color-gray-60);
}
.module-message-detail__contact__status-icon--delivered {
  @include color-svg('../images/double-check.svg', $color-gray-60);
  width: 18px;
}
.module-message-detail__contact__status-icon--read {
  @include color-svg('../images/read.svg', $color-gray-60);
  width: 18px;
}
.module-message-detail__contact__status-icon--error {
  @include color-svg('../images/error.svg', $color-core-red);
}

.module-message-detail__contact__unidentified-delivery-icon {
  margin-left: 6px;
  margin-right: 10px;

  width: 20px;
  height: 20px;
  display: inline-block;
  @include color-svg('../images/unidentified-delivery.svg', $color-gray-60);
}

.module-message-detail__contact__error-buttons {
  text-align: right;
}

.module-message-detail__contact__show-safety-number {
  @include button-reset;
  padding: 4px;
  color: $color-white;
  background-color: $color-light-35;
  border-radius: 4px;
}
.module-message-detail__contact__send-anyway {
  @include button-reset;
  color: $color-white;
  background-color: $color-core-red;
  margin-left: 5px;
  margin-top: 5px;
  padding: 4px;
  border-radius: 4px;
}

// Module: Media Gallery

.module-media-gallery {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: 100%;
  height: 100%;
}

.module-media-gallery__tab-container {
  display: flex;
  flex-grow: 0;
  flex-shrink: 0;
  cursor: pointer;
  width: 100%;
}

.module-media-gallery__tab {
  width: 100%;
  background-color: $color-light-02;
  padding: 20px;
  text-align: center;
}

.module-media-gallery__tab--active {
  border-bottom: 2px solid $color-signal-blue;
}

.module-media-gallery__content {
  display: flex;
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
}

.module-media-gallery__sections {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
}

// Module: Attachment Section

.module-attachment-section {
  width: 100%;
}

.module-attachment-section__header {
  font-size: 14px;
  font-weight: normal;
  line-height: 28px;
}

.module-attachment-section__items {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
}

// Module: Document List Item

.module-document-list-item {
  width: 100%;
  height: 72px;
}

.module-document-list-item--with-separator {
  border-bottom: 1px solid $color-light-02;
}

.module-document-list-item__content {
  cursor: pointer;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  height: 100%;
}

.module-document-list-item__icon {
  flex-shrink: 0;

  width: 48px;
  height: 48px;
  @include color-svg('../images/file.svg', $color-light-35);
}

.module-document-list-item__metadata {
  display: inline-flex;
  flex-direction: column;
  flex-grow: 1;
  flex-shrink: 0;
  margin-left: 8px;
  margin-right: 8px;
}

.module-document-list-item__file-name {
  font-weight: bold;
}

.module-document-list-item__file-size {
  display: inline-block;
  margin-top: 8px;
  font-size: 80%;
}

.module-document-list-item__date {
  display: inline-block;
  flex-shrink: 0;
}

// Module: Media Grid Item

.module-media-grid-item {
  height: 94px;
  width: 94px;
  cursor: pointer;
  background-color: $color-light-10;
  margin-right: 4px;
  margin-bottom: 4px;
  position: relative;
}

.module-media-grid-item__image {
  height: 94px;
  width: 94px;
  object-fit: cover;
}

.module-media-grid-item__icon {
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 15px;
  right: 15px;
}

.module-media-grid-item__icon-image {
  @include color-svg('../images/image.svg', $color-light-35);
}

.module-media-grid-item__image-container {
  height: 94px;
  width: 94px;
  object-fit: cover;
  position: relative;
}

.module-media-grid-item__circle-overlay {
  position: absolute;
  left: 50%;
  top: 50%;

  transform: translate(-50%, -50%);

  width: 42px;
  height: 42px;
  background-color: $color-white;
  border-radius: 21px;
}

.module-media-grid-item__play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  height: 36px;
  width: 36px;
  @include color-svg('../images/play.svg', $color-signal-blue);
}

.module-media-grid-item__icon-video {
  @include color-svg('../images/movie.svg', $color-light-35);
}

.module-media-grid-item__icon-generic {
  @include color-svg('../images/file.svg', $color-light-35);
}

/* Module: Empty State*/

.module-empty-state {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
  font-size: 28px;
  color: $color-light-45;
}

// Module: Conversation List Item

.module-conversation-list-item {
  max-width: 300px;
  display: flex;
  flex-direction: row;
  padding-right: 16px;
  padding-left: 16px;
  align-items: center;

  cursor: pointer;

  &:hover {
    background-color: $color-dark-70;
  }

  .module-avatar {
    background-color: $color-dark-85;
  }
}

.module-conversation-list-item--has-unread {
  padding-left: 12px;
  border-left: 4px solid $color-signal-blue;
}

.module-conversation-list-item--has-friend-request {
  padding-left: 12px;
  border-left: 4px solid $color-conversation-indigo;
}

.module-conversation-list-item--is-blocked {
  padding-left: 12px;
  border-left: 4px solid $color-conversation-red;
}

.module-conversation-list-item--is-selected {
  background-color: $color-dark-70;
}

.module-conversation-list-item__avatar-container {
  position: relative;
  margin-top: 8px;
  margin-bottom: 8px;
}

.module-conversation-list-item__unread-count {
  color: $color-white;
  background-color: $color-signal-blue;
  text-align: center;

  padding-top: 1px;
  padding-left: 3px;
  padding-right: 3px;

  position: absolute;
  right: -6px;
  top: 6px;

  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.25px;

  height: 16px;
  min-width: 16px;
  line-height: 16px;
  border-radius: 8px;

  box-shadow: 0px 0px 0px 1px $color-dark-85;
}

.module-conversation-list-item__content {
  flex-grow: 1;
  margin-left: 12px;
  // parent - 48px (for avatar) - 16px (our right margin)
  max-width: calc(100% - 64px);

  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.module-conversation-list-item__header {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.module-conversation-list-item__header__name {
  flex-grow: 1;
  flex-shrink: 1;
  font-size: 14px;
  line-height: 18px;

  overflow-x: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;

  font-weight: 300;
  color: $color-gray-05;
}

.module-conversation-list-item__header__name--with-unread {
  font-weight: 300;
}

.module-conversation-list-item__header__timestamp {
  flex-shrink: 0;
  margin-left: 6px;

  font-size: 11px;
  line-height: 16px;
  letter-spacing: 0.3px;

  overflow-x: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;

  text-transform: uppercase;

  color: $color-gray-25;
}

.module-conversation-list-item__header__date--has-unread {
  font-weight: 300;
  color: $color-gray-05;
}

.module-conversation-list-item__message {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.module-conversation-list-item__message__text {
  flex-grow: 1;
  flex-shrink: 1;

  font-size: 13px;
  line-height: 18px;

  color: $color-gray-25;

  height: 1.3em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.module-conversation-list-item__message__text--has-unread {
  font-weight: 300;
  color: $color-gray-05;
}

.module-conversation-list-item__message__status-icon {
  flex-shrink: 0;

  margin-top: 1px;
  width: 12px;
  height: 13px;
  display: inline-block;
  margin-left: 6px;
}

.module-conversation-list-item__message__status-icon--sending {
  @include color-svg('../images/sending.svg', $color-light-35);
  animation: module-conversation-list-item__message__status-icon--spinning 4s
    linear infinite;
}

@keyframes module-conversation-list-item__message__status-icon--spinning {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

.module-conversation-list-item__message__status-icon--sent {
  @include color-svg('../images/check-circle-outline.svg', $color-light-35);
}
.module-conversation-list-item__message__status-icon--delivered {
  @include color-svg('../images/double-check.svg', $color-light-35);
  width: 18px;
}
.module-conversation-list-item__message__status-icon--read {
  @include color-svg('../images/read.svg', $color-light-35);
  width: 18px;
}
.module-conversation-list-item__message__status-icon--error {
  @include color-svg('../images/error.svg', $color-core-red);
}

// Module: Avatar

.module-avatar {
  position: relative;
  vertical-align: middle;
  display: inline-block;
  border-radius: 50%;

  img {
    object-fit: cover;
    border-radius: 50%;
  }
}

.module-avatar__label {
  width: 100%;
  text-align: center;
  font-weight: 300;
  text-transform: uppercase;
  color: $color-white;
}

.module-avatar__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.module-avatar__icon--group {
  @include color-svg('../images/profile-group.svg', $color-white);
}

.module-avatar__icon--direct {
  @include color-svg('../images/profile-individual.svg', $color-white);
}

.module-avatar--28 {
  height: 28px;
  width: 28px;

  img {
    height: 28px;
    width: 28px;
  }
}

.module-avatar__label--28 {
  font-size: 14px;
  line-height: 28px;
}

.module-avatar__icon--28 {
  height: 16px;
  width: 16px;
}

.module-avatar--36 {
  height: 36px;
  width: 36px;

  img {
    height: 36px;
    width: 36px;
  }
}

.module-avatar__label--36 {
  margin-top: 1px;
  width: 36px;
  font-size: 16px;
  letter-spacing: 0.19px;
  line-height: 36px;
}

.module-avatar__icon--36 {
  height: 20px;
  width: 20px;
}

.module-avatar--48 {
  height: 48px;
  width: 48px;

  img {
    height: 48px;
    width: 48px;
  }
}

.module-avatar__label--48 {
  width: 48px;
  font-size: 20px;
  letter-spacing: 0.19px;
  line-height: 48px;
}

.module-avatar__icon--48 {
  height: 26px;
  width: 26px;
}

.module-avatar--80 {
  height: 80px;
  width: 80px;

  img {
    height: 80px;
    width: 80px;
  }
}

.module-avatar__label--80 {
  width: 80px;
  font-size: 40px;
  line-height: 82px;
}

.module-avatar__icon--80 {
  height: 42px;
  width: 42px;
}

.module-avatar--no-image {
  background-color: $color-conversation-grey;
}

.module-avatar--signal-blue {
  background-color: $color-signal-blue;
}
.module-avatar--red {
  background-color: $color-conversation-red;
}
.module-avatar--deep_orange {
  background-color: $color-conversation-deep_orange;
}
.module-avatar--brown {
  background-color: $color-conversation-brown;
}
.module-avatar--pink {
  background-color: $color-conversation-pink;
}
.module-avatar--purple {
  background-color: $color-conversation-purple;
}
.module-avatar--indigo {
  background-color: $color-conversation-indigo;
}
.module-avatar--blue {
  background-color: $color-conversation-blue;
}
.module-avatar--teal {
  background-color: $color-conversation-teal;
}
.module-avatar--green {
  background-color: $color-conversation-green;
}
.module-avatar--light_green {
  background-color: $color-conversation-light_green;
}
.module-avatar--blue_grey {
  background-color: $color-conversation-blue_grey;
}

// Module: Main Header

.main-header-title-wrapper {
  flex: 1;
  flex-direction: row;
  display: flex;
  align-items: center;
  cursor: pointer;

  &:hover {
    background-color: $color-dark-75;
  }
}

.main-header-content-wrapper {
  color: $color-dark-05;

  div {
    padding: 12px;
    background-color: $color-dark-90;
    user-select: none;
    cursor: pointer;

    &:hover {
      background-color: $color-dark-75;
    }
  }
}

.main-header-wrapper {
  overflow-x: hidden;
  flex: 1;
}

.module-main-header {
  height: $header-height;
  padding-left: 16px;

  display: flex;
  flex-direction: row;
  align-items: center;
}

.main-header-content-toggle {
  width: 3em;
  line-height: 3em;
  font-weight: bold;
  overflow: hidden;
  user-select: none;
  color: white;
  text-align: center;

  &:after {
    -webkit-transition: all 0.35s;
    -o-transition: all 0.35s;
    transition: all 0.35s;
    width: 3em;
    line-height: 3em;
    height: 3em;
    content: '\25BE';
    display: inline-block;
  }
}

.main-header-content-toggle-visible::after {
  transform: rotate(180deg);
}

.module-main-header__app-name {
  font-size: 16px;
  line-height: 24px;
  font-weight: 300;
  margin-left: 32px;
  color: $color-dark-05;
}

.module-main-header__contact-name {
  font-weight: 300;
  margin-left: 12px;
  color: $color-dark-05;
  overflow-x: auto;
  flex: 1;
}

// Module: Image

.module-image {
  overflow: hidden;
  background-color: $color-white;
  position: relative;
  display: inline-block;
  margin: 1px;
}

.module-image__caption-icon {
  position: absolute;
  top: 6px;
  left: 6px;
}

.module-image--curved-top-left {
  border-top-left-radius: 16px;
}
.module-image--curved-top-right {
  border-top-right-radius: 16px;
}
.module-image--curved-bottom-left {
  border-bottom-left-radius: 16px;
}
.module-image--curved-bottom-right {
  border-bottom-right-radius: 16px;
}

.module-image__border-overlay {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  left: 0;
  right: 0;
  box-shadow: inset 0px 0px 0px 1px $color-black-015;
}

.module-image__border-overlay--dark {
  background-color: $color-black-02;
}

.module-image__image {
  object-fit: cover;
  // redundant with attachment-container, but we get cursor flashing on move otherwise
  cursor: pointer;

  margin-bottom: -3px;
}

.module-image__bottom-overlay {
  height: 48px;
  background-image: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 0) 9%,
    rgba(0, 0, 0, 0.02) 17%,
    rgba(0, 0, 0, 0.05) 24%,
    rgba(0, 0, 0, 0.08) 31%,
    rgba(0, 0, 0, 0.12) 37%,
    rgba(0, 0, 0, 0.16) 44%,
    rgba(0, 0, 0, 0.2) 50%,
    rgba(0, 0, 0, 0.24) 56%,
    rgba(0, 0, 0, 0.28) 63%,
    rgba(0, 0, 0, 0.32) 69%,
    rgba(0, 0, 0, 0.35) 76%,
    rgba(0, 0, 0, 0.38) 83%,
    rgba(0, 0, 0, 0.4) 91%,
    rgba(0, 0, 0, 0.4)
  );
  position: absolute;
  bottom: 0;
  z-index: 2;
  left: 0;
  right: 0;
}

.module-image__play-overlay__circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  width: 48px;
  height: 48px;
  background-color: $color-white;
  border-radius: 24px;
}

.module-image__play-overlay__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  height: 36px;
  width: 36px;
  @include color-svg('../images/play.svg', $color-signal-blue);
}

.module-image__text-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;

  color: $color-white;

  font-size: 20px;
  font-weight: normal;
  letter-spacing: 0;

  text-align: center;
}

// Module: Image Grid

.module-image-grid {
  display: inline-flex;
  flex-direction: row;
  align-items: center;

  margin: -1px;
}

.module-image-grid--one-image {
  margin-bottom: -5px;
}

.module-image-grid__column {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.module-image-grid__row {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  flex-grow: 1;
}

// Module: Typing Animation

.module-typing-animation {
  display: inline-flex;
  flex-directin: row;
  align-items: center;

  height: 8px;
  width: 38px;
  padding-left: 1px;
  padding-right: 1px;
}

.module-typing-animation__dot {
  border-radius: 50%;
  background-color: $color-gray-60;

  height: 6px;
  width: 6px;
  opacity: 0.4;
}

.module-typing-animation__dot--light {
  border-radius: 50%;
  background-color: $color-white;

  height: 6px;
  width: 6px;
  opacity: 0.4;
}

@keyframes typing-animation-first {
  0% {
    opacity: 0.4;
  }
  20% {
    transform: scale(1.3);
    opacity: 1;
  }
  40% {
    opacity: 0.4;
  }
}

@keyframes typing-animation-second {
  10% {
    opacity: 0.4;
  }
  30% {
    transform: scale(1.3);
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

@keyframes typing-animation-third {
  20% {
    opacity: 0.4;
  }
  40% {
    transform: scale(1.3);
    opacity: 1;
  }
  60% {
    opacity: 0.4;
  }
}

.module-typing-animation__dot--first {
  animation: typing-animation-first 1600ms ease infinite;
}

.module-typing-animation__dot--second {
  animation: typing-animation-second 1600ms ease infinite;
}

.module-typing-animation__dot--third {
  animation: typing-animation-third 1600ms ease infinite;
}

.module-typing-animation__spacer {
  flex-grow: 1;
}

// Third-party module: react-contextmenu

.react-contextmenu {
  background-color: $color-light-02;
  border-radius: 4px;
  min-width: 160px;
  padding: 0px;
  padding-top: 8px;
  padding-bottom: 8px;
  border: 1px solid $color-dark-05;
  opacity: 0;
}

.react-contextmenu--visible {
  z-index: 1000;
  opacity: 1;
}

.react-contextmenu-item {
  color: $color-gray-90;

  cursor: pointer;
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;

  padding-left: 16px;
  padding-top: 3px;
  padding-bottom: 2px;
  padding-right: 16px;
}

.react-contextmenu-item--checked:before {
  content: '✓';
  display: inline-block;
  position: absolute;
  right: 7px;
  color: $color-gray-90;
}

.react-contextmenu-item.react-contextmenu-submenu {
  padding: 0;
}

.react-contextmenu-item.react-contextmenu-submenu > .react-contextmenu-item {
  padding-right: 36px;
}

.react-contextmenu-item.react-contextmenu-submenu
  > .react-contextmenu-item:after {
  content: '\25B6';
  display: inline-block;
  position: absolute;
  right: 7px;
  color: $color-gray-90;
}

.react-contextmenu-item.react-contextmenu-item--active,
.react-contextmenu-item.react-contextmenu-item--selected {
  color: $color-white;
  background-color: $color-light-35;
}

.react-contextmenu-item.react-contextmenu-item--active.react-contextmenu-item--checked:before,
.react-contextmenu-item.react-contextmenu-item--selected.react-contextmenu-item--checked:before {
  color: $color-white;
}

.react-contextmenu-item.react-contextmenu-submenu
  > .react-contextmenu-item.react-contextmenu-item--active:after,
.react-contextmenu-item.react-contextmenu-submenu
  > .react-contextmenu-item.react-contextmenu-item--selected:after {
  color: $color-white;
}

// All media query widths have 300px added to account for the left pane
// And have been tweaked for smoother transitions

// To hide in small breakpoints
.module-message__buttons__download {
  display: none;
}
.module-message__buttons__reply {
  display: none;
}

/* Spec: container > 438px and container < 593px*/
@media (min-width: 800px) and (max-width: 925px) {
  .module-message {
    max-width: 374px;
  }

  .module-message-friend-request {
    width: 374px;
  }

  // Spec: container < 438px
  .module-message--incoming {
    margin-left: 0;
    margin-right: auto;
  }
  .module-message--outgoing {
    margin-right: 0;
    margin-left: auto;
  }

  // To hide in small breakpoints
  .module-message__buttons__download {
    display: inline-block;
  }
  .module-message__buttons__reply {
    display: inline-block;
  }

  // To hide in larger breakpoints
  .module-message__context__download {
    display: none;
  }
  .module-message__context__reply {
    display: none;
  }
}

// Spec: container > 593px
@media (min-width: 926px) {
  .module-message {
    max-width: 66%;
  }

  .module-message-friend-request {
    width: 66%;
  }

  .module-message--incoming {
    margin-left: 0;
    margin-right: auto;
  }
  .module-message--outgoing {
    margin-right: 0;
    margin-left: auto;
  }

  // To hide in small breakpoints
  .module-message__buttons__download {
    display: inline-block;
  }
  .module-message__buttons__reply {
    display: inline-block;
  }

  // To hide in larger breakpoints
  .module-message__context__download {
    display: none;
  }
  .module-message__context__reply {
    display: none;
  }
}
