/* Owner-review demo walkthrough. Loaded only when Demo:Enabled is true. */
.demo-banner {
  background: #fff3cd;
  color: #3d2e00;
  border-bottom: 1px solid #e0c46c;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  text-align: center;
}

.demo-launch {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 1000;
  min-height: 3rem;
  padding: 0 1.25rem;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #1b4f9c;
  color: #ffffff;
  font: 700 1rem/1 system-ui, "Segoe UI", Arial, sans-serif;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.demo-launch.demo-launch-inline {
  position: static;
  margin-left: 0.75rem;
  min-height: 2.5rem;
  border-color: #1b4f9c;
  box-shadow: none;
  vertical-align: middle;
}

.demo-panel {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1001;
  width: min(26rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: #1b1b1b;
  border: 2px solid #1b4f9c;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  font: 400 0.95rem/1.45 system-ui, "Segoe UI", Arial, sans-serif;
}

.demo-panel[hidden],
.demo-launch[hidden] {
  display: none;
}

.demo-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #1b4f9c;
  color: #ffffff;
  border-radius: 9px 9px 0 0;
}

.demo-tabs {
  display: flex;
  border-bottom: 1px solid #d0d7e2;
}

.demo-tab {
  flex: 1;
  min-height: 2.75rem;
  border: 0;
  background: #f2f5fa;
  color: #1b1b1b;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.demo-tab[aria-selected="true"] {
  background: #ffffff;
  border-bottom: 3px solid #1b4f9c;
}

.demo-body {
  overflow-y: auto;
  padding: 0.75rem 1rem;
}

.demo-body h2 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.2rem;
}

.demo-body h3 {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.95rem;
}

.demo-body p,
.demo-body ol,
.demo-body ul {
  margin: 0 0 0.5rem;
}

.demo-progress {
  font-size: 0.85rem;
  color: #4a5160;
}

.demo-progress-bar {
  height: 6px;
  background: #e3e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.demo-progress-fill {
  display: block;
  height: 100%;
  background: #1b4f9c;
}

.demo-status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid currentColor;
}

.demo-status-verified { color: #155724; background: #e6f4ea; }
.demo-status-partial { color: #6b4a00; background: #fff4d6; }
.demo-status-simulated { color: #1b4f9c; background: #e8f0fb; }
.demo-status-blocked { color: #8a1c1c; background: #fdecec; }
.demo-status-missing { color: #4a4a4a; background: #eeeeee; }

.demo-role,
.demo-note {
  font-size: 0.9rem;
  color: #3f4652;
  background: #f2f5fa;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
}

.demo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.demo-button,
.demo-icon {
  min-height: 2.75rem;
  padding: 0 0.9rem;
  border: 1px solid #1b4f9c;
  border-radius: 8px;
  background: #ffffff;
  color: #1b4f9c;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.demo-icon {
  min-height: 2.25rem;
  background: transparent;
  color: #ffffff;
  border-color: #ffffff;
}

.demo-primary,
.demo-selected {
  background: #1b4f9c;
  color: #ffffff;
}

.demo-button:disabled {
  opacity: 0.45;
  cursor: default;
}

.demo-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-top: 1px solid #d0d7e2;
}

.demo-review textarea {
  width: 100%;
  font: inherit;
  margin-top: 0.25rem;
}

.demo-checklist {
  list-style: none;
  padding: 0;
}

.demo-checklist li {
  padding: 0.35rem 0;
  border-bottom: 1px solid #e3e8f0;
}

.demo-checklist li.demo-current {
  background: #f2f5fa;
}

.demo-link {
  background: none;
  border: 0;
  padding: 0.25rem 0;
  color: #1b4f9c;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  min-height: 2.25rem;
}

.demo-meta {
  display: block;
  font-size: 0.85rem;
  color: #4a5160;
}

.demo-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.demo-spotlight {
  outline: 4px solid #1b4f9c !important;
  outline-offset: 4px;
  box-shadow: 0 0 0 9999px rgba(10, 20, 40, 0.35) !important;
  position: relative;
  z-index: 999;
  border-radius: 4px;
}

.demo-panel :focus-visible,
.demo-launch:focus-visible {
  outline: 3px solid #f0a500;
  outline-offset: 2px;
}

@media (max-width: 40rem) {
  .demo-panel {
    left: 0.5rem;
    right: 0.5rem;
    bottom: 0.5rem;
    width: auto;
    max-height: 60vh;
  }

  .demo-panel.demo-collapsed {
    max-height: none;
  }

  .demo-launch {
    left: 0.5rem;
    bottom: 0.5rem;
  }
}
