/* ══════════════════════════════════════════
   GUIDED TOUR - Spotlight Overlay + Tooltip
   ══════════════════════════════════════════ */

/* ── Overlay ── */
.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.tour-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Dark backdrop - will be clipped around the spotlight */
.tour-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  z-index: 9998;
  transition: clip-path 0.6s cubic-bezier(.4,0,.2,1);
  clip-path: inset(0);
}

/* Spotlight ring glow */
.tour-spotlight {
  position: fixed;
  z-index: 9999;
  border-radius: 16px;
  box-shadow: 0 0 0 4px rgba(71, 206, 172, 0.5),
              0 0 40px 8px rgba(71, 206, 172, 0.15);
  pointer-events: none;
  transition: all 0.6s cubic-bezier(.4,0,.2,1);
  opacity: 0;
}

.tour-overlay.active .tour-spotlight {
  opacity: 1;
}

/* ── Tooltip Card ── */
.tour-tooltip {
  position: fixed;
  z-index: 10000;
  width: 380px;
  max-width: calc(100vw - 40px);
  background: rgba(22, 22, 26, 0.97);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(71, 206, 172, 0.25);
  border-radius: 20px;
  padding: 28px 28px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
              0 0 30px rgba(71, 206, 172, 0.1);
  opacity: 0;
  transform: translateY(16px) scale(0.95);
  transition: all 0.5s cubic-bezier(.4,0,.2,1);
  pointer-events: auto;
}

.tour-tooltip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Step counter badge */
.tour-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(71, 206, 172, 0.12);
  color: var(--primary-color, #47ceac);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.tour-step-badge i {
  font-size: 0.7rem;
}

/* Title */
.tour-tooltip-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.3;
}

/* Description */
.tour-tooltip-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  margin-bottom: 22px;
}

/* ── Progress Bar ── */
.tour-progress {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  margin-bottom: 18px;
  overflow: hidden;
}

.tour-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color, #47ceac), #29c06d);
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(.4,0,.2,1);
}

/* ── Navigation Buttons ── */
.tour-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tour-nav-group {
  display: flex;
  gap: 8px;
}

.tour-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tour-btn-next {
  background: linear-gradient(135deg, #47ceac, #29c06d);
  color: #fff;
  box-shadow: 0 4px 15px rgba(71, 206, 172, 0.3);
}

.tour-btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(71, 206, 172, 0.45);
}

.tour-btn-prev {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tour-btn-prev:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.tour-btn-skip {
  background: none;
  color: rgba(255, 255, 255, 0.35);
  padding: 10px 12px;
  font-size: 0.8rem;
}

.tour-btn-skip:hover {
  color: rgba(255, 255, 255, 0.7);
}

.tour-btn-finish {
  background: linear-gradient(135deg, #47ceac, #29c06d);
  color: #fff;
  box-shadow: 0 4px 15px rgba(71, 206, 172, 0.3);
}

.tour-btn-finish:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(71, 206, 172, 0.45);
}

/* ── Entrance Pulse on spotlight target ── */
.tour-highlight-pulse {
  animation: tourPulse 1.5s ease-in-out infinite;
}

@keyframes tourPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(71, 206, 172, 0.5), 0 0 40px 8px rgba(71, 206, 172, 0.15); }
  50%      { box-shadow: 0 0 0 8px rgba(71, 206, 172, 0.3), 0 0 60px 12px rgba(71, 206, 172, 0.2); }
}

/* ── Confetti burst on finish ── */
.tour-confetti {
  position: fixed;
  inset: 0;
  z-index: 10001;
  pointer-events: none;
}

.tour-confetti-piece {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  opacity: 0;
  animation: confettiFall 1.5s ease-out forwards;
}

@keyframes confettiFall {
  0%   { opacity: 1; transform: translateY(0) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translateY(600px) rotate(720deg) scale(0.3); }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .tour-tooltip {
    width: calc(100vw - 24px);
    padding: 20px 18px 16px;
    border-radius: 16px;
  }

  .tour-tooltip-title {
    font-size: 1.15rem;
  }

  .tour-tooltip-desc {
    font-size: 0.88rem;
  }

  .tour-btn {
    padding: 9px 14px;
    font-size: 0.8rem;
  }
}
