.chat-container {
  margin: 2em 0;
  height: calc(100vh - 4em);
  padding: 0;
  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;
  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: 15px;
  width: 15px;
  margin-left:1px;
}

.chat-search_form-warning {
  background-color: #3296ff;
  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;
  padding:10px;
  transition: background .3s;
}

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

.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: 45px;
  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) {
  .message-assistant, .message-user {
    padding: 1.2em 1em;
    gap: 1em;
  }
  .chat-container {
    gap: 1em;
  }
}

@media only screen and (max-width: 767px) {
  .chat-container {
    margin: 1em 0;
    height: calc(100vh - 2em);
  }
  .chat-search_form {
    height: 51px;
  }
  .chat-search_form-input {
    font-size: 16px;
  }
  .chat-search_box .top-text {
    font-size: 16px;
  }
}
