/* ══════════════════════════════════════════════════
   Portfolio demo layer: sample-data badge and guided tour.
   Built on the app's own tokens from styles.css.
   ══════════════════════════════════════════════════ */

/* ── Sample-data badge (footer) ─────────────────── */

.footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px solid var(--border-accent);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  white-space: nowrap;
  cursor: default;
}

.demo-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--amber);
}

/* ── Tab bar at the embed width ─────────────────── */
/* The portfolio shows this page at 1280px. The original tab bar needs about
   1410px, so SUMMARY sits off-screen behind a hidden scrollbar. Tighter tab
   padding fits all 11 tabs from about 1240px; below that the bar scrolls as before. */
@media (min-width: 769px) and (max-width: 1439px) {
  .tab { padding: 0 9px; gap: 4px; }
  .tab-key { margin-left: 2px; }
}

/* ── Start button ───────────────────────────────── */

.demo-start {
  position: fixed;
  right: 20px;
  bottom: 48px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 12px;
  background: var(--green);
  color: #0a0a0a;
  border: none;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(54, 253, 90, 0.22), 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s, box-shadow 0.15s;
}

.demo-start:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(54, 253, 90, 0.32), 0 2px 8px rgba(0, 0, 0, 0.5);
}

.demo-start:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 3px;
}

.demo-start[hidden] {
  display: none;
}

.demo-start-icon {
  font-size: 10px;
}

.demo-start-meta {
  padding-left: 8px;
  border-left: 1px solid rgba(10, 10, 10, 0.25);
  font-size: 10px;
  font-weight: 500;
  opacity: 0.7;
}

/* ── Tour panel ─────────────────────────────────── */

.demo-tour {
  position: fixed;
  right: 20px;
  bottom: 48px;
  z-index: 45;
  width: min(410px, calc(100vw - 32px));
  padding: 14px 18px 14px;
  background: rgba(17, 17, 17, 0.97);
  border: 1px solid var(--green-border);
  border-radius: var(--radius);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.65), 0 0 24px rgba(54, 253, 90, 0.06);
  animation: demoTourIn 0.25s ease-out;
}

.demo-tour[hidden] {
  display: none;
}

.demo-tour-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.demo-tour-step {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--green);
}

.demo-tour-close {
  padding: 2px 6px;
  background: none;
  border: none;
  border-radius: 4px;
  color: var(--text-tertiary);
  font-size: 12px;
  cursor: pointer;
}

.demo-tour-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.demo-tour-title {
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--text-primary);
}

.demo-tour-text {
  min-height: 66px;
  margin-bottom: 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.demo-tour-text b {
  color: var(--text-primary);
  font-weight: 600;
}

.demo-tour-text .sig-green { color: var(--green); font-weight: 600; }
.demo-tour-text .sig-amber { color: var(--amber); font-weight: 600; }
.demo-tour-text .sig-red { color: var(--red); font-weight: 600; }

.demo-tour-foot {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-tour-dots {
  display: flex;
  gap: 5px;
  margin-right: auto;
}

.demo-tour-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.2s;
}

.demo-tour-dots span.done { background: rgba(54, 253, 90, 0.45); }
.demo-tour-dots span.on { background: var(--green); }

.demo-tour-btn {
  padding: 7px 14px;
  background: var(--green);
  color: #0a0a0a;
  border: 1px solid var(--green);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: opacity 0.2s;
}

.demo-tour-btn:hover {
  opacity: 0.9;
}

.demo-tour-btn.ghost {
  background: none;
  color: var(--text-tertiary);
  border-color: var(--border-accent);
}

.demo-tour-btn.ghost:hover {
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.25);
}

.demo-tour-btn[disabled] {
  opacity: 0.35;
  cursor: default;
}

.demo-tour-btn:focus-visible,
.demo-tour-close:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 2px;
}

/* Spotlight on the part of the screen that the current step explains */
.demo-focus {
  outline: 2px solid var(--green);
  outline-offset: 4px;
  border-radius: var(--radius);
  box-shadow: 0 0 0 9px rgba(54, 253, 90, 0.07), 0 0 36px rgba(54, 253, 90, 0.16);
  animation: demoFocusIn 0.5s ease-out;
}

@keyframes demoTourIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes demoFocusIn {
  from { outline-color: transparent; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-tour,
  .demo-focus { animation: none; }
  .demo-start { transition: none; }
}

@media (max-width: 640px) {
  .demo-start,
  .demo-tour { right: 12px; bottom: 44px; }
  .demo-start-meta { display: none; }
  .footer-left { display: none; }
}
