/* ================================================
   Guided Wizard — POS PRO MAX by WEMAKE
   Spotlight/tooltip guidance overlay + sidebar Help
================================================ */

/* -------- Wizard overlay -------- */
.wizard-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 14, 23, 0.65);
  animation: wizardFadeIn 0.3s ease;
}
.wizard-overlay.hidden { display: none !important; }
/* Keep the rest of the desktop app dimmed while a sidebar item is highlighted. */
.wizard-overlay.wizard-overlay--sidebar-spotlight { background: rgba(10, 14, 23, 0.65); }

/* -------- Spotlight on highlighted element -------- */
.wizard-spotlight-active {
  position: relative !important;
  z-index: 2100 !important;
  box-shadow: 0 0 0 4px var(--accent), 0 0 0 9999px rgba(10, 14, 23, 0.65) !important;
  border-radius: 8px !important;
  transition: box-shadow 0.3s ease !important;
}

/* The fixed sidebar creates its own stacking context. Elevate it while it is
   the guide target so its spotlight remains above the backdrop on desktop. */
.sidebar.wizard-sidebar-active {
  z-index: 2100 !important;
}
.sidebar.wizard-sidebar-active .wizard-spotlight-active {
  z-index: 2101 !important;
}

@media (prefers-reduced-motion: reduce) {
  .wizard-overlay,
  .wizard-tooltip,
  .wizard-spotlight-active {
    animation: none;
    transition: none !important;
  }
}

/* -------- Tooltip -------- */
.wizard-tooltip {
  position: fixed;
  z-index: 2200;
  max-width: 420px;
  width: calc(100vw - 32px);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  animation: wizardFadeUp 0.25s ease;
}
.wizard-tooltip.hidden { visibility: hidden !important; pointer-events: none !important; }
.wizard-tooltip-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
}
.wizard-step-indicator {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.95;
}
.wizard-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background 0.2s;
}
.wizard-close:hover { background: rgba(255, 255, 255, 0.18); }

.wizard-tooltip-body { padding: 16px 18px 12px; }
.wizard-tooltip-body h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}
.wizard-tooltip-body p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.wizard-tooltip-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 14px;
  gap: 8px;
}
.wizard-nav-btns { display: flex; gap: 8px; }
.wizard-nav-btns .btn,
.wizard-tooltip-footer .btn { padding: 8px 14px; font-size: 12px; }

.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px 14px;
}
.wizard-progress-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.25s;
}
.wizard-progress-dot.active {
  background: var(--accent);
  transform: scale(1.25);
}
.wizard-progress-dot.done { background: var(--success); }

/* -------- Anonymous mode (pointer blocking handled by overlay) -------- */
.wizard-overlay { pointer-events: auto; }
.wizard-tooltip { pointer-events: auto; }

/* Passive mode: used when a setup modal is open so the user can interact
   with the real form fields. Fully transparent, non-blocking, no dimming. */
.wizard-overlay.wizard-overlay--passive {
  pointer-events: none;
  background: transparent;
}

/* -------- Sidebar Help button -------- */
.sidebar-help {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 12px;
  flex-shrink: 0;
}
.sidebar-help .nav-help {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.85);
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  font-size: 13px;
}
.sidebar-help .nav-help i {
  width: 20px;
  text-align: center;
  font-size: 15px;
  color: var(--accent);
}
.sidebar-help .nav-help:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.sidebar-help .nav-help.active {
  background: rgba(255, 140, 66, 0.16);
  color: #fff;
}
.sidebar.collapsed .sidebar-help .nav-help span { display: none; }
.sidebar.collapsed .sidebar-help .nav-help { justify-content: center; }

/* -------- Animations -------- */
@keyframes wizardFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes wizardFadeUp {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* -------- Mobile -------- */
@media (max-width: 768px) {
  .wizard-tooltip { max-width: calc(100vw - 24px); }
}

@media (max-width: 480px) {
  .wizard-tooltip-footer { flex-wrap: wrap; }
  .wizard-nav-btns { width: 100%; }
  .wizard-nav-btns .btn { flex: 1; justify-content: center; }
  .wizard-tooltip-footer > .btn { flex: 1 1 100%; }
}
