/* How-to phone frame from Figma node 10:856 / 10:854.
 * The exact blue handset chrome is always visible. Each step may optionally
 * place its own screenshot inside the screen; steps without artwork keep a
 * clean blank screen instead of inheriting another step's image.
 *
 * Figma layer order is: blank screen -> blue phone frame -> step screenshot.
 * Keep the screenshot above the exported frame artwork so the handset SVG
 * cannot cover the screen content.
 */

.phone-stage {
  position: relative;
  width: 258px;
  max-width: 100%;
  aspect-ratio: 258 / 521.433;
  background: transparent;
}

/* Persistent blank screen beneath the frame and optional step artwork. */
.phone-stage::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 2.05%;
  left: 5.9%;
  width: 88.2%;
  height: 95.9%;
  border-radius: 24px;
  background: #fff;
}

/* Exact exported handset artwork from Figma. It sits below screen content,
 * matching the source file's visual stacking order. */
.phone-frame-art {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

/* Step artwork is the top layer, inset inside the handset opening. */
.phone-stage .phone-shot {
  position: absolute;
  z-index: 2;
  top: 2.05%;
  left: 5.9%;
  width: 88.2%;
  height: 95.9%;
  max-width: none;
  max-height: none;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 24px;
  background: transparent;
  opacity: 1;
  transition: opacity .15s ease;
}

.phone-stage .phone-shot.is-empty,
.phone-stage .phone-shot.is-changing {
  opacity: 0;
}

/* Preserve roughly the same visual footprint when a tab has no step list yet. */
.howto-step-space {
  min-height: 426px;
}

@media (max-width: 991.98px) {
  .howto-step-space {
    min-height: 0;
  }
}

@media (max-width: 767.98px) {
  .phone-stage {
    width: 232px;
  }

  .phone-stage::before,
  .phone-stage .phone-shot {
    border-radius: 22px;
  }
}

@media (max-width: 374.98px) {
  .phone-stage {
    width: 214px;
  }

  .phone-stage::before,
  .phone-stage .phone-shot {
    border-radius: 20px;
  }
}
