/* Public marketing demos: /demo/care, /demo/rota, /demo/hr, /demo/governance, /demo/tour.php, /demo/rota-tools.php */

/* Calm strip — matches in-app demo banner tone (buyer-friendly, not alarm-bar) */
.demo-banner {
  padding: var(--tb-space-3, 12px) var(--tb-space-4, 16px);
  background: linear-gradient(90deg, var(--tb-surface-subtle, #f0f4f5) 0%, var(--tb-bg, #f6f8f9) 100%);
  color: var(--tb-ink-secondary, #334155);
  border-bottom: 1px solid var(--tb-line, #e2e8f0);
  font-size: var(--tb-text-sm, 0.8125rem);
  line-height: 1.45;
  font-weight: 600;
}

.demo-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 14px;
  text-align: center;
}

.demo-banner-meta {
  color: var(--tb-muted, #64748b);
  font-weight: 500;
}

.demo-banner a {
  color: var(--tb-brand, #0d9488);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.demo-banner a:hover {
  color: var(--tb-brand-hover, #0f766e);
}

.demo-public-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 20px 28px;
}

.demo-public-panel,
.demo-hero-card,
.demo-help-fab,
.demo-help-panel,
.demo-sticky-cta,
.demo-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.demo-hero-card,
.demo-card {
  padding: 16px;
}

.demo-hero-grid,
.demo-grid {
  display: grid;
  gap: 14px;
}

.demo-hero-grid {
  grid-template-columns: 1.1fr 0.9fr;
}

.demo-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.demo-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.demo-tabs a {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-weight: 700;
}

.demo-tabs a.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.demo-inline-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  margin-top: 20px;
  padding: 12px 16px;
  background: #fafcfc;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.demo-inline-cta-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.demo-inline-cta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.demo-help-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  padding: 14px 16px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  border: none;
}

.demo-help-panel {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 61;
  width: min(420px, calc(100vw - 32px));
  padding: 18px;
  display: none;
}

.demo-help-panel.open {
  display: block;
}

.demo-help-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.demo-help-item {
  padding: 12px;
  border-radius: 14px;
  background: #fafcfc;
  border: 1px solid var(--line);
}

.demo-help-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.demo-sticky-cta {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  z-index: 62;
  width: min(1100px, calc(100vw - 24px));
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
}

.demo-cta-copy {
  display: grid;
  gap: 4px;
}

.demo-cta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Guided tour (/demo/tour.php) */
.tour-main,
.tour-step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.tour-wrap {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 18px;
}

.tour-step-list {
  display: grid;
  gap: 16px;
}

.tour-step-num {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  flex: 0 0 auto;
}

.tour-step-row {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  align-items: start;
}

/* Rota tools demo */
.demo-rota-tools-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.demo-rota-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.demo-rota-field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.demo-rota-input,
.demo-rota-field textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.demo-rota-preview {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafcfc;
  padding: 18px;
}

.demo-rota-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 900px) {
  .demo-hero-grid,
  .demo-grid {
    grid-template-columns: 1fr;
  }

  .demo-sticky-cta {
    flex-direction: column;
    align-items: stretch;
  }

  .demo-help-fab {
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: max(18px, env(safe-area-inset-bottom, 0px));
  }

  .demo-help-panel {
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: 78px;
  }

  .tour-wrap {
    grid-template-columns: 1fr;
  }

  .demo-rota-grid {
    grid-template-columns: 1fr;
  }

  .demo-public-wrap {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
}

@media (max-width: 639px) {
  .demo-sticky-cta {
    width: calc(100vw - 20px);
    padding: 14px 14px max(14px, env(safe-area-inset-bottom, 0px));
  }

  .demo-tabs a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

@media print {
  .demo-rota-actions,
  .topbar,
  .demo-banner,
  .footer {
    display: none;
  }

  .demo-rota-card {
    border: 0;
    box-shadow: none;
    padding: 0;
  }
}
