/* A real product and a simple phone outline: the motion explains the interaction. */
.ws-nfc-demo { width: min(100%, 560px); min-width: 0; margin-inline: auto; color: #fff; }
.ws-nfc-demo *, .ws-nfc-demo *::before, .ws-nfc-demo *::after { box-sizing: border-box; }
.ws-nfc-demo [hidden] { display: none !important; }
.ws-nfc-demo button { font: inherit; cursor: pointer; }
.ws-nfc-demo button:focus-visible { outline: 2px solid #8bd8ff; outline-offset: 4px; }
.ws-nfc-demo__sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ws-nfc-demo__devices { display: flex; align-items: center; gap: 5px; }
.ws-nfc-demo__devices button { padding: 8px 17px; border: 1px solid transparent; border-radius: 99px; background: transparent; color: #b9cfe6; font-size: 14px; font-weight: 600; }
.ws-nfc-demo__devices button[aria-pressed="true"] { border-color: #8ccbed; color: #fff; }
.ws-nfc-demo__scene { position: relative; isolation: isolate; container-type: inline-size; width: 100%; aspect-ratio: 1.4; margin-block: 16px 8px; }
.ws-nfc-demo__product { position: absolute; z-index: 1; left: 0; top: 8%; width: 65%; height: 85%; object-fit: contain; filter: drop-shadow(0 16px 18px #050f2926); }
.ws-nfc-demo__phone { --nfc-contact: translate(-132%, 5%) rotate(-9deg); --nfc-rest: translate(-8%, 0) rotate(3deg); position: absolute; z-index: 3; left: 67%; top: 9%; width: 30%; height: 79%; border: 3px solid #c6e2f1; border-radius: 28px; background: #15355a; box-shadow: 0 10px 22px #06152b24; transform: translateX(0) rotate(7deg); }
.ws-nfc-demo[data-stage="2"] .ws-nfc-demo__phone,
.ws-nfc-demo[data-stage="tap"] .ws-nfc-demo__phone { transform: var(--nfc-contact); }
.ws-nfc-demo[data-stage="3"] .ws-nfc-demo__phone { transform: var(--nfc-rest); }
.ws-nfc-demo__camera { position: absolute; z-index: 2; top: 4%; left: 50%; width: 34%; height: clamp(9px, 2.5cqi, 14px); border-radius: 999px; background: #06101e; transform: translateX(-50%); }
.ws-nfc-demo__camera::after { content: ''; position: absolute; top: 50%; right: 10%; width: 4px; height: 4px; border-radius: 50%; background: #15304c; transform: translateY(-50%); }
.ws-nfc-demo[data-device="android"] .ws-nfc-demo__camera { top: 10px; width: 7px; height: 7px; border-radius: 50%; }
.ws-nfc-demo[data-device="android"] .ws-nfc-demo__camera::after { content: none; }
.ws-nfc-demo__signal { position: absolute; z-index: 2; left: 37%; top: 15%; width: clamp(80px, 23cqi, 130px); aspect-ratio: 1; transform: translate(-50%, -50%); opacity: 0; pointer-events: none; }
.ws-nfc-demo[data-device="android"] .ws-nfc-demo__signal { left: 41%; top: 45%; width: clamp(128px, 44cqi, 240px); }
.ws-nfc-demo__signal > span { position: absolute; inset: 0; border: 2px solid #a7e4ff; border-radius: 50%; opacity: 0; transform: scale(.18); box-shadow: 0 0 12px #8bd8ff24, inset 0 0 12px #8bd8ff12; }
.ws-nfc-demo[data-stage="2"] .ws-nfc-demo__signal,
.ws-nfc-demo[data-stage="tap"] .ws-nfc-demo__signal { opacity: 1; }
.ws-nfc-demo[data-stage="2"] .ws-nfc-demo__signal > span,
.ws-nfc-demo[data-stage="tap"] .ws-nfc-demo__signal > span { animation: ws-nfc-ripple 1.8s cubic-bezier(.2, .45, .35, 1) infinite; }
.ws-nfc-demo[data-stage] .ws-nfc-demo__signal > span:nth-child(2) { animation-delay: -.6s; }
.ws-nfc-demo[data-stage] .ws-nfc-demo__signal > span:nth-child(3) { animation-delay: -1.2s; }
.ws-nfc-demo__notification { position: absolute; inset: 13% 5% auto; display: flex; align-items: center; gap: clamp(4px, 1cqi, 6px); min-height: 44px; padding: clamp(7px, 1.5cqi, 10px); border: 1px solid #fff5; border-radius: 13px; background: #eef2f6f2; color: #182b42; box-shadow: 0 3px 9px #06152b26; text-align: left; }
.ws-nfc-demo__notification-icon { display: grid; flex: 0 0 clamp(16px, 4cqi, 24px); width: clamp(16px, 4cqi, 24px); height: clamp(16px, 4cqi, 24px); place-items: center; border-radius: 5px; background: #152532; color: #fff; }
.ws-nfc-demo__notification-icon svg { width: 80%; height: 80%; }
.ws-nfc-demo__notification-copy { display: grid; gap: 2px; min-width: 0; }
.ws-nfc-demo__notification small { color: #34475a; font-size: clamp(7.5px, 1.7cqi, 10px); line-height: 1.35; }
.ws-nfc-demo__notification strong { font-size: clamp(8px, 1.9cqi, 11px); font-weight: 650; line-height: 1.3; }
.ws-nfc-demo__tap { position: absolute; right: 16%; bottom: 12%; width: 17px; height: 17px; border: 2px solid #fff; border-radius: 50%; background: #0077cda6; box-shadow: 0 0 0 5px #0077cd20; opacity: 0; pointer-events: none; }
.ws-nfc-demo[data-stage="tap"] .ws-nfc-demo__tap { animation: ws-nfc-tap .5s ease-out both; }
.ws-nfc-demo__result { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; text-align: center; }
.ws-nfc-demo__stars { color: #ffd45b; font-size: clamp(13px, 1.4vw, 19px); letter-spacing: 1px; }
.ws-nfc-demo__result strong { color: #fff; font-size: clamp(14px, 1.6vw, 21px); font-weight: 600; line-height: 1.4; }
.ws-nfc-demo__caption { min-height: 44px; margin: 0; color: #d4e3f2; font-size: 14px; line-height: 1.6; }
.ws-nfc-demo__tip { margin: 5px 0 0; padding-left: 12px; border-left: 2px solid #80bce2; color: #b9cee3; font-size: 12px; line-height: 1.6; }
.ws-nfc-demo__playback { display: flex; min-height: 44px; margin-top: 12px; }
.ws-nfc-demo__playback button { min-height: 44px; padding: 4px 0; border: 0; background: transparent; color: #b9d9f3; font-size: 14px; }
.ws-nfc-demo__playback button:hover { color: #fff; }
.ws-nfc-demo.is-moving .ws-nfc-demo__phone { animation: ws-nfc-approach 2s cubic-bezier(.3,.1,.2,1) forwards; }
.ws-nfc-demo.is-returning .ws-nfc-demo__phone { animation: ws-nfc-return .8s cubic-bezier(.3,.1,.2,1) forwards; }
.ws-nfc-demo.is-complete .ws-nfc-demo__phone { animation: ws-nfc-phone-float 6.4s ease-in-out infinite; }
.ws-nfc-demo.is-complete .ws-nfc-demo__product { animation: ws-nfc-product-float 7.2s ease-in-out infinite; }
.ws-nfc-demo.is-paused .ws-nfc-demo__phone,
.ws-nfc-demo.is-paused .ws-nfc-demo__product,
.ws-nfc-demo.is-paused .ws-nfc-demo__signal > span,
.ws-nfc-demo.is-paused .ws-nfc-demo__tap { animation-play-state: paused; }
@keyframes ws-nfc-approach { from { transform: translateX(0) rotate(7deg); } to { transform: var(--nfc-contact); } }
@keyframes ws-nfc-return { from { transform: var(--nfc-contact); } to { transform: var(--nfc-rest); } }
@keyframes ws-nfc-tap { 0% { opacity: 0; transform: scale(1.4); } 35% { opacity: 1; transform: scale(.85); } 70% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.3); } }
@keyframes ws-nfc-ripple { 0% { opacity: 0; transform: scale(.18); } 12% { opacity: .8; } 75% { opacity: .22; } 100% { opacity: 0; transform: scale(1); } }
@keyframes ws-nfc-phone-float { 0%, 100% { transform: var(--nfc-rest) translateY(0) rotate(0); } 50% { transform: var(--nfc-rest) translateY(-5px) rotate(-1deg); } }
@keyframes ws-nfc-product-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(.7deg); } }
@media (max-width: 640px) {
  .ws-nfc-demo__scene { aspect-ratio: 1.3; }
  .ws-nfc-demo__phone { --nfc-contact: translate(-108%, 5%) rotate(-9deg); --nfc-rest: translate(-4%, 0) rotate(3deg); left: 63%; top: 7%; width: 34%; height: 85%; border-width: 2px; border-radius: 20px; }
  .ws-nfc-demo__notification { gap: 3px; padding: 5px; border-radius: 9px; }
  .ws-nfc-demo[data-device="android"] .ws-nfc-demo__camera { top: 8px; width: 6px; height: 6px; }
  .ws-nfc-demo__stars { font-size: 13px; letter-spacing: 0; }
  .ws-nfc-demo__result strong { font-size: 15px; }
  .ws-nfc-demo__caption { min-height: 42px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .ws-nfc-demo.is-moving .ws-nfc-demo__phone,
  .ws-nfc-demo.is-returning .ws-nfc-demo__phone,
  .ws-nfc-demo.is-complete .ws-nfc-demo__phone,
  .ws-nfc-demo.is-complete .ws-nfc-demo__product,
  .ws-nfc-demo__signal > span,
  .ws-nfc-demo__tap { animation: none; }
  .ws-nfc-demo__signal { display: none; }
}
