* {
  box-sizing: border-box;
  cursor: none !important;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #f6f7f2;
  color: #17211d;
  font-family: Arial, sans-serif;
  font-size: 14px;
  -moz-user-select: none;
  user-select: none;
}

#topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  padding: 3px 6px;
  background: #0b6b57;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#title {
  font-size: 15px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

#state {
  font-size: 11px;
  max-width: 86px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#app {
  position: absolute;
  top: 28px;
  bottom: 30px;
  left: 0;
  right: 0;
  overflow: hidden;
}

#softkeys {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  background: #ffffff;
  border-top: 1px solid #cbd2cc;
  color: #17211d;
  font-weight: 700;
  line-height: 30px;
}

#soft-left,
#soft-center,
#soft-right {
  width: 33.33%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#soft-center {
  text-align: center;
  text-transform: uppercase;
}

#soft-right {
  text-align: right;
}

.screen {
  height: 100%;
  overflow: hidden;
}

.list {
  height: 100%;
  overflow: hidden;
}

.row {
  position: relative;
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 6px 8px 6px 48px;
  margin: 0;
  border: 0;
  border-bottom: 1px solid #dce2dc;
  background: #ffffff;
  color: #17211d;
  font: inherit;
  text-align: left;
}

.row-body {
  display: block;
  width: 100%;
  min-width: 0;
}

.row .avatar-list {
  position: absolute;
  left: 8px;
  top: 7px;
}

.row[selected="true"] {
  background: #d8f2ea;
  outline: 2px solid #0b6b57;
  outline-offset: -2px;
}

.row:focus {
  background: #d8f2ea;
  outline: 2px solid #0b6b57;
  outline-offset: -2px;
}

.name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview {
  display: block;
  margin-top: 3px;
  color: #4e5c56;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: #cfe1d9;
  color: #0b6b57;
  text-align: center;
  vertical-align: middle;
}

.avatar-initial {
  display: block;
  width: 100%;
  height: 100%;
  font-size: 14px;
  font-weight: 700;
  line-height: 32px;
}

.avatar-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #cfe1d9;
}

.avatar-top {
  width: 22px;
  height: 22px;
  margin-right: 5px;
}

.avatar-top .avatar-initial {
  font-size: 11px;
  line-height: 22px;
}

.top-title {
  display: flex;
  align-items: center;
  min-width: 0;
}

.top-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty,
.error,
.loading {
  padding: 12px 10px;
  text-align: center;
  color: #4e5c56;
}

.error {
  color: #8f1f1f;
}

.setup {
  padding: 10px;
}

.label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 700;
}

input,
textarea {
  width: 100%;
  border: 1px solid #94a39c;
  border-radius: 2px;
  padding: 7px;
  background: #ffffff;
  color: #17211d;
  font-size: 14px;
}

textarea {
  height: 42px;
  resize: none;
  -moz-user-select: text;
  user-select: text;
}

.hint {
  margin-top: 8px;
  color: #4e5c56;
  font-size: 12px;
  line-height: 1.3;
}

