chat {
  display: flex;
  flex: 1;
  flex-direction: column;
  overflow: auto;
}

.chat-directive {
  background-color: #E1D8CF;
  background-image: url('chat_background_2.png');
  background-size: cover;
  display: flex;
  flex: 1;
  flex-direction: column;
  height: 100%;
  align-items: center;
  overflow: auto;
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  box-sizing: border-box;
}

.chat-directive .chat-directive-chat-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  max-width: var(--max-content-width);
  width: 100%;
}

.chat-directive .chat-directive-chat-wrapper {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0 8px;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  overscroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
  overflow-anchor: none;
}

.chat-directive .chat-directive-chat-wrapper .chat-directive-chat-inner, .chat-directive .chat-directive-input-wrapper {
  width: 100%;
  max-width: var(--max-content-width);
  flex: 0;
  overflow-anchor: none;
}

.chat-directive .chat-directive-chat-wrapper .chat-directive-chat-inner {
  box-sizing: border-box;
}

.chat-directive .chat-directive-chat-wrapper .chat-directive-chat-inner.is-loading {
  opacity: 0;
}

.chat-directive .chat-directive-chat-wrapper.dropzone-visible {
  display: none !important;
}

.chat-directive .chat-directive-unread-messages-banner {
  display: flex;
  flex: 1;
  background: rgba(var(--color-info));
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  cursor: pointer;
  outline: none;
  justify-content: center;
  align-items: center;
  font-size: 9pt;
  position: absolute;
  z-index: 2;
  margin: 4px;
  padding: 8px;
  border-radius: 12px;
}

.chat-directive .chat-directive-input-wrapper {
  display: flex;
  align-items: flex-end;
  margin: 16px;
  width: calc(100% - 32px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
  border-radius: 12px;
  background: rgba(var(--background-content));
  flex-direction: column;
  box-sizing: border-box;
  flex-shrink: 0;
  position: relative;
}

.chat-directive .chat-directive-input-wrapper .chat-user-is-typing {
  position: absolute;
  bottom: 100%;
  padding: 4px;
  font-size: 8pt;
  left: 0;
  z-index: 2;
}

.chat-directive .chat-directive-input-wrapper .chat-partner-unavailable {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  display: flex;
  background-color: rgba(var(--background-content-accent));
  color: rgba(var(--font-color));
  justify-content: center;
  align-items: center;
  flex: 1;
  width: 100%;
  padding: 6px;
  box-sizing: border-box;
  font-size: 10pt;
  outline: none;
  cursor: pointer;
}

.chat-directive .chat-directive-input-wrapper .chat-partner-unavailable.chat-partner-deleted {
  border-radius: 12px;
  cursor: auto;
}

.chat-directive .chat-directive-input-wrapper.dropzone-visible {
  flex: 1 !important;
  overflow: hidden;
}

.chat-directive .chat-directive-input-wrapper.dropzone-visible .chat-bottom-wrapper {
  flex-grow: 0 !important;
  min-height: 40px;
}

.chat-directive .chat-directive-input-wrapper .chat-dropzone-wrapper {
  overflow: hidden;
}

.chat-directive .chat-directive-input-wrapper .chat-dropzone-wrapper, .chat-directive .chat-directive-input-wrapper .chat-bottom-wrapper {
  display: flex;
  flex: 1;
  flex-direction: row;
  width: 100%;
}

.chat-directive .chat-directive-input-wrapper .chat-bottom-wrapper {
  align-items: flex-end;
  position: relative;
}

.chat-directive .chat-directive-input-wrapper .chat-bottom-wrapper .scroll-to-latest-button {
  position: absolute;
  top: calc(-100% - 8px);
  right: 0;
  z-index: 2;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

.chat-directive .chat-directive-input-wrapper .chat-bottom-wrapper .chat-bottom-wrapper-content {
  display: flex;
  flex-direction: row;
  flex: 1;
}

.chat-directive .chat-directive-input-wrapper textarea {
  flex: 1;
  flex-direction: column;
  margin: 8px 16px;
  padding: 0;
  background: none;
  border: none;
  outline: none;
  box-sizing: border-box;
  font-size: 11pt;
  resize: none;
  -webkit-transition: height 420ms ease;
  -moz-transition: height 420ms ease;
  -ms-transition: height 420ms ease;
  -o-transition: height 420ms ease;
  transition: height 420ms ease;
  max-height: 120px;
  height: auto;
  min-height: 24px;
  line-height: 24px;
  color: rgba(var(--font-color));
}

.chat-directive .chat-directive-input-wrapper .md-icon-button {
  margin: 0;
}

.chat-directive .chat-directive-filtering-progress {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.chat-directive .chat-directive-filtering-progress.fade {
  transition: all linear 210ms;
  opacity: 1;
}

.chat-directive .chat-directive-filtering-progress.fade.ng-hide {
  opacity: 0;
}

.chat-directive .chat-directive-filtering-progress.ng-hide {
  opacity: 0;
  transition: none 0;
}

.chat-directive .chat-voice-recording-wrapper {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
}

.chat-directive .chat-voice-recording-wrapper .chat-voice-progress-wrapper {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
}

.chat-directive .chat-voice-recording-wrapper .chat-voice-progress-wrapper .chat-voice-indicator {
  animation: blink 1s linear infinite;
  -webkit-animation: blink 1s linear infinite;
  -o-animation: blink 1s linear infinite;
  -moz-animation: blink 1s linear infinite;
  background-color: rgba(var(--color-error));
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 4px;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@-webkit-keyframes blink {
  50% {
    opacity: 0;
  }
}

@-o-keyframes blink {
  50% {
    opacity: 0;
  }
}

@-moz-keyframes blink {
  50% {
    opacity: 0;
  }
}