/* Making: the rewrite confirmation and the making dialog */

.making-generation-error {
  display: block;
  margin: 18px 0 0;
  text-align: center;
}

.making-stop-actions {
  margin-top: 20px;
}

.making-error-actions {
  margin-top: 19px;
}

.page-update-dialog {
  width: min(calc(100% - 32px), 570px);
}

.page-update-dialog-shell {
  padding: 36px;
}

.page-update-promise {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  margin: -4px 0 24px;
  padding: 14px 16px;
  border: 1px solid var(--promise-line);
  border-radius: 15px;
  color: var(--promise-ink);
  background: var(--promise);
}

.page-update-promise > span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--violet-fill);
  font-weight: 900;
}

.page-update-promise p {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 800;
}

.making-dialog {
  width: min(calc(100% - 32px), 590px);
  padding: 42px;
  overflow: hidden;
}

.making-art {
  position: relative;
  width: 230px;
  height: 150px;
  margin: 0 auto 18px;
}

.making-moon {
  position: absolute;
  top: 0;
  left: 50%;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: #ffe3a0;
  box-shadow:
    0 0 0 14px rgba(255, 223, 145, 0.14),
    0 0 50px rgba(255, 216, 116, 0.25);
  transform: translateX(-50%);
}

.making-book {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 160px;
  height: 83px;
  transform: translateX(-50%);
}

.making-book::after {
  position: absolute;
  right: 12px;
  bottom: -8px;
  left: 12px;
  height: 14px;
  border-radius: 50%;
  background: rgba(42, 35, 91, 0.15);
  filter: blur(6px);
  content: "";
}

.making-page {
  position: absolute;
  z-index: 2;
  bottom: 9px;
  width: 82px;
  height: 67px;
  border: 3px solid var(--violet-dark);
  background:
    repeating-linear-gradient(to bottom, transparent 0 11px, rgba(102, 87, 199, 0.16) 12px 14px),
    var(--surface);
}

.making-page-left {
  right: 50%;
  border-radius: 8px 3px 4px 14px;
  transform: skewY(7deg);
}

.making-page-right {
  left: 50%;
  border-radius: 3px 8px 14px 4px;
  transform: skewY(-7deg);
  transform-origin: left bottom;
  animation: page-breathe 1.6s ease-in-out infinite;
}

.making-star {
  position: absolute;
  z-index: 3;
  color: var(--gold);
  animation: soft-twinkle 1.5s ease-in-out infinite;
}

.making-star-one {
  top: 20px;
  left: 20px;
  font-size: 1.3rem;
}

.making-star-two {
  top: 48px;
  right: 22px;
  color: var(--coral);
  animation-delay: 0.45s;
}

.making-track {
  height: 9px;
  overflow: hidden;
  margin: 24px 0 0;
  border-radius: 99px;
  background: var(--making-track);
}

/* Its width is makingProgressCopy's fill: while a chapter is written, an
   estimate from the time its writing usually takes, which moves at an even
   pace between the bar's ticks (MAKING_TICK_MS, 1 s); at none, a dot. */
.making-track span {
  display: block;
  width: 0;
  min-width: 9px;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet), #8a7be0, var(--coral));
  transition: width 1s linear;
}

@media (max-width: 780px) {
  .recipe-dialog,
  .page-update-dialog-shell,
  .making-dialog {
    padding: 27px 21px;
  }

  .making-dialog {
    width: min(calc(100% - 20px), 590px);
  }

  .making-art {
    transform: scale(0.87);
    transform-origin: center bottom;
  }
}

@keyframes page-breathe {
  0%,
  100% {
    transform: skewY(-7deg) rotateY(0deg);
  }
  50% {
    transform: skewY(-4deg) rotateY(-8deg);
  }
}
