/* The live demo in a marketing page's window (landing.html, landing/stores.html): the sample
   dashboard in a frame, and the bar of its parts under it. Each page defines the color tokens. */
/* Live demo in the hero window */
.window.demo {
  display: flex;
  flex-direction: column;
  /* The same corner as the graph card inside it. */
  border-radius: 18px;
}
.demo-frame {
  display: block;
  width: 100%;
  /* About the sample dashboard's own height (813 to 866px from phone to desktop), so the
     window barely moves when the script below fits it exactly, and it never scrolls. */
  height: 860px;
  border: 0;
  background: var(--bg);
  /* Hidden while the dashboard loads, so its splash never shows; once it is sized to the
     dashboard, the dashboard's parts arrive top to bottom (DemoSelfDriving). */
  opacity: 0;
  transition: opacity 150ms ease;
}
@media (max-width: 520px) {
  .demo-frame {
    height: 820px;
  }
}
.window.demo.ready .demo-frame {
  opacity: 1;
}
/* The demo's parts, under it: the one playing fills as it plays, and a press starts one. It
   stays in view while the demo is taller than the screen. */
.demo-parts {
  position: sticky;
  bottom: 20px;
  z-index: 3;
  display: flex;
  gap: 2px;
  width: fit-content;
  max-width: 100%;
  margin: -30px auto 0;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: color-mix(in srgb, var(--popover) 86%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 18px 40px -16px rgba(0, 0, 0, 0.55);
  transition: opacity 150ms ease;
}
.window.demo:not(.ready) + .demo-parts {
  visibility: hidden;
  opacity: 0;
}
.demo-parts button {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--fg-3);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    color 150ms ease,
    background-color 150ms ease,
    transform 150ms cubic-bezier(0.23, 1, 0.32, 1);
}
.demo-parts button:active {
  transform: scale(0.97);
}
.demo-parts button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.demo-parts button[aria-current="step"] {
  background: var(--selected);
  color: var(--fg);
}
.demo-parts svg {
  flex: none;
  width: 16px;
  height: 16px;
}
.demo-parts .fill {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--selected);
  transform: scaleX(0);
  transform-origin: left;
}
@media (hover: hover) {
  .demo-parts button:hover {
    color: var(--fg);
  }
}
@media (max-width: 520px) {
  .demo-parts button {
    gap: 6px;
    padding: 0 12px;
    font-size: 14px;
  }
}
.demo-note {
  margin: 14px 0 0;
  color: var(--fg-3);
  font-size: 14px;
  text-align: center;
}
