/*--------------------
Button
--------------------*/

/*--------------------
Body
--------------------*/

.bg {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  background: url("https://images.unsplash.com/photo-1451186859696-371d9477be93?crop=entropy&fit=crop&fm=jpg&h=975&ixjsv=2.1.0&ixlib=rb-0.3.5&q=80&w=1925") no-repeat 0 0;
  filter: blur(80px);
  transform: scale(1.2);
}

/*---------------------
Notification
---------------------*/

.chat-notification {
  position: fixed;
  width: 18px;
  height: 18px;
  background-color: #ea4e3d;
  bottom: 45px;
  right: 5px;
  z-index: 10;
  border-radius: 10px;
  display: none;
  line-height: 1;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  /* font-weight: 500; */
}

.chatbox.new-message + .chat-notification {
  display: flex;
}

/*--------------------
Chat
--------------------*/

.chatbox {
  position: fixed;
  bottom: 10px;
  right: 10px;
  /* transform: translate(-50%, -50%); */
  width: 50px;
  height: 50px;
  /* max-height: 500px; */
  z-index: 10;
  overflow: hidden;
  box-shadow: 0px 0px 15px rgba(0, 0, 0, .5);
  border-radius: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  background-color: white;
  /* box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); */
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  background-size: cover;
  transition: all 0.2s ease;
}

.chatbox.new-message {
  animation: fadeinbottom 400ms cubic-bezier(0.25, 1, 0.5, 1) 0s 1 normal forwards;
}

.chatbox.active {
  width: 90%;
  height: 60%;
  align-items: normal;
  justify-content: space-between;
  background: #232428e5;
  border-radius: 15px;
  min-height: 420px;
}

.chatbox-icon {
  display: block;
  position: relative;
  z-index: 1;
  width: 24px;
  /* box-shadow: 0px 0px 15px rgba(0, 0, 0, .5); */
}

.chatbox.active .chatbox-icon {
  display: none;
}

.chatbox.active #bg-wrap {
  display: none;
}

.chatbox.active #bg-avatar {
  display: block;
}

.chatbox #bg-wrap,
.chatbox #bg-avatar {
  width: 80px;
  height: 80px;
  position: absolute;
  top: -15px;
  left: -15px;
}

@media screen and (min-width:768px) {
  .chatbox.active, .chatbox{
    display: none;
  }
}

/*--------------------
Chat Title
--------------------*/

.chatbox.active > .chat-title {
  display: flex;
}

.chat-title {
  flex: 0 1 45px;
  position: relative;
  z-index: 2;
  background: #31323a;
  color: #fff;
  text-transform: uppercase;
  text-align: left;
  padding: 10px 20px 10px 50px;
  align-items: center;
  justify-content: space-between;
  display: none;
}

.chat-title h1,
.chat-title h2,
.chatbox .chat-title h5 {
  font-weight: normal;
  font-size: 18px;
  /* font-weight: 600; */
  font-family: 'San Francisco Semibold', serif;
  margin: 0;
  text-transform: none;
  padding: 0;
}

.chat-title h2 {
  color: rgba(255, 255, 255, 0.5);
  font-size: 8px;
  letter-spacing: 1px;
}

.chat-title .avatar {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 9px;
  border-radius: 30px;
  width: 31px;
  height: 31px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  background-color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  /* border: 2px solid rgba(255, 255, 255, 0.24); */
}

.chat-title .avatar img {
  width: 50%;
  height: auto;
  z-index: 1;
}

.chat-title .close {
  font-size: 24px;
}

/*--------------------
Messages
--------------------*/

.chatbox.active .messages {
  display: flex;
}

.messages {
  flex: 1 1 auto;
  color: white;
  overflow: hidden;
  position: relative;
  width: 100%;
  display: none;
}

.messages .messages-content {
  position: absolute;
  top: 0;
  left: 0;
  height: 101%;
  width: 100%;
}