.thread {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.messages {
  flex: 1;
  overflow: hidden;
  padding: 5px 5px 0;
}

.bubble {
  clear: both;
  max-width: 84%;
  margin: 3px 0;
  padding: 5px 7px;
  border-radius: 6px;
  line-height: 1.25;
  word-break: break-word;
}

.bubble.in {
  float: left;
  background: #ffffff;
  border: 1px solid #dce2dc;
}

.bubble.out {
  float: right;
  background: #d8f2ea;
  border: 1px solid #b8ded2;
}

.time {
  display: block;
  margin-top: 3px;
  color: #61716a;
  font-size: 10px;
  text-align: right;
}

.message-row[selected="true"],
.message-row:focus {
  outline: 2px solid #0b6b57;
  outline-offset: 1px;
}

.media-block {
  max-width: 100%;
}

.media-image {
  display: block;
  max-width: 100%;
  max-height: 140px;
  border-radius: 5px;
  object-fit: contain;
  background: #e4e9e5;
}

.media-caption {
  margin-top: 4px;
  font-size: 12px;
}

.media-audio-button {
  width: 150px;
  min-height: 34px;
  padding: 5px 7px;
  border: 0;
  border-radius: 16px;
  background: #ffffff;
  color: #17211d;
  display: flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  text-align: left;
}

.out .media-audio-button {
  background: #edf8f4;
}

.media-audio-button[playing="true"] {
  outline: 2px solid #0b6b57;
}

.media-audio-icon {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: #0b6b57;
  color: #ffffff;
  font-size: 11px;
  line-height: 24px;
  text-align: center;
}

.media-audio-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.photo-composer {
  align-items: center;
}

.photo-strip {
  flex: 1;
  min-width: 0;
  height: 44px;
  display: flex;
  gap: 5px;
  overflow: hidden;
}

.photo-thumb {
  position: relative;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #94a39c;
  border-radius: 3px;
  background: #ffffff;
  overflow: hidden;
}

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

.photo-thumb span {
  display: block;
  font-size: 10px;
  line-height: 42px;
  text-align: center;
}

.photo-remove {
  position: absolute;
  top: 0;
  right: 0;
  width: 15px;
  height: 15px;
  background: #8f1f1f;
  color: #ffffff;
  font-size: 11px;
  font-style: normal;
  line-height: 15px;
  text-align: center;
}

.photo-add-button {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 15px;
  background: #155f9f;
  color: #ffffff;
  font-size: 20px;
  line-height: 30px;
  padding: 0;
}

.image-viewer {
  height: 100%;
  padding: 4px;
  background: #050807;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.image-viewer img {
  max-width: 100%;
  max-height: calc(100% - 24px);
  object-fit: contain;
}

.image-caption {
  width: 100%;
  padding: 4px 2px 0;
  color: #ffffff;
  font-size: 12px;
  text-align: center;
}

.composer {
  min-height: 54px;
  padding: 5px;
  background: #eef2ee;
  border-top: 1px solid #cbd2cc;
  display: flex;
  gap: 5px;
  align-items: center;
}

.composer textarea {
  flex: 1;
  height: 44px;
}

.record-button {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 17px;
  background: #0b6b57;
  color: #ffffff;
  font-size: 18px;
  line-height: 34px;
  padding: 0;
  text-align: center;
}

.record-button.compact {
  flex-basis: 30px;
  width: 30px;
  height: 30px;
  border-radius: 15px;
  font-size: 15px;
  line-height: 30px;
}

.record-button.recording {
  background: #b3261e;
  animation: buttonPulse 1s infinite ease-in-out;
}

.record-button.ready {
  background: #155f9f;
}

.inline-wave {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 7px;
  border: 1px solid #cbd2cc;
  border-radius: 3px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.inline-wave span {
  display: block;
  flex: 0 0 4px;
  width: 4px;
  border-radius: 4px;
  background: #0b6b57;
  opacity: 0.7;
}

.inline-wave span:nth-child(1) {
  height: 14px;
}

.inline-wave span:nth-child(2) {
  height: 25px;
}

.inline-wave span:nth-child(3) {
  height: 34px;
}

.inline-wave span:nth-child(4) {
  height: 23px;
}

.inline-wave span:nth-child(5) {
  height: 16px;
}

.inline-wave em {
  flex: 0 0 auto;
  margin-left: 5px;
  color: #4e5c56;
  font-size: 11px;
  font-style: normal;
  line-height: 1;
}

.recording-composer.is-recording .inline-wave span {
  animation: pulse 0.9s infinite ease-in-out;
}

.recording-composer.is-recording .inline-wave span:nth-child(2) {
  animation-delay: 0.1s;
}

.recording-composer.is-recording .inline-wave span:nth-child(3) {
  animation-delay: 0.2s;
}

.recording-composer.is-recording .inline-wave span:nth-child(4) {
  animation-delay: 0.3s;
}

.recording-composer.is-recording .inline-wave span:nth-child(5) {
  animation-delay: 0.4s;
}

.recording-composer.is-ready .inline-wave span {
  background: #155f9f;
}

.toast {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 36px;
  padding: 7px;
  background: #17211d;
  color: #ffffff;
  text-align: center;
  font-size: 12px;
  z-index: 3;
}

.audio-screen {
  padding: 12px 10px;
  text-align: center;
}

.audio-status {
  margin: 8px 0 12px;
  font-size: 16px;
  font-weight: 700;
}

.audio-meter {
  height: 42px;
  margin: 8px 0 12px;
}

.audio-action {
  width: 100%;
  min-height: 38px;
  margin: 4px 0;
  border: 0;
  background: #0b6b57;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
}

.audio-action.send {
  background: #155f9f;
}

.audio-action.secondary {
  background: #5d6a64;
}

.audio-action:disabled {
  background: #a7b0aa;
  color: #eef2ee;
}

.audio-meter span {
  display: inline-block;
  width: 10px;
  margin: 0 3px;
  background: #0b6b57;
  animation: pulse 0.9s infinite ease-in-out;
}

.audio-meter span:nth-child(1) {
  height: 20px;
}

.audio-meter span:nth-child(2) {
  height: 34px;
  animation-delay: 0.15s;
}

.audio-meter span:nth-child(3) {
  height: 26px;
  animation-delay: 0.3s;
}

audio {
  width: 100%;
  margin: 8px 0;
}

.file-input {
  margin-top: 8px;
}

.inline-file {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.45;
    transform: scaleY(0.6);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

@keyframes buttonPulse {
  0%, 100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
}
