/**
 * Onboarding Tour Styles
 * Beautiful interactive guide for new users
 */

/* ============================================
   OVERLAY & BACKDROP
   ============================================ */
.onboarding-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  pointer-events: none;
}

.onboarding-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* SVG mask for cutout effect */
.onboarding-overlay svg {
  width: 100%;
  height: 100%;
}

.onboarding-overlay-rect {
  fill: rgba(0, 0, 0, 0.7);
}

.onboarding-cutout {
  fill: black;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Block scroll when onboarding is active */
body.onboarding-active {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  height: 100%;
}

/* ============================================
   SPOTLIGHT EFFECT
   ============================================ */
.onboarding-spotlight {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboarding-spotlight::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border: 3px solid var(--primary);
  border-radius: 12px;
  box-shadow: 
    0 0 0 4px rgba(226, 1, 205, 0.2),
    0 0 30px rgba(226, 1, 205, 0.4),
    inset 0 0 30px rgba(226, 1, 205, 0.1);
  animation: spotlightPulse 2s ease-in-out infinite;
}

@keyframes spotlightPulse {
  0%, 100% {
    box-shadow: 
      0 0 0 4px rgba(226, 1, 205, 0.2),
      0 0 30px rgba(226, 1, 205, 0.4),
      inset 0 0 30px rgba(226, 1, 205, 0.1);
  }
  50% {
    box-shadow: 
      0 0 0 8px rgba(226, 1, 205, 0.3),
      0 0 50px rgba(226, 1, 205, 0.6),
      inset 0 0 40px rgba(226, 1, 205, 0.2);
  }
}

/* ============================================
   TOOLTIP CARD
   ============================================ */
.onboarding-tooltip {
  position: fixed;
  z-index: 10000;
  max-width: 420px;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.9) translateY(10px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.onboarding-tooltip.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
}

.onboarding-tooltip-card {
  background: var(--glass-bg-darker);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(226, 1, 205, 0.1);
  position: relative;
  overflow: hidden;
}

/* Gradient accent */
.onboarding-tooltip-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

/* Animated background particles */
.onboarding-tooltip-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(226, 1, 205, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(31, 158, 158, 0.05) 0%, transparent 50%);
  pointer-events: none;
  animation: particleFloat 8s ease-in-out infinite;
}

@keyframes particleFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10px, -10px); }
}

/* ============================================
   TOOLTIP CONTENT
   ============================================ */
.onboarding-tooltip-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.onboarding-tooltip-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(226, 1, 205, 0.3);
  animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.onboarding-tooltip-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.onboarding-tooltip-title {
  flex: 1;
}

.onboarding-tooltip-title h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.onboarding-tooltip-step {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

.onboarding-tooltip-step .current {
  color: var(--primary);
  font-weight: 700;
}

.onboarding-tooltip-body {
  position: relative;
  z-index: 1;
}

.onboarding-tooltip-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
}

/* ============================================
   TOOLTIP ACTIONS
   ============================================ */
.onboarding-tooltip-actions {
  display: flex;
  gap: 0.75rem;
  position: relative;
  z-index: 1;
}

.onboarding-btn {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
}

.onboarding-btn-primary {
  background: var(--glass-bg-lighter);
  color: var(--primary);
  border: 1px solid var(--primary);
  box-shadow: 0 0 15px rgba(226, 1, 205, 0.2);
}

.onboarding-btn-primary:hover {
  transform: translateY(-2px);
  background: rgba(226, 1, 205, 0.1);
  box-shadow: 0 0 25px rgba(226, 1, 205, 0.3);
  border-color: var(--primary);
}

.onboarding-btn-primary:active {
  transform: translateY(0);
}

.onboarding-btn-secondary {
  background: var(--glass-bg-lighter);
  color: var(--foreground);
  border: 1px solid var(--glass-border);
}

.onboarding-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
}

.onboarding-btn svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   TOOLTIP ARROW
   ============================================ */
.onboarding-tooltip-arrow {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--glass-bg-darker);
  border: 1px solid var(--glass-border);
  transform: rotate(45deg);
  z-index: -1;
}

/* Arrow positions */
.onboarding-tooltip[data-position="bottom"] .onboarding-tooltip-arrow {
  top: -10px;
  left: 50%;
  margin-left: -10px;
  border-bottom: none;
  border-right: none;
}

.onboarding-tooltip[data-position="top"] .onboarding-tooltip-arrow {
  bottom: -10px;
  left: 50%;
  margin-left: -10px;
  border-top: none;
  border-left: none;
}

.onboarding-tooltip[data-position="left"] .onboarding-tooltip-arrow {
  right: -10px;
  top: 50%;
  margin-top: -10px;
  border-left: none;
  border-bottom: none;
}

.onboarding-tooltip[data-position="right"] .onboarding-tooltip-arrow {
  left: -10px;
  top: 50%;
  margin-top: -10px;
  border-right: none;
  border-top: none;
}

/* ============================================
   PROGRESS INDICATOR - REMOVED
   ============================================ */
.onboarding-progress {
  display: none;
}

/* ============================================
   ELEMENT HIGHLIGHT
   ============================================ */
.onboarding-highlight {
  position: relative;
  pointer-events: auto !important;
}

/* Force hover class - actual hover is triggered via JS events */
.onboarding-highlight.force-hover {
  /* The real :hover styles will be applied via dispatched mouse events */
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 640px) {
  .onboarding-tooltip {
    max-width: calc(100vw - 2rem);
    left: 1rem !important;
    right: 1rem !important;
  }
  
  .onboarding-tooltip-card {
    padding: 1.25rem;
  }
  
  .onboarding-tooltip-title h3 {
    font-size: 1.125rem;
  }
  
  .onboarding-tooltip-text {
    font-size: 0.9375rem;
  }
  
  .onboarding-tooltip-actions {
    flex-direction: column;
  }
  
  .onboarding-btn {
    width: 100%;
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Smooth entrance */
.onboarding-tooltip.entering {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* Smooth exit */
.onboarding-tooltip.exiting {
  animation: fadeOut 0.3s ease-out forwards;
}