.messages .message {
  clear: both;
  float: left;
  padding: 10px 12px;
  border-radius: 10px 10px 10px 0;
  background: #31323a;
  margin: 8px 0;
  font-size: 16px;
  line-height: 1.3;
  /* font-weight: 500; */
  /* margin-left: 35px; */
  position: relative;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  word-wrap: break-word;
  max-width: 80%;
}

.messages .message .timestamp {
  position: absolute;
  bottom: -15px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.3);
}

/* .messages .message::before {
  content: "";
  position: absolute;
  bottom: -6px;
  border-top: 6px solid rgba(0, 0, 0, 0.3);
  left: 0;
  border-right: 7px solid transparent;
} */

.messages .message .avatar {
  position: absolute;
  z-index: 1;
  bottom: 0px;
  left: -35px;
  border-radius: 30px;
  width: 30px;
  height: 30px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.24);
}

.messages .message .avatar img {
  width: 100%;
  height: auto;
}

.messages .message.message-personal {
  float: right;
  color: #fff;
  text-align: left;
  background: #4d5ef6;
  border-radius: 10px 10px 0 10px;
}

.messages .message.message-personal::before {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 5px solid transparent;
  border-top: 4px solid #257287;
  bottom: -4px;
}

.messages .message.message-suggestion {
  float: right;
  color: #fff;
  text-align: left;
  background: #111214;
  border-radius: 12px;
  line-height: 1.3;
  font-size: 16px;
  margin-bottom: 2px;
  max-width: 100%;
  width: 100%;
  margin: 4px auto;
  padding: 10px 32px 10px 12px;
  background-repeat: no-repeat;
  background-size: 14px;
  background-position: center right 10px;
  background-image: url('/wp-content/plugins/ask-gousto/plane.svg');
}

.messages .message:last-child {
  margin-bottom: 30px;
}

.messages .message.new {
  transform: scale(0);
  transform-origin: 0 0;
  animation: fadeinbottom 400ms cubic-bezier(0.25, 1, 0.5, 1) 0s 1 normal forwards;
}

.messages .message.loading::before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  content: "";
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  z-index: 2;
  margin-top: 4px;
  -webkit-animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
  animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
  border: none;
  -webkit-animation-delay: 0.15s;
  animation-delay: 0.15s;
}

.messages .message.loading span {
  display: block;
  font-size: 0;
  width: 20px;
  height: 10px;
  position: relative;
}

.messages .message.loading span::before {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  content: "";
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  z-index: 2;
  margin-top: 4px;
  -webkit-animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
  animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
  margin-left: -7px;
}

.messages .message.loading span::after {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  content: "";
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  z-index: 2;
  margin-top: 4px;
  -webkit-animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
  animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
  margin-left: 7px;
  -webkit-animation-delay: 0.3s;
  animation-delay: 0.3s;
}

/*--------------------
Markdown
--------------------*/

.message ul {
  margin: 5px 0px;
  padding: 0px;
  padding-left: 22px;
}

.message ul li {

}

.message ul li::marker {
  margin: 0px;
  padding: 0px;
}

/*--------------------
Message Box
--------------------*/

.chatbox.active .message-box {
  display: flex;
}

.message-box {
  flex: 0 1 40px;
  width: 100%;
  background: #31323a;
  padding: 10px;
  position: relative;
  display: none;
  justify-content: space-between;
  padding-top: 25px;
}


.message-box .disclaimer {
    position: absolute;
    top: 3px;
    font-size: 11px;
    padding-left: 25px;
    color: #d1d1d1;
    font-weight: 400;
}

.message-box #message-input {
  background: none;
  border: none;
  outline: none !important;
  resize: none;
  color: white;
  font-size: 16px!important;
  height: 40px;
  margin: 0;
  padding-right: 20px;
  width: 100%;
  line-height: 1.3;
  padding: 10px 12px;
  border: 1px solid #555561;
  border-radius: 20px;
  /* font-weight: 500; */
  background-color: #28292e;
}

