.container {
  max-width: 358px;
  width: 100%;
  gap: 8px;
  padding: 0 30px;
}

.box {
  width: max-content;
  height: max-content;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  transition: transform, opacity;
  transition-duration: 500ms;
}

.boxContent {
  width: 100%;
  font-family: var(--ens-semi-mono);
  white-space: pre;
  border-radius: 4px;

  padding: 10px;
  font-size: 11px;
  line-height: 112%;
}

.bubble {
  margin-top: -3.5px;
  height: 16px;
  width: 16px;
}

.box:nth-child(2n) .bubble {
  color: var(--ens-white);
  align-self: flex-start;
  transform: scaleX(-1);

  margin-left: 12px;
}

.box:nth-child(2n + 1) .bubble {
  color: var(--ens-blue);

  margin-right: 12px;
}

.box:nth-child(2n) .boxContent {
  background: var(--ens-white);
  color: var(--ens-gray-4);
}

.box:nth-child(2n + 1) {
  align-self: flex-end;
}

.box:nth-child(2n + 1) .boxContent {
  filter: drop-shadow(0px 24px 32px rgba(14, 61, 104, 0.06));
  background: var(--ens-blue);
  color: var(--ens-white);
}

.box:nth-child(1) {
  opacity: 0;
  transform: translateX(25px);
}

.container .box.animating {
  opacity: 1;
  transform: translateX(0);
}

.box:nth-child(2) {
  opacity: 0;
  transition-delay: 250ms;
  transform: translateX(-25px);
}

.box:nth-child(3) {
  opacity: 0;
  transform: translateX(25px);
  transition-delay: 500ms;
}

.box:nth-child(4) {
  transition-delay: 750ms;
  opacity: 0;
  transform: translateX(-25px);
}

.box:nth-child(4).animating {
  opacity: 1;
}

@media (min-width: 768px) {
  .container {
    max-width: 500px;
    padding: 0;
  }

  .boxContent {
    padding: 13px 16px;
    font-size: 15px;
    border-radius: 8px;
  }
  .bubble {
    margin-top: -1px;
    width: max-content;
    height: max-content;
  }
  .box:nth-child(2n) .bubble {
    margin-left: 24px;
  }
  .box:nth-child(2n + 1) .bubble {
    margin-right: 24px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 824px;
  }
  .box:nth-child(2) {
    top: 80px;
  }
  .box:nth-child(3) {
    top: 140px;
  }
  .box:nth-child(4) {
    top: 200px;
  }
  .boxContent {
    font-size: 24px;
    padding: 22px 26px;
  }
}
