/* The social App phone shell, with one live merchant-wallet application. */
.wallet-phone-content {
  --wallet-status: 55px;
  --wallet-home: 27px;
  font-family: -apple-system, BlinkMacSystemFont, "Arial", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.wallet-phone-display {
  background: #090a0b;
  user-select: none;
  -webkit-user-select: none;
  -webkit-backface-visibility: hidden;
}
.wallet-phone-fallback {
  border: 4px solid #a39c90;
  background: #08090b;
  box-shadow: inset 0 0 0 1px #faf9f5a8, 2px 1px 0 #5e5b55, 0 13px 23px #25282416;
}
.wallet-phone-fallback::before,
.wallet-phone-fallback::after {
  content: "";
  position: absolute;
  width: 3px;
  border-radius: 2px;
  background: #8f8b82;
}
.wallet-phone-fallback::before { left: -6px; top: 20%; height: 13%; }
.wallet-phone-fallback::after { right: -6px; top: 28%; height: 12%; }
.wallet-phone-status {
  position: absolute;
  z-index: 4;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--wallet-status);
  padding: 2px 7% 0;
  color: #292b2e;
  background: transparent;
  pointer-events: none;
}
.wallet-phone-status [data-phone-time] {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.wallet-phone-island {
  position: absolute;
  left: 50%;
  top: 21%;
  width: 29%;
  max-width: 112px;
  height: 60%;
  border-radius: 30px;
  background: #050505;
  transform: translateX(-50%);
  box-shadow: inset 0 0 0 1px #171717;
}
.wallet-phone-island::after {
  content: "";
  position: absolute;
  right: 10%;
  top: 35%;
  width: 8%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #11141e;
  box-shadow: inset 0 0 0 2px #0c0d13;
}
.wallet-phone-indicators { display: flex; align-items: center; gap: 4px; }
.wallet-phone-indicators svg { width: 18px; height: 14px; fill: currentColor; }
.wallet-phone-indicators svg:last-child { width: 26px; }
.wallet-phone-desktop {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: calc(var(--wallet-status) + 32px);
  background: #fafafa;
  transform-origin: center;
}
.wallet-wallpaper {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #fafafa;
  pointer-events: none;
}
.wallet-wallpaper::before,
.wallet-wallpaper::after {
  content: "";
  position: absolute;
  inset: -3%;
  animation-play-state: paused;
}
.wallet-wallpaper::before {
  background: url("media/phone-white-silk.svg") center / cover no-repeat;
  animation: wallet-silk-drift 24s ease-in-out infinite alternate paused;
}
.wallet-wallpaper::after {
  inset: 35% -25% -10%;
  background: radial-gradient(ellipse at 50% 60%, #ffffffb8, #ffffff00 60%);
  animation: wallet-silk-light 18s ease-in-out infinite alternate paused;
}
.wallet-wallpaper[data-motion="running"]::before,
.wallet-wallpaper[data-motion="running"]::after { animation-play-state: running; }
@keyframes wallet-silk-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-1%, -1.4%, 0); }
}
@keyframes wallet-silk-light {
  from { transform: translate3d(-5%, 4%, 0); opacity: .3; }
  to { transform: translate3d(7%, -5%, 0); opacity: .75; }
}
.wallet-phone-clock {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #34363a;
}
.wallet-phone-clock [data-phone-date] { font-size: 17px; font-weight: 500; }
.wallet-phone-clock [data-phone-clock] {
  font-size: 86px;
  font-weight: 550;
  line-height: 1.2;
  letter-spacing: -.06em;
  font-variant-numeric: tabular-nums;
}
.wallet-phone-apps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  margin-top: 48px;
  padding: 0 18px;
}
.wallet-phone-apps > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0 0 8px;
  border: 0;
  background: none;
  color: #34363a;
  font: inherit;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.wallet-phone-apps img {
  display: block;
  flex: none;
  width: 66px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 22.5%;
  object-fit: contain;
  box-shadow: 0 2px 5px #00121d24;
  -webkit-user-drag: none;
}
.wallet-phone-apps > button:hover img { filter: brightness(1.08); }
.wallet-phone-apps > button:active img { filter: brightness(.85); }
.wallet-phone-apps > button:focus-visible { outline: 2px solid #34363a; outline-offset: 5px; border-radius: 14px; }
.wallet-page-dot {
  position: absolute;
  z-index: 1;
  bottom: calc(var(--wallet-home) + 28px);
  left: calc(50% - 3px);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #55585e;
}
.wallet-phone-app-window {
  position: absolute;
  z-index: 2;
  top: var(--wallet-status);
  bottom: var(--wallet-home);
  left: 0;
  right: 0;
  background: #101010;
  overflow: hidden;
  transform-origin: center;
}
.wallet-phone-content .wallet-phone-app-window #wallet-app { width: 100%; height: 100%; }
.wallet-phone-display[data-app="wallet"],
.wallet-phone-display[data-app="wallet"] .wallet-phone-status { background: #101010; color: #fff; }
.wallet-home-indicator {
  position: absolute;
  z-index: 5;
  bottom: 9px;
  left: 33%;
  width: 34%;
  height: 5px;
  border-radius: 5px;
  background: #34363a;
  pointer-events: none;
}
.wallet-phone-display[data-app] .wallet-home-indicator { display: none; }
.wallet-home-gesture {
  position: absolute;
  z-index: 5;
  bottom: 0;
  left: 0;
  display: grid;
  align-items: end;
  justify-items: center;
  width: 100%;
  height: var(--wallet-home);
  padding: 0;
  border: 0;
  background: #101010;
  cursor: pointer;
}
.wallet-home-gesture > span { width: 34%; height: 5px; margin-bottom: 9px; border-radius: 5px; background: #fff; }
.wallet-home-gesture:focus-visible { outline: 2px solid #aaa; outline-offset: -3px; }
.wallet-phone-cover {
  position: absolute;
  z-index: 9;
  inset: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.wallet-phone-cover:focus-visible { outline: 3px solid #ddd; outline-offset: -6px; }
.wallet-phone-scene[data-grab="held"] .wallet-phone-cover,
.wallet-phone-scene[data-grab="dragging"] .wallet-phone-cover { cursor: grabbing; }
.wallet-phone-desktop[hidden],
.wallet-phone-app-window[hidden],
.wallet-home-gesture[hidden],
.wallet-phone-cover[hidden] { display: none !important; }
html.wallet-phone-open, body.wallet-phone-open { overflow: hidden; }
body.wallet-phone-open .wallet-phone-canvas,
body.wallet-phone-open .wallet-phone-fallback { z-index: 1001; }
body.wallet-phone-open .wallet-phone-display { z-index: 1002; }
.wallet-phone-experience {
  --phone-shade: 1;
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, var(--phone-shade));
  color: #222;
  overflow: hidden;
  animation: none !important;
}
.wallet-phone-experience[open] { display: block; animation: none !important; }
.wallet-phone-experience::backdrop { background: rgba(255, 255, 255, var(--phone-shade)); }
.wallet-phone-experience-header {
  position: fixed;
  z-index: 1003;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 55px;
  padding: 7px 24px;
}
.wallet-phone-experience-header > button {
  display: flex;
  justify-self: start;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: #333;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.wallet-phone-experience-header > button:last-child { justify-self: end; }
.wallet-phone-experience-header > button[hidden] { visibility: hidden; display: flex !important; }
.wallet-phone-experience-header h2 { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.3; letter-spacing: 0; text-align: center; }
.wallet-phone-experience .wallet-phone-display,
.wallet-phone-display[data-device-phase="focused"] { user-select: auto; -webkit-user-select: auto; }
/* Older engines keep the live iframe in place, avoiding an authentication reload. */
.wallet-phone-experience[open]:not(:modal) {
  position: static;
  width: 0;
  height: 0;
  overflow: visible;
  background: transparent;
}
.wallet-phone-experience[open]:not(:modal)::before {
  content: "";
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(255, 255, 255, var(--phone-shade));
}
.wallet-ground-shadow { position: fixed; z-index: 0; height: 9px; border-radius: 50%; background: #26231f; pointer-events: none; }
@media (max-width: 700px) {
  .wallet-phone-experience-header { gap: 5px; padding: 7px 15px; }
  .wallet-phone-experience-header > button { gap: 5px; font-size: 12px; }
  .wallet-phone-experience-header h2 { font-size: 14px; }
}
@media (max-width: 359px) {
  .wallet-phone-experience-header > button { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .wallet-wallpaper::before,
  .wallet-wallpaper::after { animation: none; }
  .wallet-phone-content .loading-mark { animation: none; }
}

.wallet-phone-app-window[data-closed="true"] { visibility: hidden; pointer-events: none; }

/* Same physical device and studio materials as the social customization page. */
.wallet-phone-canvas { z-index: 3; }
body.wallet-phone-open .wallet-phone-canvas { z-index: 1003; }
.wallet-phone-experience-header { z-index: 1004; }
.wallet-phone-model-credit { margin: 24px 0 0; color: #777; font-size: 11px; line-height: 1.6; }
.wallet-phone-model-credit a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