.message-box #message-input::-webkit-input-placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.message-box textarea:focus:-webkit-placeholder {
  color: transparent;
}

.message-box #message-input::-webkit-scrollbar {
    width: 0px;
    background: transparent;
    color: transparent;
}

.message-box .message-submit {
  /* position: absolute; */
  z-index: 1;
  top: 9px;
  right: 10px;
  color: #fff;
  border: none;
  background: white;
  font-size: 16px;
  text-transform: uppercase;
  line-height: 1;
  /* padding: 6px 10px; */
  border-radius: 30px;
  outline: none !important;
  transition: background 0.2s ease;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.message-box .message-submit i {
  color: black;
}

/* .message-box .message-submit:hover {
  background: #ffffff;
} */

/*--------------------
Custom Srollbar
--------------------*/
.mCSB_scrollTools {
  margin: 1px -3px 1px 0;
  opacity: 0;
}

.mCSB_inside>.mCSB_container {
  margin-right: 0px!important;
  padding: 0 10px;
  padding-top: 10px;
}

.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
  background-color: rgba(0, 0, 0, 0.5) !important;
}

/*--------------------
Bounce
--------------------*/
@-webkit-keyframes bounce {
  0% {
    transform: matrix3d(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  4.7% {
    transform: matrix3d(0.45, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  9.41% {
    transform: matrix3d(0.883, 0, 0, 0, 0, 0.883, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  14.11% {
    transform: matrix3d(1.141, 0, 0, 0, 0, 1.141, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  18.72% {
    transform: matrix3d(1.212, 0, 0, 0, 0, 1.212, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  24.32% {
    transform: matrix3d(1.151, 0, 0, 0, 0, 1.151, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  29.93% {
    transform: matrix3d(1.048, 0, 0, 0, 0, 1.048, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  35.54% {
    transform: matrix3d(0.979, 0, 0, 0, 0, 0.979, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  41.04% {
    transform: matrix3d(0.961, 0, 0, 0, 0, 0.961, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  52.15% {
    transform: matrix3d(0.991, 0, 0, 0, 0, 0.991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  63.26% {
    transform: matrix3d(1.007, 0, 0, 0, 0, 1.007, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  85.49% {
    transform: matrix3d(0.999, 0, 0, 0, 0, 0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  100% {
    transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
}

@keyframes bounce {
  0% {
    transform: matrix3d(0.75, 0, 0, 0, 0, 0.75, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  4.7% {
    transform: matrix3d(0.912, 0, 0, 0, 0, 0.912, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  9.41% {
    transform: matrix3d(1.038, 0, 0, 0, 0, 1.038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  14.11% {
    transform: matrix3d(1.134, 0, 0, 0, 0, 1.134, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  18.72% {
    transform: matrix3d(1.182, 0, 0, 0, 0, 1.182, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  24.32% {
    transform: matrix3d(1.164, 0, 0, 0, 0, 1.164, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  29.93% {
    transform: matrix3d(1.124, 0, 0, 0, 0, 1.124, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  35.54% {
    transform: matrix3d(1.089, 0, 0, 0, 0, 1.089, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  41.04% {
    transform: matrix3d(1.074, 0, 0, 0, 0, 1.074, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  52.15% {
    transform: matrix3d(1.045, 0, 0, 0, 0, 1.045, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  63.26% {
    transform: matrix3d(1.028, 0, 0, 0, 0, 1.028, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  85.49% {
    transform: matrix3d(1.012, 0, 0, 0, 0, 1.012, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }

  100% {
    transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
}


@-webkit-keyframes ball {
  from {
    transform: translateY(0) scaleY(0.8);
  }

  to {
    transform: translateY(-10px);
  }
}

@keyframes ball {
  from {
    transform: translateY(0) scaleY(0.8);
  }

  to {
    transform: translateY(-10px);
  }
}

@keyframes fadeinbottom {
	0% {
		opacity: 0;
		transform: translateY(50px);
	}

	100% {
		opacity: 1;
		transform: translateY(0);
	}
}