/* =============================================================
   DPROMA Dashboard — Tour de producto (onboarding)
   Spotlight + popover. Usa los tokens de main.css.
   © DPROMA. Todos los derechos reservados.
   ============================================================= */

/* Capa que captura la interacción mientras el tour está activo. */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  pointer-events: auto;              /* bloquea la UI subyacente */
  background: transparent;           /* el oscurecido lo da el spotlight */
  animation: fadeIn .2s ease;
}
/* Pasos centrados (bienvenida/cierre): sin spotlight, fondo oscuro completo. */
.tour-overlay--solid { background: rgba(0, 0, 0, .6); }

/* Recorte luminoso sobre el elemento resaltado. */
.tour-spotlight {
  position: fixed;
  z-index: 9501;
  border-radius: var(--radius);
  border: 2px solid var(--green);
  pointer-events: none;              /* no interactivo durante el tour */
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, .6),  /* máscara que oscurece todo lo demás */
    0 0 0 4px rgba(31, 121, 56, .35);
  transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease;
}

/* Tarjeta con el contenido del paso. */
.tour-popover {
  position: fixed;
  z-index: 9502;
  width: 320px;
  max-width: calc(100vw - 24px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.125rem 1.125rem;
  pointer-events: auto;
  animation: slideUp .2s ease;
}
.tour-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  margin-bottom: .375rem;
}
.tour-body {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: .875rem;
}
.tour-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}
.tour-progress {
  font-size: var(--text-xs);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tour-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.tour-actions .btn { padding: .4rem .85rem; }
.tour-actions .tour-skip { padding: .25rem .35rem; }

/* Botón disparador en el rail ("Hacer tour virtual"). */
.tour-trigger { color: var(--text-muted); }
.tour-trigger:hover { color: var(--green); }

/* Accesibilidad: respeta "reducir movimiento". */
@media (prefers-reduced-motion: reduce) {
  .tour-overlay,
  .tour-popover { animation: none; }
  .tour-spotlight { transition: none; }
}

/* Móvil: el rail es barra inferior; ancla el popover en la parte superior. */
@media (max-width: 640px) {
  .tour-popover {
    width: calc(100vw - 24px);
    left: 12px !important;
    top: 12px !important;
  }
}
