/* ── M-14 Onboarding y Ayuda Contextual ─────────────────────────────────── */

/* Tour Overlay */
.tour-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.tour-overlay.tour-overlay--active {
  display: flex;
}

.tour-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  max-width: 480px;
  width: 100%;
  padding: 1.75rem 2rem 1.5rem;
  position: relative;
}

.tour-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.tour-card__step-count {
  font-size: 0.75rem;
  color: #6b7280;
  font-weight: 500;
}

.tour-card__skip {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.tour-card__skip:hover {
  color: #374151;
  background: #f3f4f6;
}

.tour-card__title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.5rem;
}

.tour-card__description {
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

.tour-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 1.25rem;
}
.tour-progress__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e5e7eb;
  transition: background 0.2s;
  flex-shrink: 0;
}
.tour-progress__dot--active {
  background: #3b82f6;
  width: 24px;
  border-radius: 4px;
}
.tour-progress__dot--done {
  background: #93c5fd;
}

.tour-card__nav {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
}

.tour-card__btn {
  padding: 0.5rem 1.1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}
.tour-card__btn--prev {
  background: #f3f4f6;
  color: #374151;
}
.tour-card__btn--prev:hover { background: #e5e7eb; }
.tour-card__btn--next {
  background: #3b82f6;
  color: #fff;
}
.tour-card__btn--next:hover { background: #2563eb; }
.tour-card__btn:disabled { opacity: 0.4; cursor: default; }

/* Help Button */
.btn-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  font-size: 1rem;
  cursor: pointer;
  margin-left: 0.6rem;
  vertical-align: middle;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  flex-shrink: 0;
}
.btn-help:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  transform: scale(1.08);
}

/* Help Drawer */
.help-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 380px;
  max-width: 100%;
  background: #fff;
  box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  z-index: 9998;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.help-drawer--open {
  transform: translateX(0);
}

.help-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.help-drawer__title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.help-drawer__title span.help-icon { font-size: 1.1rem; }

.help-drawer__close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #6b7280;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.help-drawer__close:hover { color: #111827; background: #f3f4f6; }

.help-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.help-article {
  margin-bottom: 1.5rem;
}
.help-article:last-child { margin-bottom: 0; }

.help-article__title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.5rem;
}

.help-article__content {
  font-size: 0.875rem;
  color: #4b5563;
  line-height: 1.65;
}
.help-article__content strong { color: #111827; }
.help-article__content ul { margin: 0.4rem 0; padding-left: 1.25rem; }
.help-article__content li { margin-bottom: 0.2rem; }
.help-article__content a { color: #2563eb; }

.help-drawer__loading {
  color: #9ca3af;
  font-size: 0.875rem;
  text-align: center;
  padding: 2rem 0;
}

.help-drawer__fallback {
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
}
.help-drawer__fallback .fallback-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }

/* Reset tour link in nav */
.tour-reset-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: #6b7280;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.tour-reset-link:hover { color: #3b82f6; background: #eff6ff; }

/* Responsive */
@media (max-width: 768px) {
  .tour-card {
    padding: 1.25rem 1.25rem 1.1rem;
  }
  .tour-card__title { font-size: 1.05rem; }
  .help-drawer { width: 100%; }
}
