@charset "utf-8";

/* CSS Document */
.flexbox {
  display: block;
  justify-content: center;
  align-items: center;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 999;
}

.chat-box {
  background-color: #fff;
  margin: 5px 0 0;
  height: 100%;
  max-height: calc(100% - 40px);
  display: flex;
  flex-direction: column;
  border-radius: 0 25px 0 0;
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.3);
}

.chat-box>.chat-box-header {
  width: 100%;
  padding: 20px 15px;
  border-bottom: solid 1px #cfcfcf;
  box-sizing: border-box;
  background-image: url(../img/chatbox-bg.png);
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #f3f3f3;
  border-radius: 0 25px 0 0;
}

.chat-box>.chat-box-body {
  height: 100%;
  display: flex;
  overflow: auto;
  display: flex;
  flex-direction: column;
}

.chat-box>.chat-box-body #chat_messages {
  width: 100%;
  padding: 20px 15px;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  height: 300px;
  overflow-y: scroll;
}

.chat-box h3 {
  color: #2d2d2d;
  font-weight: 700;
  font-size: 1.2em;
  text-align: center;
  position: relative;
}

.chat-box h3 i {
  position: absolute;
  right: 5px;
  top: -5px;
  font-size: 1.5em;
  color: #ff8686;
  cursor: pointer;
}

.chat-box>.chat-box-body #chat_messages .message {
  padding: 10px;
  margin: 2px 0;
  overflow: hidden;
  transition: height 0.3s ease-in-out;
  width: fit-content;
  line-height: 20px;
  font-size: 0.82em;
}

.chat-box>.chat-box-body #chat_messages .message.hide {
  height: 0;
}

.chat-box>.chat-box-body #chat_messages .my-message {
  color: #fff;
  background-color: #ff8686;
  align-self: flex-end;
  border-radius: 25px 0 25px 25px;
  margin: 2px 0 2px auto;
}

.chat-box>.chat-box-body #chat_messages .other-message {
  background-color: #707070;
  color: #fff;
  border-radius: 0 25px 25px;
}

.chat-box>.chat-box-body #chat_messages .profile {
  margin: 2px 0;
  overflow: hidden;
  transition: height 0.3s ease-in-out;
}

.chat-box>.chat-box-body #chat_messages .profile.hide {
  height: 0;
}

.chat-box>.chat-box-body #chat_messages .profile img {
  display: inline-block;
  margin: 0;
  padding: 0;
  vertical-align: middle;
  border-radius: 50%;
}

.chat-box>.chat-box-body #chat_messages .my-profile {
  color: #afafaf;
  align-self: flex-end;
}

.chat-box>.chat-box-body #chat_messages .other-profile {
  color: #afafaf;
}

.chat-box #typing {
  color: #afafaf;
  width: 100%;
  height: 0;
  padding: 0 15px;
  overflow: hidden;
  box-sizing: border-box;
  opacity: 0;
  transition: 0.3s height ease-in-out, 0.3s opacity ease-in-out;
}

.chat-box #typing.active {
  height: 80px;
  opacity: 1;
}

.chat-box #typing span:not(.n) {
  background-color: #afafaf;
  width: 10px;
  height: 10px;
  margin-top: 20px;
  display: inline-block;
  border-radius: 50%;
}

.chat-box #typing span:not(.n):nth-child(1) {
  animation: typing 1.2s infinite;
}

.chat-box #typing span:not(.n):nth-child(2) {
  animation: typing 1.2s infinite 0.1s;
}

.chat-box #typing span:not(.n):nth-child(3) {
  animation: typing 1.2s infinite 0.2s;
}

.chat-box>.chat-box-footer {
  width: 100%;
  padding: 20px 15px;
  background-color: #f3f3f3;
  box-sizing: border-box;
  display: inline-block;
}

.chat-box>.chat-box-footer>.textarea>#chat_input {
  color: #2f2f2f;
  font-family: Raleway, sans-serif;
  font-size: 0.9em;
  background-color: #fff;
  border: dotted #ff8686 1px;
  width: calc(90% - 40px);
  height: 40px;
  max-height: 120px;
  padding: 10px 15px;
  resize: none;
  box-sizing: border-box;
  border-radius: 25px;
  transition: 0.3s background-color;
}

.chat-box>.chat-box-footer>.textarea>#chat_input:focus {
  background-color: #efefef;
}

.chat-box>.chat-box-footer>.textarea>#send {
  background: none;
  border: none;
  margin-left: 10px;
  cursor: pointer;
  border-radius: 50%;
  height: 40px;
  width: 40px;
  background-color: #ff8686;
  color: #fff;
}

