.chat {
  height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  margin: auto;
}

.chat__history {
  flex-grow: 1;
  margin: 0;
  overflow: auto;
}

.chat__input {
  display: grid;
  grid-template-columns: 1fr max-content;
  position: sticky;
  bottom: 1rem;
}

.chat__promt,
.chat__input::before {
  grid-column: 1;
  grid-row: 1;
}

.chat__submit {
  grid-column: 2;
  grid-row: 1;
}

.chat__promt {
  grid-column: 1;
  resize: none;
  overflow: hidden;
}

.chat__input::before {
  content: attr(data-promt-value) " ";
  white-space: pre-wrap;
  visibility: hidden;
}

.chat__paragraph {
  margin: 0;
}

.chat__paragraph + .chat__paragraph {
  margin-top: .5rem;
}

.chat__message {
  width: max-content;
  margin-left: auto;
  max-width: 80%;
}

.chat__message--answer {
  margin-left: 0;
  margin-right: auto;
}

.chat__paragraph > p:first-child {
  margin-top: .25em;
}
.chat__paragraph > p:last-child {
  margin-bottom: 0;
}

.chat {
  color: #001e4e;
  background: white;
  font-size: 14px;
  line-height: 1.42857143;
  font-weight: 300;
  padding: 0 50px 30px;
}

@media (max-width: 376px) {
  .chat {
    padding: 0 25px 30px;
  }
}

.chat__message {
  position: relative;
  background: #d1ddea;
  padding: 12px 20px;
  margin-top: 0;
  margin-bottom: 20px;
  border-radius: 25px 0px 25px 25px;
}

.chat__message:first-child {
  font-size: 28px;
  font-weight: 500;
  line-height: 36px;
  padding: 0;
  margin: 0 0 30px 0;
}

.chat__sender {
  display: none;
}

.chat__message--answer {
  color: #fff;
  background: #16284f;
  border-radius: 0 25px 25px 25px;
  padding: 12px 20px 12px 70px;
  position: relative;
}

.chat__message--answer:before {
  content: "";
  background-image: url(../assets/icon.svg);
  background-repeat: no-repeat;
  background-size: 28px 28px;
  background-position: center center;
  border-radius: 50%;
  display: block;
  width: 34px;
  height: 34px;
  background-color: #d5e5cb;
  position: absolute;
  left: 10px;
  top: 8px;
}

.chat__message--answer:first-child {
  color: #001e4e;
  background: transparent;
}

.chat__message--answer:first-child:before {
  display: none;
}

.chat__message--answer::after {
  right: auto;
  left: 0;
  clip-path: polygon(0 0, 100% 0, 0 100%);
}

.chat__message {
  strong {
    font-weight: 400;
  }

  a {
    /*added pidgeon_blue color for better contrast*/
    color: #a4b9db;
    font-weight: 600;
    transition: color .25s ease-in-out;
  }

  a:hover {
    color: #f7d070;
  }
}

.chat__input {
  position: relative;
  bottom: 0;
  margin-top: 50px;
  padding: 1px;
  border-radius: 50px;
  border: 1px solid #d9e5ee;
}

.chat__input:after {
  content: '';
  position: absolute;
  top: -25px;
  left: -50px;
  width: calc(100% + 100px);
  height: 1px;
  background-color: rgba(0, 30, 78, 0.20);
}

.chat__input::before,
.chat__promt {
  padding: 8px;
  line-height: 1.2;
}

.chat__promt {
  border: none;
  background: transparent;
  outline: none;
  color: #17191f;
  padding: 12px 20px;
  font-size: 14px;
  line-height: 36px;
  font-weight: 500;
  font-size: inherit;
  letter-spacing: .7px;
}

.chat__submit {
  border: none;
  aspect-ratio: 1/1;
  height: 36px;
  padding-top: 6px;
  margin: auto 0;
  color: #001e4e;
  background: transparent;
}


.chat__promt::placeholder {
  color: #00528c;
  font-weight: 300;
  opacity: 1;
}

.chat__suggestions {
  display: flex;
  flex-direction: column;
}

.chat__suggestion {
  color: #16284f;
  background: #f7d070;
  border: none;
  width: fit-content;
  margin: 5px 4px;
  padding: 12px 18px;
  border-radius: 80px;
}

.chat__reset {
  display: none;
}

.chat__history {
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.chat__think,
.chat__paragraph--thinking::before,
.chat__paragraph--thinking::after {
  content: '';
  height: .5rem;
  width: .5rem;
  background: currentColor;
  display: inline-block;
  border-radius: .5em;
  animation: bounce 1600ms ease-in-out -160ms infinite both;
  opacity: .5;
}

.chat__paragraph--thinking::before {
  animation-delay: -330ms;
}
.chat__paragraph--thinking::after {
  animation-delay: 0ms;
}

@keyframes bounce {
  0%,
  50%,
  100% {
    transform: scale(.625)
  }
  20% {
    opacity: .87;
    transform: scale(1)
  }
}


@keyframes appear {
  from {
    opacity: 0;
    transform: translateX(-1rem);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.chat__doc {
  animation-duration: 2s;
  animation-name: appear;
}

.chat__message:not(:first-child) p {
  font-size: 15px;
  letter-spacing: .4px;
}
