/*
 * Product demo 3D phone
 *
 * The existing video, pause control, and progress bar remain the interaction
 * layer. Only the handcrafted CSS device is replaced once the GLB is ready.
 */

.product-demo-phone-host .landscape-phone-stage {
  position: relative;
  isolation: isolate;
  overflow: visible;
  transform: none;
  will-change: auto;
}

.product-demo-phone-host .landscape-phone {
  position: relative;
  z-index: 1;
  transition: opacity 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.product-demo-phone-3d {
  position: absolute;
  z-index: 2;
  inset: -17% -7%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.product-demo-phone-3d::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: 16%;
  bottom: 14%;
  left: 16%;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.68);
  filter: blur(24px);
  opacity: 0.6;
  transform: scaleX(0.88);
}

.product-demo-phone-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

.product-demo-control-layer {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.product-demo-control-layer .product-demo-toggle {
  pointer-events: auto;
}

.product-demo-phone-host.is-3d-ready .product-demo-phone-3d {
  opacity: 1;
}

.product-demo-phone-host.is-3d-ready .landscape-phone {
  opacity: 0;
  pointer-events: none;
}

.product-demo-phone-host.has-3d-error .product-demo-phone-3d {
  display: none;
}

.product-demo-phone-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 820px) {
  .product-demo-phone-3d {
    inset: -13% -5%;
  }

  .product-demo-phone-3d::before {
    right: 13%;
    bottom: 13%;
    left: 13%;
    height: 28px;
    filter: blur(20px);
  }
}

@media (max-width: 560px) {
  .product-demo-phone-3d {
    inset: -10% -2%;
  }

  .product-demo-phone-3d::before {
    right: 11%;
    bottom: 12%;
    left: 11%;
    height: 22px;
    filter: blur(16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-demo-phone-3d,
  .product-demo-phone-host .landscape-phone {
    transition: none;
  }
}