.taian-client {
  text-align: right;
}

.offline-text {
  margin: 10px 0;
  padding-top: 10px;
  border-top: solid 1px #bababa;
}

.offline-text p {
  line-height: 25px;
}

.offline-text p i {
  color: #ff8686;
}

.offline-group {
  text-align: center;
  margin-top: 10px;
}

.offline-group button {
  border-radius: 25px;
  background-color: #fff;
  border: none;
  padding: 10px 0;
  font-size: 0.8em;
  width: 110px;
  cursor: pointer;
}

.offline-group .no-save {
  border: solid 1px #bababa;
}

.offline-group .yes-save {
  border: solid 1px #ff8686;
}

button:focus {
  outline: none;
}

.pre-off {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.other-profile img,
.profile img {
  width: 23px;
}

@media (min-width: 480px) {
  .chat-box {
    width: 340px;
  }
}

@keyframes typing {
  0% {
    transform: translateY(0px);
  }

  33.3333% {
    transform: translateY(-5px);
  }

  66.6667% {
    transform: translateY(5px);
  }

  100% {
    transform: translateY(0px);
  }
}

button::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

button {
  outline: none;
}

/*offline pop up*/
.offline-pop,
.email-pop {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  background-color: rgba(0, 0, 0, 0.5);
}
.log_tip_pop{
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  background-color: rgba(0, 0, 0, 0.5);
}

.offline-notice,.log_tip_notice {
  background-color: #fff;
  width: 600px;
  height: 250px;
  margin: 10% auto;
  text-align: center;
  border-radius: 20px;
  padding: 0 0 20px 0;
}
@media(max-width:768px) {
    .log_tip_notice {
        width: 90%;
        height: auto;
    }

    /* ISSUE: #TAIANOW-2325 調整線上客服錯誤訊息彈窗手機寬度。 */
    .offline-notice, .log_tip_notice {
        width: 90%;
        height: auto;
    }
}
.offline-header,.log_tip_header {
  width: 100%;
  padding: 20px 15px;
  background-image: url(../img/chatbox-bg.png);
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #f3f3f3;
  border-radius: 20px 20px 0 0;
  position: relative;
}

.offline-header span,.log_tip_header span {
  position: absolute;
  top: 6px;
  right: 15px;
  color: #ff8686;
}

.offline-header span i,.log_tip_header span i {
  font-size: 1.8em;
  cursor: pointer;
}

.offline-notice h5 {
  font-size: 1.1em;
  line-height: 35px;
  padding: 0 30px;
  margin: 15px 0;
}
.log_tip_text{
  font-size:18px;
  line-height:26px;
  text-align:left;
  padding:20px;
}
.off-way a {
  color: #fff;
  width: 150px;
  height: 40px;
  font-size: 0.9em;
  background-color: #707070;
  display: inline-block;
  line-height: 40px;
  border-radius: 10px;
  margin: 10px;
  cursor: pointer;
}

.off-way .pink-btn {
  background-color: #ff8686;
}

.pop_btn_container{width:100%;display:flex;justify-content: center;}
.pop_btn{
  width:calc(50% - 20px);
  height:50px;
  background-color: #ff8686;
  font-size:18px;
  color:#ffffff;
  border-radius: 10px;
  margin:20px 5px 0px 5px;
  cursor: pointer;
  display:flex;
  align-items: center;
  justify-content: center;
}
@media(max-width:768px) {
  .pop_btn_container{flex-wrap: wrap;}
  .pop_btn{
    width:calc(90% - 20px);
    margin:10px 5px 10px 5px;
  }
}
.reopen-btn {
  text-align: center;
}

.reopen-btn button {
  width: 40%;
  color: #2d2d2d;
  height: 40px;
  font-size: 0.9em;
  background-color: #fff;
  display: inline-block;
  line-height: 30px;
  border-radius: 10px;
  margin: 10px 5px;
  cursor: pointer;
  border: 1px solid #707070;
}

.reopen-btn .pink-btn {
  border-color: #ff8686;
}

.email-wrapper {
  margin: 20px auto;
}

.email-wrapper input {
  border-radius: 25px;
  width: 300px;
  height: 40px;
  border: 1px solid #707070;
}

.email-wrapper button {
  width: 150px;
  color: #fff;
  height: 40px;
  font-size: 0.9em;
  background-color: #ff8686;
  display: inline-block;
  line-height: 30px;
  border-radius: 10px;
  margin: 10px 5px;
  cursor: pointer;
  border: none;
}