/* Public demo only (demo/client/demo.js): the thin top bar, the app nav the admin would draw, toasts, the save bar and
   the footer. The app's own pages are untouched. */
:root {
  --demo-ink: #1c1917;
  --demo-accent: #e07b5f;
  --demo-line: #e3e3e3;
}

/* The admin draws these outside the app's frame; demo.js draws its own. */
s-app-nav,
ui-save-bar {
  display: none !important;
}

.demo-head {
  position: sticky;
  top: 0;
  z-index: 50;
}
.demo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 6px 16px;
  background: var(--demo-ink);
  color: #f5f5f4;
  font: 500 13px/1.35 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.demo-top a {
  color: #fff;
  text-decoration: none;
}
.demo-top-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}
.demo-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #e7e5e4;
  white-space: nowrap;
}
.demo-install {
  font-weight: 650;
  text-decoration: underline !important;
  text-decoration-color: var(--demo-accent) !important;
  text-underline-offset: 3px;
}
.demo-how {
  white-space: nowrap;
  opacity: 0.85;
}
.demo-how:hover,
.demo-install:hover {
  opacity: 1;
  color: #fff;
}

.demo-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 6px 12px;
  background: #fff;
  border-bottom: 1px solid var(--demo-line);
  font: 550 13px/1.2 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.demo-nav::-webkit-scrollbar {
  display: none;
}
.demo-nav a {
  flex: none;
  padding: 7px 10px;
  border-radius: 8px;
  color: #303030;
  text-decoration: none;
  white-space: nowrap;
}
.demo-nav a:hover {
  background: #f1f1f1;
}
.demo-nav a[aria-current='page'] {
  background: #ebebeb;
  color: #000;
}

.demo-foot {
  padding: 20px 16px 72px;
  color: #616161;
  font: 400 12px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  text-align: center;
}

.demo-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1000;
  max-width: min(92vw, 420px);
  padding: 10px 16px;
  border-radius: 10px;
  background: #1a1a1a;
  color: #fff;
  font: 500 14px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s;
}
.demo-toast-on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.demo-toast-error {
  background: #8e1f0b;
}

.demo-savebar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
  padding: 6px 16px;
  background: #1a1a1a;
  color: #fff;
  font: 550 13px/1.3 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.demo-savebar-on {
  display: flex;
}
.demo-savebar-actions {
  display: flex;
  gap: 8px;
}
.demo-savebar button {
  padding: 5px 12px;
  border: 1px solid #5c5c5c;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.demo-savebar button.demo-primary {
  border-color: #fff;
  background: #fff;
  color: #1a1a1a;
}

@media (max-width: 480px) {
  .demo-top {
    padding: 6px 12px;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .demo-toast {
    transition: none;
  }
}
