/* Cloud Level product demos (com.express, com.chat) — used by demo-core.js.
   Mirrors Figma frames "com.express animation — motion" (401:2) and "com.chat animation — motion" (413:2).
   Stage is authored at 1100 × 1000 design px and scaled to fit its container. */

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Work Sans";
  src: url("fonts/work-sans.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

.xd {
  --xd-blue-500: #0082ba;
  --xd-blue-600: #006895;
  --xd-grey-50: #ebebeb;
  --xd-grey-100: #e1e2e2;
  --xd-grey-500: #929497;
  --xd-grey-600: #757679;
  --xd-grey-800: #3a3b3c;
  --xd-grey-900: #1d1e1e;
  --xd-sidebar: #648fb7;
  --xd-accent: #367faf;
  --xd-success: #086300;
  position: relative;
  width: 100%;
  overflow: hidden;
  aspect-ratio: var(--xd-aspect, 1.1);
  -webkit-font-smoothing: antialiased;
}
.xd-stage {
  position: absolute;
  left: 0; top: 0;
  width: 1100px; height: 1000px;
  transform-origin: 0 0;
  transform: scale(var(--xd-scale, 1)) translate(var(--xd-tx, 0px), var(--xd-ty, 0px));
  font-family: "Work Sans", system-ui, sans-serif;
  color: var(--xd-grey-900);
  text-align: left; /* stage ignores page alignment */
  background: var(--xd-stage-bg, var(--xd-grey-50));
}
.xd-stage * { box-sizing: border-box; margin: 0; }
.xd-abs { position: absolute; }

/* Dark pages: stage blends into the page, chat labels stay readable */
.xd-dark .xd-stage { background: transparent; }
.xd-dark .xd-label { color: #93c7dd; }

/* ---------- Chat ---------- */
.xd-chat { position: absolute; left: 270px; top: 252px; width: 560px; height: 496px; }
.xd-label { position: absolute; top: 0; font-size: 14px; line-height: 1.3; font-weight: 500; color: var(--xd-grey-600); }
.xd-label.right { right: 0; top: 104px; }
.xd-bubble {
  position: absolute;
  padding: 12px 20px;
  border-radius: 20px;
  font-size: 18px; line-height: 1.3;
  white-space: nowrap;
}
.xd-bubble.them { left: 0; background: #fff; border-bottom-left-radius: 6px; box-shadow: 0 4px 14px rgba(0, 26, 38, 0.10); }
.xd-bubble.me { right: 0; background: var(--xd-blue-500); color: #fff; border-bottom-right-radius: 6px; }
.xd-typing { padding: 16px 18px; display: flex; gap: 6px; }
.xd-typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--xd-grey-500); display: block; }
.xd-typing.me i { background: rgba(255, 255, 255, 0.85); }
.xd-heart { position: absolute; left: -14px; top: -12px; width: 28px; height: 28px; }

.xd-card {
  position: absolute; right: 0; top: 196px;
  width: 360px; height: 272px;
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 26, 38, 0.14);
}
.xd-card-preview { position: absolute; left: 0; top: 0; width: 360px; height: 196px; overflow: hidden; background: var(--xd-grey-100); }
.xd-card-preview .xd-screen { transform: scale(0.36); }
.xd-card-meta { position: absolute; left: 0; top: 196px; padding: 14px 18px; }
.xd-card-title { font-size: 17px; line-height: 1.3; font-weight: 500; }
.xd-card-url { margin-top: 4px; font-size: 15px; line-height: 1.3; color: var(--xd-grey-600); }
.xd-card-url b { font-weight: 400; color: var(--xd-blue-500); }

/* ---------- Product window ---------- */
.xd-window {
  position: absolute; left: 200px; top: 66px; width: 700px; height: 868px;
  filter: drop-shadow(0 16px 40px rgba(0, 26, 38, 0.18));
}
.xd-window > .xd-screen { transform: scale(0.7); }

/* One express payment page, 1000 × 1240 (Figma screens 01–04) */
.xd-screen {
  position: absolute; left: 0; top: 0;
  width: 1000px; height: 1240px;
  transform-origin: 0 0;
  background: #fff; overflow: hidden;
}
.xd-screen p, .xd-screen span { position: absolute; }
.xd-accent { left: 0; top: 0; width: 1000px; height: 8px; background: var(--xd-accent); }
.xd-side { left: 0; top: 8px; width: 416px; height: 1140px; background: var(--xd-sidebar); color: #fff; }
.xd-h5 { font-family: "Montserrat", sans-serif; font-weight: 400; font-size: 32px; line-height: 40px; }
.xd-h6 { font-family: "Montserrat", sans-serif; font-weight: 400; font-size: 24px; line-height: 28px; }
.xd-lg { font-size: 20px; line-height: 24px; }
.xd-md { font-size: 16px; line-height: 20px; }
.xd-cap { color: var(--xd-grey-800); }
.xd-blue { color: var(--xd-blue-500); }
.xd-right { text-align: right; }
.xd-networks { position: absolute; left: 24px; top: 182px; width: 264px; height: 37px; }
.xd-biz { left: 416px; top: 8px; width: 584px; height: 242px; }
.xd-rule { position: absolute; background: var(--xd-grey-100); height: 1px; }
.xd-content { left: 416px; top: 250px; width: 584px; height: 898px; }
.xd-field { position: absolute; left: 16px; width: 552px; height: 70px; }
.xd-field .xd-line { position: absolute; left: 0; top: 66px; width: 552px; height: 3px; background: var(--xd-blue-600); }
.xd-option { position: absolute; top: 178px; width: 248px; height: 152px; border: 1px solid var(--xd-grey-100); border-radius: 1px; }
.xd-bar { position: absolute; left: 16px; width: 552px; height: 3px; background: var(--xd-blue-600); }
.xd-summary { position: absolute; left: 16px; top: 382px; width: 552px; height: 140px; background: var(--xd-grey-50); }
.xd-btn { position: absolute; height: 42px; border-radius: 8px; background: var(--xd-blue-600); color: #fff; }
.xd-btn p { left: 0; right: 0; top: 8px; text-align: center; }
.xd-chip { position: absolute; left: 420px; top: 28px; width: 132px; height: 26px; background: var(--xd-blue-600); color: #fff; }
.xd-partners { left: 0; top: 1148px; width: 1000px; height: 92px; background: var(--xd-blue-500); }
.xd-badge { position: absolute; left: 322px; top: 25px; width: 354px; height: 42px; }
.xd-glyph { font-family: "Work Sans", "Segoe UI Symbol", "Apple Symbols", system-ui, sans-serif; }
.xd-pre { white-space: pre; }
.xd-success { font-family: "Montserrat", sans-serif; font-weight: 700; font-size: 32px; line-height: 40px; color: var(--xd-success); }

/* Static thumbnail of screen 01 inside the link card */
.xd-card-preview .xd-after,
.xd-card-preview .xd-typed { visibility: hidden; }

/* ---------- com.chat page ---------- */
.xc .xc-msg {
  position: absolute;
  padding: 14px 18px; border-radius: 8px;
  font-size: 20px; line-height: 24px;
}
.xc .xc-msg.ai { left: 16px; width: 436px; background: var(--xd-grey-50); color: var(--xd-grey-900); }
.xc .xc-msg.me { right: 16px; white-space: nowrap; background: var(--xd-blue-600); color: #fff; }
.xc .xc-msg b { font-weight: 400; color: var(--xd-blue-500); }
.xc .xc-dots { width: 72px; padding: 22px 18px; display: flex; gap: 6px; }
.xc .xc-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--xd-grey-500); display: block; }
.xc .xc-dist {
  position: absolute; left: 50%; top: 25px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; color: #fff;
}
.xc .xc-dist span { position: static; font-size: 14px; line-height: 18px; font-weight: 500; white-space: nowrap; }
.xc .xc-dist img { height: 57px; width: auto; margin: -8px -10px -7px -10px; filter: brightness(0) invert(1); }
