/* ============================================
   Demo Tutorial — interactive guided tour
   Session #136
   ============================================ */

/* Dimming overlay that covers everything except the spotlighted element */
.demo-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: transparent;
  pointer-events: auto;
}

/* The spotlighted element: raised above overlay, dark ring cut around it */
.demo-spotlight {
  position: relative;
  z-index: 99992 !important;
  box-shadow: 0 0 0 4px var(--accent, #6c5ce7),
              0 0 0 9999px rgba(0, 0, 0, 0.62) !important;
  border-radius: 8px;
  transition: box-shadow 0.25s ease;
  animation: demoPulse 1.8s ease-in-out infinite;
}

@keyframes demoPulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--accent, #6c5ce7), 0 0 0 9999px rgba(0,0,0,0.62); }
  50%      { box-shadow: 0 0 0 7px var(--accent, #6c5ce7), 0 0 0 9999px rgba(0,0,0,0.62); }
}

/* When a step requires the user to interact with the highlighted element */
.demo-spotlight.demo-interactive {
  pointer-events: auto !important;
}

/* Tooltip card */
.demo-tooltip {
  position: fixed;
  z-index: 99995;
  width: 340px;
  max-width: calc(100vw - 24px);
  background: var(--bg-card, #1e1e2e);
  color: var(--text-primary, #eee);
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  padding: 16px 18px;
  animation: demoFadeIn 0.25s ease;
}

@keyframes demoFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.demo-tooltip-progress {
  font-size: 11px;
  color: var(--text-secondary, #aaa);
  margin: 0 0 6px;
  letter-spacing: 0.3px;
}

.demo-tooltip-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.demo-tooltip-text {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary, #ccc);
}

.demo-tooltip-text b { color: var(--text-primary, #fff); }

.demo-tooltip-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.demo-btn {
  padding: 9px 16px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
}
.demo-btn-primary { background: var(--accent, #6c5ce7); color: #fff; flex: 1; min-width: 110px; }
.demo-btn-primary:hover { opacity: 0.9; }
.demo-btn-ghost {
  background: transparent;
  color: var(--text-secondary, #aaa);
  border: 1px solid var(--border, rgba(255,255,255,0.15));
}
.demo-btn-ghost:hover { color: var(--text-primary, #fff); }

.demo-btn-exit {
  background: transparent;
  color: var(--text-secondary, #888);
  border: 1px solid transparent;
  font-weight: 500;
  font-size: 13px;
}
.demo-btn-exit:hover { color: #e74c3c; }

.demo-tooltip-close {
  position: absolute;
  top: 8px; right: 10px;
  background: none; border: none;
  color: var(--text-secondary, #888);
  font-size: 20px; line-height: 1;
  cursor: pointer;
}
.demo-tooltip-close:hover { color: var(--text-primary, #fff); }

/* Waiting hint for interactive steps */
.demo-tooltip-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--accent, #6c5ce7);
  font-weight: 600;
}

/* Centered modal (welcome / stage prompt / finish) */
.demo-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 99996;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: demoFadeIn 0.25s ease;
}
.demo-modal {
  width: 92vw;
  max-width: 420px;
  background: var(--bg-card, #1e1e2e);
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  padding: 28px 24px 24px;
  text-align: center;
}
.demo-modal-logo { width: 56px; height: 56px; margin-bottom: 10px; border-radius: 12px; }
.demo-modal h2 { margin: 0 0 8px; font-size: 22px; font-weight: 700; }
.demo-modal p { margin: 0 0 18px; font-size: 15px; line-height: 1.5; color: var(--text-secondary, #ccc); text-align: left; }
.demo-modal ul { text-align: left; margin: 0 0 18px; padding-left: 20px; color: var(--text-secondary, #ccc); font-size: 14px; line-height: 1.7; }
.demo-modal-actions { display: flex; flex-direction: column; gap: 10px; }
.demo-modal-actions .demo-btn { width: 100%; }

/* Mobile: tooltip fixed to bottom above nav */
@media (max-width: 768px) {
  .demo-tooltip {
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    bottom: 66px !important;
    top: auto !important;
  }
}
