/* ─── Onboarding Wizard ───────────────────────────────────────────────────── */

.wizard-overlay {
  position: fixed;
  inset: 0;
  z-index: 50000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.wizard-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Dark backdrop with SVG cutout */
.wizard-backdrop {
  position: absolute;
  inset: 0;
  transition: opacity 0.3s ease;
}

/* Spotlight glow ring */
.wizard-spotlight {
  position: absolute;
  border-radius: 10px;
  box-shadow: 0 0 0 4px rgba(79, 158, 255, 0.35), 0 0 24px 4px rgba(79, 158, 255, 0.15);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 50001;
}

/* Dialog tooltip */
.wizard-dialog {
  position: absolute;
  z-index: 50002;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(79, 158, 255, 0.08);
  overflow: hidden;
  opacity: 0;
  transform: translateY(8px) scale(0.97);
  transition: opacity 0.3s ease 0.1s, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}
.wizard-dialog.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Centered mode (welcome/done) */
.wizard-dialog.centered {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.97);
  width: 420px;
}
.wizard-dialog.centered.visible {
  transform: translate(-50%, -50%) scale(1);
}

/* Arrow/pointer */
.wizard-arrow {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  transform: rotate(45deg);
  z-index: -1;
}
.wizard-arrow.arrow-top {
  top: -7px;
  left: 32px;
  border-bottom: none;
  border-right: none;
}
.wizard-arrow.arrow-bottom {
  bottom: -7px;
  left: 32px;
  border-top: none;
  border-left: none;
}
.wizard-arrow.arrow-left {
  left: -7px;
  top: 24px;
  border-bottom: none;
  border-right: none;
}
.wizard-arrow.arrow-right {
  right: -7px;
  top: 24px;
  border-top: none;
  border-left: none;
}

/* Dialog header */
.wizard-dialog-header {
  padding: 18px 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.wizard-step-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(79, 158, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.wizard-step-title {
  font-size: 15px;
  font-weight: 700;
  color: #e5e5e5;
  line-height: 1.3;
}

/* Dialog body */
.wizard-dialog-body {
  padding: 12px 20px 0;
  font-size: 13px;
  line-height: 1.6;
  color: #9ca3af;
}

/* Progress bar */
.wizard-progress {
  margin: 16px 20px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.wizard-progress-bar {
  flex: 1;
  height: 3px;
  background: #242424;
  border-radius: 2px;
  overflow: hidden;
}
.wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f9eff, #7bb8ff);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.wizard-progress-text {
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Dialog footer */
.wizard-dialog-footer {
  padding: 14px 20px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.wizard-btn {
  padding: 8px 18px;
  border-radius: 8px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}
.wizard-btn-primary {
  background: #4f9eff;
  color: white;
}
.wizard-btn-primary:hover {
  background: #3b8bef;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 158, 255, 0.3);
}
.wizard-btn-secondary {
  background: transparent;
  color: #6b7280;
  padding: 8px 12px;
}
.wizard-btn-secondary:hover {
  color: #9ca3af;
  background: rgba(255, 255, 255, 0.04);
}
.wizard-btn-finish {
  background: linear-gradient(135deg, #4f9eff, #7b68ee);
  color: white;
  padding: 10px 24px;
  font-size: 13px;
}
.wizard-btn-finish:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79, 158, 255, 0.35);
}
.wizard-footer-left {
  display: flex;
  gap: 4px;
}
.wizard-footer-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Welcome/Done special styling */
.wizard-welcome-emoji {
  font-size: 40px;
  display: block;
  text-align: center;
  margin-bottom: 4px;
}

/* Restart Tour button in settings */
.wizard-restart-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(79, 158, 255, 0.08);
  border: 1px solid rgba(79, 158, 255, 0.2);
  border-radius: 8px;
  color: #4f9eff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
  justify-content: center;
  font-family: inherit;
}
.wizard-restart-btn:hover {
  background: rgba(79, 158, 255, 0.15);
  border-color: #4f9eff;
}

/* Mobile */
@media (max-width: 640px) {
  .wizard-dialog {
    width: calc(100vw - 24px);
    border-radius: 12px;
  }
  .wizard-dialog.centered {
    width: calc(100vw - 24px);
  }
  .wizard-step-title {
    font-size: 14px;
  }
  .wizard-dialog-body {
    font-size: 12px;
  }
}
