/* Visita guiada — Series Lab */

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  top: var(--header-offset, 0);
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.tour-overlay.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.tour-spotlight {
  position: fixed;
  z-index: 10001;
  display: none;
  border-radius: var(--radius-xl);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72);
  border: 2px solid var(--brand-blue);
  pointer-events: none;
  transition: top 0.3s ease, left 0.3s ease, width 0.3s ease, height 0.3s ease;
}

.tour-spotlight.is-visible {
  display: block;
}

.tour-spotlight.is-pulse {
  animation: tour-pulse 2s ease-in-out infinite;
}

@keyframes tour-pulse {
  0%, 100% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72), 0 0 0 0 rgba(108, 174, 209, 0.5); }
  50% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.72), 0 0 0 6px rgba(108, 174, 209, 0.25); }
}

.tour-popover {
  position: fixed;
  z-index: 10002;
  width: min(360px, calc(100vw - 32px));
  padding: 1.25rem;
  border-radius: var(--radius-xl);
  border: 1px solid hsl(var(--border) / 0.6);
  background: hsl(var(--card) / 0.98);
  backdrop-filter: blur(16px);
  box-shadow: var(--panel-shadow), 0 24px 48px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.tour-popover.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.tour-popover.is-center {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: min(420px, calc(100vw - 32px));
}

.tour-popover.is-center.is-visible {
  transform: translate(-50%, -50%) scale(1);
}

.tour-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid hsl(var(--primary) / 0.25);
  background: hsl(var(--primary) / 0.08);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-blue);
  margin-bottom: 10px;
}

.tour-popover h3 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.tour-popover p {
  font-size: 14px;
  color: hsl(var(--muted-foreground));
  line-height: 1.55;
  margin: 0 0 12px;
}

.tour-tip {
  font-size: 12px;
  color: hsl(var(--foreground));
  background: hsl(var(--primary) / 0.06);
  border: 1px solid hsl(var(--primary) / 0.15);
  border-radius: var(--radius);
  padding: 8px 10px;
  margin-bottom: 14px;
}

.tour-progress {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}

.tour-progress-dot {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: hsl(var(--border));
  transition: background 0.2s ease;
}

.tour-progress-dot.is-active {
  background: var(--brand-blue);
}

.tour-progress-dot.is-done {
  background: hsl(var(--success));
}

.tour-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.tour-actions-left,
.tour-actions-right {
  display: flex;
  gap: 6px;
  align-items: center;
}

.tour-btn-skip {
  background: none;
  border: none;
  color: hsl(var(--muted-foreground));
  font-family: var(--font-body);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
}

.tour-btn-skip:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--surface));
}

.tour-btn-nav {
  height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid hsl(var(--border) / 0.6);
  background: hsl(var(--surface));
  color: hsl(var(--foreground));
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tour-btn-nav:hover {
  border-color: hsl(var(--primary) / 0.4);
  background: hsl(var(--primary) / 0.06);
}

.tour-btn-nav:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tour-btn-next {
  background: var(--brand-blue);
  color: var(--brand-black);
  border-color: var(--brand-blue-hover);
  font-weight: 600;
}

.tour-btn-next:hover {
  background: var(--brand-blue-hover);
}

.tour-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid hsl(var(--primary) / 0.35);
  background: hsl(var(--primary) / 0.08);
  color: var(--brand-blue);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tour-launch-btn:hover {
  background: hsl(var(--primary) / 0.15);
  border-color: hsl(var(--primary) / 0.5);
}

.tour-target-active {
  position: relative;
  z-index: 10001 !important;
}

@media (max-width: 720px) {
  .tour-popover:not(.is-center) {
    left: 16px !important;
    right: 16px;
    width: auto;
    bottom: 16px !important;
    top: auto !important;
  }
}
