* {
  box-sizing: border-box;
}

/* Links and formatted system phrases inside chat bubbles. */
#client #messageList .text a {
  color: #075fc7;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

#client #messageList .agentMsg .text a {
  color: #034a9c;
}

#client #messageList .text p {
  margin: 0 0 0.45em;
}

#client #messageList .text p:last-child {
  margin-bottom: 0;
}

html,
body {
  min-height: 100%;
}

body#client {
  margin: 0;
  overflow-x: hidden;
  color: rgba(0, 0, 0, .87);
  font-family: "Microsoft JhengHei", "Microsoft YaHei", sans-serif;
}

#client #headerimgin {
  width: 375px;
  height: 100px;
}

#client .sentencesBox .ui.comments .comment {
  width: 100%;
}

#client .sentencesBox .ui.comments.user .text {
  background-color: #54c0cc;
}

#client .sentencesBox .ui.comments.agent .text {
  white-space: pre-wrap;
}

#client .sentencesBox .ui.comments .image-bubble {
  padding: 5px;
}

#client .sentencesBox .ui.comments .image-bubble img {
  display: block;
  width: auto;
  max-width: min(260px, 70vw);
  height: auto;
  max-height: 260px;
  border-radius: 2px;
}

#client .floatFix {
  clear: both;
}

#client #divtalking textarea {
  resize: none;
  border-color: transparent;
  outline: 0;
  font-family: sans-serif;
}

#client #divoptions > .button,
#client #divoptions > .image-tool {
  height: 28.28125px;
  margin-top: 0;
  cursor: pointer;
}

#client #divoptions > button {
  border: 0;
}

#client .system-notice {
  margin: 14px auto;
  color: #b42318;
  font-size: 12px;
  text-align: center;
}

#client #messageList .typing-hint {
  display: flex;
  align-items: center;
  width: max-content;
  margin: 10px 0 10px 44px;
  padding: 8px 12px;
  border-radius: 3px;
  background: #54c0cc;
  color: #fff;
  font-size: 13px;
  line-height: 20px;
}

#client #messageList .typing-hint span {
  width: 5px;
  height: 5px;
  margin-right: 4px;
  border-radius: 50%;
  background: currentColor;
  animation: support-typing-pulse 1.2s infinite ease-in-out;
}

#client #messageList .typing-hint span:nth-child(2) {
  animation-delay: .15s;
}

#client #messageList .typing-hint span:nth-child(3) {
  margin-right: 8px;
  animation-delay: .3s;
}

@keyframes support-typing-pulse {
  0%, 60%, 100% { opacity: .35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

.mobile-rating-label {
  display: none;
}

@media (max-width: 767.98px) {
  #client #chatShell {
    max-width: none;
    position: relative;
    top: 7px;
  }

  #client .chat-content-row {
    position: relative;
  }

  #client .menu.chatRoom {
    margin-bottom: 5px;
  }

  #client #languageSys {
    position: absolute;
    top: 0;
    right: 15px;
    z-index: 999;
    width: 81.15625px;
    height: 30px;
    padding: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 400;
    line-height: 19.999px;
  }

  #client #divcontainer.paper {
    width: 100%;
    height: calc(100vh - 330px);
    margin: 0;
    padding: 10px 0 10px 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  #client #divcontainer > #messageList {
    width: 100%;
    height: 100%;
    margin-right: 5px;
    padding: 0;
  }

  #client .sentencesBox .ui.comments .sentence {
    width: calc(100% - 50px);
  }

  #client .sentencesBox .ui.comments.user .text {
    line-height: 28px;
    padding: 5px 8px;
  }

  #client .sentencesBox .ui.comments .timecode {
    margin-top: 5px;
  }

  #client .sentencesBox .ui.comments.agent .comment {
    width: auto;
  }

  #client .sentencesBox .ui.comments.agent .text {
    border: solid #eee;
    border-width: 0 0 2px;
    background-color: #b2b2b2;
    color: #333;
  }

  #client #divtalking {
    bottom: 30px;
    width: calc(100vw - 30px);
    height: 60px;
    padding: 5px;
    font-size: 1.15rem;
  }

  #client #divtalking textarea {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 2px;
    font-size: 16.1px;
    line-height: 1.15;
  }

  #client #divoptions {
    bottom: 0;
    width: calc(100vw - 30px);
    height: 40px;
  }

  #client #divoptions > .button,
  #client #divoptions > .image-tool {
    padding: 8.64286px 8.25px 8.64286px 24.2px !important;
  }

  #client #aUploadImg,
  #client #btnEndChat,
  #client #btnSendMsg {
    width: 54.4375px !important;
  }

  #client #btnChatService {
    width: 35.703125px !important;
  }

  #client #divoptions .desktop-rating-label {
    display: none;
  }

  #client #divoptions .mobile-rating-label {
    display: inline;
  }

  #client #contextmenu {
    display: none;
  }
}

@media (min-width: 768px) {
  #client #chatShell {
    margin-top: 0 !important;
  }

  #client #chatShell #headerimg {
    margin: 10px 0 20px;
  }

  #client .chat-content-row,
  #client .chat-column {
    margin-top: 0 !important;
  }

  #client #languageSys {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 999;
    width: 101.15625px;
    height: 31.84375px;
    margin-right: 3px;
    padding: 9.42857px 18px;
    border-radius: 4px;
    background: #e0e1e2;
    color: rgba(0, 0, 0, .6);
    font-size: 12px;
    font-weight: 700;
    line-height: 12px;
  }

  #client .menu.chatRoom {
    display: none;
  }

  #client .chat-tab {
    width: 100%;
  }

  #client #divcontainer.paper {
    width: 100%;
    height: calc(100vh - 350px);
    margin-bottom: 20px;
    padding: 10px 0 10px 10px;
  }

  #client #divcontainer > #messageList {
    height: calc(100% - 20px);
    margin-right: 5px;
    padding-right: 15px;
    padding-left: 15px;
  }

  #client .sentencesBox .ui.comments .sentence {
    width: calc(100% - 50px);
  }

  #client .sentencesBox .ui.comments .text {
    line-height: 1.3;
    padding: 10px;
  }

  #client .sentencesBox .ui.comments.user .text {
    max-width: 85%;
  }

  #client .sentencesBox .ui.comments.user .timecode {
    margin: 10px 0 0;
  }

  #client #divtalking {
    position: static;
    bottom: auto;
    width: 100%;
    height: 100px;
    padding: 20px;
    font-size: 14px;
  }

  #client #divtalking textarea {
    width: 100%;
    height: 100%;
    min-height: 60px;
    padding: 2px;
    font-size: 14px;
    line-height: 1.15;
  }

  #client #divoptions {
    position: static;
    bottom: auto;
    width: 100%;
    height: 40px;
  }

  #client #divoptions > .image-tool,
  #client #btnEndChat,
  #client #btnSendMsg {
    width: 71.5px;
  }

  #client #btnChatService {
    width: 85px;
  }

  #client #divoptions > .image-tool {
    float: left;
  }
}
