@font-face {
  font-family: myriadProBoldCond;
  src: url(/fonts/MYRIADPRO-BOLDCOND.woff);
}
@font-face {
  font-family: myriadProRegular;
  src: url(/fonts/MYRIADPRO-REGULAR.woff);
}

#chat{
  font-family: myriadProRegular;
  padding: 6px 0;
  border-radius: 30px;
  background: rgb(34,4,99);
  background: linear-gradient(356deg, rgba(34,4,99,1) 0%, rgba(126,3,213,1) 100%);
  color: #fff;
  border: 0;
  position: fixed;
  right: 10px;
  bottom: 20px;
  font-size: 22px;
  cursor: pointer;
  width: 300px;
}
#chat b{
  font-size: 19px;
  font-weight: bold;
}
.close_i {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 5px;
}
.close_i:before, .close_i:after {
  position: absolute;
  top: 3px;
  left: 10px;
  content: ' ';
  height: 15px;
  width: 2px;
  background-color: #fff;
}
.close_i:before {
  transform: rotate(45deg);
}
.close_i:after {
  transform: rotate(-45deg);
}
.close_chat{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5px 0;
}



.chatbox{
  width: 480px;
  max-width: 100%;
  height: 550px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 20px 150px #888888;
  position: fixed;
  bottom: 70px;
  right: 20px;
  afont-family: myriadProRegular;
  font-family:arial;
}
.chatbox .chat_head{
  height: 80px;
  position: relative;
  font-family: myriadProBoldCond;
}

.chatbox .chat_body{
  position: relative;
  width: 100%;
  height: 420px;
  overflow-y: auto;
  font-size: 14px;
}
.chatbox .chat_footer{
  height: 50px;
}
#chatForm{
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  border-top: 1px solid #eee;

}
#chatForm input{
  padding: 10px 50px 10px 10px;
  border: 0;
  width: 100%;
  height: 100%;

}
#chatForm input:focus,
#chatForm button:focus{
  outline: none;
}
#chatForm button{
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50px;
  height: 50px;
  border: 0;
  font-size: 18px;
  padding-right: 20px;
  cursor: pointer;
  background-color: #fff;
  background-image: url(send-icon.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px;
}

/* chating=== */
.messages_ {
  height: 100%;
  background: #F7F7F7;
  flex-shrink: 2;
  overflow-y: auto;
  box-shadow: inset 0 2rem 2rem -2rem rgba(0, 0, 0, 0.05), inset 0 -2rem 2rem -2rem rgba(0, 0, 0, 0.05);
}
.messages_{
  padding: 10px 20px;
}
.messages_ .message {
  position: relative;
  display: inline-block;
  width: 100%;
  padding: 10px 10px 10px 50px;
}
.messages_ .message .m_avatar{
  position: absolute;
  top: 10px;
  left: 0;
}
.messages_ .message .m_avatar img{
  width: 40px;
  margin-right: 10px;
}
.messages_ .message .m_message{
  padding: 10px;
  border-radius: 10px;
  position: relative;
  display: inline-block;
  width: -webkit-fit-content;
  width: -moz-fit-content;
  width: fit-content;
  max-width: 90%;
  background: white;
  word-wrap: break-word;
  font-size: 11pt;
  box-shadow: rgba(0, 0, 0, 0.08) 0px 0px 0px 1px, rgba(0, 0, 0, 0.06) 0px 2px 8px;
}
.messages_ .message.in .m_message{
  background-color: #f87c27;
  color: #fff;
  float: right;
}
.messages_ .message .m_message p{
  margin: 0;
}

.typing {
  align-items: center;
  display: flex;
  height: 17px;
}
.typing .dot {
  animation: mercuryTypingAnimation 1.8s infinite ease-in-out;
  background-color: rgb(34,4,99,.5);
  border-radius: 50%;
  height: 7px;
  margin-right: 4px;
  vertical-align: middle;
  width: 7px;
  display: inline-block;
}
.typing .dot:nth-child(1) {
  animation-delay: 200ms;
}
.typing .dot:nth-child(2) {
  animation-delay: 300ms;
}
.typing .dot:nth-child(3) {
  animation-delay: 400ms;
}
.typing .dot:last-child {
  margin-right: 0;
}

@keyframes mercuryTypingAnimation {
  0% {
    transform: translateY(0px);
    background-color:rgb(34,4,99,.2);
  }
  28% {
    transform: translateY(-7px);
    background-color:rgb(34,4,99,.5);
  }
  44% {
    transform: translateY(0px);
    background-color: rgb(34,4,99,.7);
  }
}

.start_{
  width: 100%;
  padding: 0 10px;
  text-align: center;
  display: none;
}
.start_ p{
  margin: 5px 0 15px 0px;
}
.btn_orange{
  display: block;
  padding: 10px;
  width: 100%;
  border-radius: 30px;
  background: #f87c27;
  color: #fff;
  font-weight: bold;
  margin-top: 20px;
  border: 0;
  cursor: pointer;
}

.chatbox.first_ .chat_head{
  height: 300px;
  background: none;
}
.chatbox.first_ .chat_body{
  height: 250px;
}
.chatbox.first_ .start_,
.chatbox.first_ .start_head{
  display: block !important;
}
.chatbox.first_ .end_head,
.chatbox.first_ .chat_footer,
.chatbox.first_ .messages_{
  display: none;
}

.start_head{
  position: relative;
  width: 100%;
  height: 100%;
  color: #fff;
  display: none;
}
.start_head::before{
  position: absolute;
  content: "";
  width: 100%;
  height: 300px;
  background-image: url(stockbot-image.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
}

h3
{
  font-size: 28px;
  margin-top: 16px;
  line-height:22px;
}

.chatbox.first_ .start_head h3{
  position: absolute;
  right: 40px;
  bottom: 80px;
}

.chatbox .end_head{
  display: flex;
  align-items: center;
  color: #fff;
  background: rgb(34,4,99);
  background: linear-gradient(356deg, rgba(34,4,99,1) 0%, rgba(126,3,213,1) 100%);
}
.chatbox .end_head img{
  width: 60px;
  margin-left: 20px;
  margin-right: 20px;
}
.chatbox .end_head h3 span{
  font-size: 22px;
}

.chatbox{
  transform-origin: right bottom;
  transition: width 200ms ease 0s, height 200ms ease 0s, max-height 200ms ease 0s, transform 300ms cubic-bezier(0, 1.2, 1, 1) 0s, opacity 83ms ease-out 0s;
  transform: scale(0);
  opacity: 0;
}
.chatbox.show{
  transform: scale(1);
  opacity: 1;
  transform-origin: right bottom;
  transition: width 200ms ease 0s, height 200ms ease 0s, max-height 200ms ease 0s, transform 300ms cubic-bezier(0, 1.2, 1, 1) 0s, opacity 83ms ease-out 0s;
  pointer-events: all;
}

@media (max-width: 480px){
  .chatbox{
    width: 320px;
    height: 500px;
  }
  .chatbox.first_ .chat_head,
  .start_head::before{
    height: 200px;
  }
  .chatbox.first_ .chat_body{
    height: 300px;
  }
  .chatbox .chat_body{
    height: 370px;
  }
}
