/* ChatSection */
.chatSection {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
  margin-right: auto;
  margin-left: auto;
}

.message {
  position: relative;
  min-height: 50px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(50px);
  animation: slideUpFade 0.5s 0.3s;
  animation-fill-mode: both;
}

@keyframes slideUpFade {
  0% {
    opacity: 0;
    transform: translate3d(0, 50px, 0);
  }

  to {
    opacity: 1;
    transform: translateZ(0);
  }
}

.avatar {
  position: absolute;
  top: 0;
  left: -126px;
  border: 3px solid var(--primary-white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  width: 80px;
  height: 80px;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 100%;
}

.messageBubble {
  background-color: var(--primary-white);
  border-radius: 16px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  width: 647px;
  min-height: 74px;
  padding: 24px;
  font-size: 16px;
}

.messageBubble::before {
  content: "";
  position: absolute;
  top: 50px;
  left: -15px;
  width: 22px;
  height: 17px;
  background-image: url("../img/vector.svg");
  background-repeat: no-repeat;
  background-size: contain;
}

.messageBubble p {
  margin: 0;
  font-size: 16px;
  color: var(--message-text-color);
  font-weight: 500;
  line-height: 160%;
}

.messageBubble p strong {
  color: var(--strong-text-color);
  font-weight: 700;
}

@media (max-width: 767.8px) {
  .chatSection {
    margin-bottom: 32px;
  }

  .avatar {
    position: initial;
    flex-shrink: 0;
    margin-right: 16px;
    width: 52px;
    height: 52px;
  }

  .message {
    padding-right: 0;
    display: flex;
    align-items: start;
    width: 100%;
  }

  .messageBubble {
    padding: 12px 16px;
    width: 100%;
    min-height: auto;
  }

  .messageBubble::before {
    top: 20px;
    left: -11px;
  }
}
