/* Motion and cast shadow belong to the complete photographic handset. */
.iphone17-device {
  transform:perspective(1700px)
    translate3d(0,var(--iphone-lift,0px),0)
    rotateX(var(--iphone-rx,0deg))
    rotateY(var(--iphone-ry,0deg))
    rotateZ(var(--iphone-rz,0deg))
    scale(var(--iphone-scale,1));
  transform-origin:50% 56%;
}

.iphone18-contact-shadow {
  position:absolute;
  inset:1.2% 2.2%;
  border-radius:inherit;
  display:block;
  z-index:-3;
  pointer-events:none;
  background:#000;
  opacity:clamp(.14,var(--iphone-shadow-opacity,.29),.28);
  filter:blur(clamp(10px,calc(var(--iphone-shadow-blur,25px) * .48),18px));
  transform:translate3d(
    clamp(-12px,var(--iphone-shadow-x,9px),12px),
    clamp(7px,var(--iphone-shadow-y,14px),16px),
    -18px);
  box-shadow:
    0 3px 7px -2px rgb(0 0 0 / .34),
    0 12px 30px -8px rgb(0 0 0 / .25);
}

.platform-phones3d .iphone18-contact-shadow {
  inset:1.5% 2.5%;
  border-radius:inherit;
}
.capture-iphone .iphone18-contact-shadow { display:none; }
#product-dialog-art:not(.iphone17-device) > .iphone18-contact-shadow { display:none; }
.nearby-phone-motion .iphone18-contact-shadow { --iphone-shadow-opacity:.32; }

.motion-paused .iphone17-device {
  transform:none !important;
}
@media(prefers-reduced-motion:reduce) {
  .iphone17-device { transform:none !important; }
}
@media(max-width:700px) {
  .iphone18-contact-shadow {
    filter:blur(9px);
    opacity:.24;
    box-shadow:0 7px 17px -4px rgb(0 0 0 / .25);
  }
}
