/* === DEMO MODE STYLES === */
/* Styles specific to the demo shell page (demo.html) */

/* --- Demo banner --- */
/* A wrapping row: back link at inline-start, text in the middle, buy button
   at inline-end. The links are shown only on the full-screen demo. */
.demo-banner {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.5rem 1rem;
  background: color-mix(in srgb, var(--color-primary) 88%, white);
  color: #fff;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  backdrop-filter: blur(8px);
}

.demo-banner-text {
  flex: 1;
  text-align: center;
}

.demo-banner-back {
  color: var(--color-text-inverse);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-block-size: 2rem;
}

/* The chevron points to inline-start, so it turns with the reading direction. */
[dir="rtl"] .demo-banner-back svg {
  transform: scaleX(-1);
}

.demo-banner-buy {
  font-size: 0.8125rem;
  padding: 0.25rem 1rem;
  min-block-size: 2rem;
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--color-text-inverse);
  box-shadow: none;
}

/* An author display rule beats the browser's own hidden rule, so hidden is
   restated here; without it the links would show inside the landing page's
   frame. */
.demo-banner-back[hidden], .demo-banner-buy[hidden] { display: none; }

.demo-banner a:focus-visible {
  outline: 2px solid var(--color-text-inverse);
  outline-offset: 2px;
}

[data-theme="dark"] .demo-banner {
  background: color-mix(in srgb, var(--color-primary) 70%, black);
}

/* On narrow screens the two links share the first row and the text takes its
   own row below them. */
@media (max-width: 640px) {
  .demo-banner-text {
    order: 3;
    flex-basis: 100%;
  }
}

/* --- Hide backup/install banners in demo mode --- */
body[data-demo="true"] #backupBanner {
  display: none !important;
}

body[data-demo="true"] #ios-install-banner {
  display: none !important;
}

/* --- Compact layout for iframe embedding --- */
body[data-demo="true"] {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body[data-demo="true"] .app-shell {
  padding: 0;
}

body[data-demo="true"] .container {
  padding-inline: 0.75rem;
  padding-block-start: 0;
}
