.chatbot-unit {
  margin: 0;
  padding: 0;
  font-family: "Montserrat";
  display: flex;
  align-items: flex-end;
  background: url(../img/bear-bg.png) no-repeat bottom right;
  background-size: contain;
  box-sizing: border-box;
  height: 437px;
  padding: 2.3em;
  position: fixed;
  bottom: 0;
  right: 0;
  width: 410px;
  z-index: 100;
}

.chatbot-unit * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.chatbot-unit_footer {
  display: flex;
  gap: 1.6em;
  align-items: center;
}

.chatbot-unit_footer .text {
  font-size: 17px;
  font-weight: 600;
  max-width: 110px;
  text-align: right;
}

.smart-search_btn {
  min-height: 44px;
  border-radius: 6px;
  background: #000;
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  display: flex;
  align-items: center;
  padding: .2em 1.1em .3em;
  width: fit-content;
  text-decoration: none;
  transition: background .3s;
}

.smart-search_btn:hover {
  background: #1a1a1a;
}

.chat-container {
  margin: 2em 0;
  height: calc(100vh - 4em);
  padding: 0;
  font-family: "Montserrat";
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2.7em;
}

.chat-container * {
  padding: 0;
  box-sizing: border-box;
}

.chat-search_box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1em;
  max-width: 767px;
  flex: 0 0 auto;
  width: 100%;
}

.chat-search_box .top-text {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
}

.chat-search_form {
  display: flex;
  align-items: center;
  gap: 1em;
  height: 71px;
  border: 1px solid #DFDFDF;
  border-radius: 19px;
  overflow: hidden;
  box-shadow: 0 13px 26px 0 rgba(0, 0, 0, 0.07);
  padding-right: 1em;
}

.chat-search_form-input {
  height: 100%;
  flex: 1 0 0;
  padding-left: 1.7em;
  font-size: 20px;
  font-family: "Montserrat";
  box-shadow: none;
  outline: none;
  border: none;
  width: 100%;
}

.chat-search_form-input::-webkit-input-placeholder {
  color: #898989;
}

.chat-search_form-input::input-placeholder {
  color: #898989;
}

.chat-search_form-input::-moz-input-placeholder {
  color: #898989;
}

.chat-search_form-btns {
  display: flex;
  align-items: center;
  gap: .7em;
}

.chat-search_form-submit {
  background-color: #39AF3C;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  height: 38px;
  flex: 38px 0 0;
  width: 38px;
  border: none;
  transition: background .3s;
}

.chat-search_form-submit:hover {
  background: #2c892f;
}

.chat-search_form-submit:before {
  content: '';
  display: block;
  background: url(../img/arrow-right.svg) no-repeat center;
  background-size: contain;
  height: 21px;
  width: 21px;
}

.chat-search_form-warning {
  background-color: #009ACB;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  height: 38px;
  flex: 38px 0 0;
  width: 38px;
  border: none;
  transition: background .3s;
}

.chat-search_form-warning:before {
  content: '';
  display: block;
  background: url(../img/stop.png) no-repeat center;
  background-size: contain;
  height: 70%;
  width: 70%;
}

.chat-search_form-warning:hover {
  background: #007398;
}

.chat-output {
  flex: 1 0 0;
  overflow: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.3em;
  max-width: 900px;
  padding-right: .5em;
  width: 100%;
}

.chat-output p {
  margin: 0;
  line-height: 1.55;
}

.chat-output .loag-bg {
  display: none;
  height: 18px;
  width: 55px;
  background: url(../img/load.gif) no-repeat center;
  background-size: contain;
}

.chat-output .loag-bg.is-active {
  display: block;
}

.chat-output ul:not([class]), .chat-output ol:not([class]) {
  padding-left: 20px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .7em;
}

.chat-output ul:not([class]) li, .chat-output ol:not([class]) li {
  margin-bottom: 0;
}

.chat-output a:not([class]) {
  color: #0D6EFD;
  text-decoration: none;
  border-bottom: 1px solid #0D6EFD;
  transition: border-bottom-color .3s;
}

.chat-output a:not([class]):hover {
  border-bottom-color: transparent;
}

.message-user {
  border-radius: 12px;
  border: 1px solid #DFDFDF;
  padding: 1.3em;
  padding-bottom: 2.7em;
  font-size: 18px;
  display: flex;
  flex-direction: column;
  gap: 1.1em;
}

.message-assistant {
  padding: 1.3em;
  padding-bottom: 2.7em;
  border-radius: 12px;
  font-size: 18px;
  background: #F8F9FA;
  display: flex;
  flex-direction: column;
  gap: 1.7em;
  position: relative;
}

.message-assistant.is-active:before {
  animation: fadeIn 2s linear  infinite;
}

.message-assistant:before {
  content: '';
  display: block;
  width: calc(100% - 1em);
  height: 2px;
  position: absolute;
  left: 0.5em;
  bottom: 0;
  background: #39AF3C;
  transform: scale(1, 0);
}

@keyframes fadeIn {
  0% {
    transform: scale(0, 0);
  }
  50% {
    transform: scale(1, 1);
  }
  100% {
    transform: scale(0, 0);
  }
}

@media (min-width: 1024px) {
  @-moz-document url-prefix() {
    .chat-output {
      scrollbar-color: #BFC8D1 transparent;
      scrollbar-width: thin;
    }
  }
  .chat-output::-webkit-scrollbar-track {
    background-color: transparent;
  }
  .chat-output::-webkit-scrollbar-thumb {
    -webkit-border-radius: 100px;
    border-radius: 100px;
    background-color: #BFC8D1;
  }
  .chat-output::-webkit-resizer {
    width: 5px;
    height: 0px;
  }
  .chat-output::-webkit-scrollbar {
    width: 5px;
  }
}

@media only screen and (max-width: 1199px) {
  .chatbot-unit_footer {
    flex-direction: column;
    gap: .7em;
  }
  .chatbot-unit_footer .text {
    font-size: 15px;
    text-shadow: -1px 0px #fff, 0px -1px #fff, 1px 0px #fff, 0px 1px #fff, -1px -1px #fff, 1px 1px #fff, -1px 1px #fff, 1px -1px #fff;
  }
  .smart-search_btn {
    font-size: 17px;
  }
  .chatbot-unit {
    padding: 1em;
    justify-content: flex-end;
    height: 200px;
    width: auto;
  }
  .message-assistant, .message-user {
    font-size: 1rem;
    padding: 1.2em 1em;
    gap: 1em;
  }
  .chat-container {
    gap: 1em;
  }
}

@media only screen and (max-width: 767px) {
  .chatbot-unit_footer {
    align-items: flex-end;
  }
  .chatbot-unit_footer .text {
    font-size: 11px;
  }
  .smart-search_btn {
    font-size: 12px;
    min-height: 30px;
    width: 68px;
  }
  .chatbot-unit {
    padding: .5em;
    height: 100px;
  }
  .chat-container {
    margin: 1em 0;
    height: calc(100vh - 2em);
  }
  .chat-search_form {
    height: 51px;
  }
  .chat-search_form-input {
    font-size: 16px;
  }
  .chat-container {
    font-size: 14px;
  }
  .chat-search_box .top-text {
    font-size: 16px;
  }
}
