/**
 * Shared device-preview frame — iPhone 17 Pro Max proportions.
 *
 * This is a VISUAL device frame only; it makes no claim of Apple affiliation.
 * Extracted from nfc-business-card.css so the SAME frame renders the Digital ID
 * demo on the product page AND the free-first /start hero (one implementation,
 * no drift). Screen aspect ≈ 9:19.5 (1320×2868 family); chassis is slightly
 * taller with thin continuous curves + Dynamic Island.
 *
 * Consumers: pages/nfcBusinessCard.js, pages/productLanding.js, pages/start.js
 */

.plan-demo__device {
  --pm-bezel: 11px;
  --pm-radius: 54px;
  --pm-screen-radius: 44px;
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 402px;
  /* Outer frame: Pro Max height/width including bezel (iPhone 17 Pro Max) */
  aspect-ratio: 9 / 19.5;
  max-height: min(56rem, 88vh);
  box-sizing: border-box;
  border-radius: var(--pm-radius);
  padding: var(--pm-bezel);
  background:
    linear-gradient(155deg, #3a3a3e 0%, #1c1c1f 28%, #0a0a0c 62%, #222226 100%);
  box-shadow:
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.14),
    inset 0 0 0 3px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.08),
    0 28px 56px -16px rgba(0, 0, 0, 0.55),
    0 12px 24px -12px rgba(0, 0, 0, 0.4);
}

.plan-demo__island {
  position: absolute;
  top: calc(var(--pm-bezel) + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 28%;
  max-width: 118px;
  height: 32px;
  border-radius: 999px;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  z-index: 3;
  pointer-events: none;
}

.plan-demo__btn {
  position: absolute;
  background: linear-gradient(90deg, #2e2e32, #121214);
  border-radius: 2px;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.12);
  z-index: 2;
  pointer-events: none;
}

.plan-demo__btn--silent {
  left: -2px;
  top: 18%;
  width: 3px;
  height: 28px;
  border-radius: 2px 0 0 2px;
}

.plan-demo__btn--vol-up {
  left: -2px;
  top: 26%;
  width: 3px;
  height: 48px;
  border-radius: 2px 0 0 2px;
}

.plan-demo__btn--vol-down {
  left: -2px;
  top: 36%;
  width: 3px;
  height: 48px;
  border-radius: 2px 0 0 2px;
}

.plan-demo__btn--power {
  right: -2px;
  top: 28%;
  width: 3px;
  height: 72px;
  border-radius: 0 2px 2px 0;
}

/* Scroll the demo profile — no visible scrollbar. Fills the Pro Max screen
   area. Room under the Dynamic Island so avatar/name aren't clipped. */
.plan-demo__viewport {
  height: 100%;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: var(--pm-screen-radius);
  background: #fff;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-top: 0;
}

.plan-demo__viewport::-webkit-scrollbar {
  display: none;
}

.plan-demo__viewport .profile-card {
  border: none;
  box-shadow: none;
  border-radius: 0;
}

/* Mobile: keep Pro Max aspect; use full column width, no squeeze. */
@media (max-width: 480px) {
  .plan-demo__device {
    width: 100%;
    max-width: none;
    /* Still Pro Max proportions — taller phone, not a wide slab */
    aspect-ratio: 9 / 19.5;
    max-height: min(52rem, 82vh);
    --pm-radius: 48px;
    --pm-screen-radius: 38px;
  }

  .plan-demo__device .profile-card {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
}

/* Preview-only toast for softened in-demo link clicks ("Preview only").
   Shared with the product page's Tap Experience toast keyframes. */
@keyframes nfc-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(6px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.plan-demo__preview-toast {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(17, 20, 26, 0.92);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  animation: nfc-toast-in 160ms ease-out;
  max-width: 90%;
  white-space: nowrap;
}
