/*
 * FILE: tour.css
 * PURPOSE: Styling for user onboarding tour component
 * SPEC PROJECT: SP-SRUserFlow
 *
 * KEY RESPONSIBILITIES:
 *  - Spotlight/overlay styling
 *  - Tooltip positioning and animation
 *  - Progress indicator dots
 *  - Mobile responsiveness
 *
 * LAST UPDATED: December 9, 2025 by /go agent
 * CHANGE SUMMARY: Created for E11 - User Onboarding
 */

/* ============================================
   TOUR OVERLAY
   ============================================ */

.sp-tour-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    transition: opacity 0.3s ease;
}

/* ============================================
   SPOTLIGHT
   ============================================ */

.sp-tour-spotlight {
    position: fixed;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.sp-tour-spotlight--pulse {
    animation: spotlight-pulse 2s ease-in-out infinite;
}

@keyframes spotlight-pulse {
    0%, 100% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(var(--sp-primary-rgb, 220, 53, 69), 0.4);
    }
    50% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 0 8px rgba(var(--sp-primary-rgb, 220, 53, 69), 0);
    }
}

/* ============================================
   TOOLTIP
   ============================================ */

.sp-tour-tooltip {
    position: fixed;
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 360px;
    width: calc(100vw - 32px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sp-tour-tooltip::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    transform: rotate(45deg);
}

/* Arrow positions */
.sp-tour-tooltip--top::before {
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
}

.sp-tour-tooltip--bottom::before {
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
}

.sp-tour-tooltip--left::before {
    right: -8px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.sp-tour-tooltip--right::before {
    left: -8px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

/* ============================================
   TOOLTIP CONTENT
   ============================================ */

.sp-tour-tooltip__step {
    font-size: 12px;
    font-weight: 600;
    color: var(--sp-primary, #dc3545);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.sp-tour-tooltip__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--sp-blue-800, #1e3a5f);
    margin-bottom: 8px;
    line-height: 1.3;
}

.sp-tour-tooltip__message {
    font-size: 14px;
    color: var(--sp-blue-600, #4a6785);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ============================================
   PROGRESS INDICATOR
   ============================================ */

.sp-tour-progress {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 20px;
}

.sp-tour-progress__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: all 0.3s ease;
}

.sp-tour-progress__dot--completed {
    background: var(--sp-primary, #dc3545);
}

.sp-tour-progress__dot--active {
    background: var(--sp-primary, #dc3545);
    transform: scale(1.25);
}

/* ============================================
   ACTIONS
   ============================================ */

.sp-tour-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.sp-tour-actions__skip {
    font-size: 13px;
    color: #6b7280;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sp-tour-actions__skip:hover {
    background: #f3f4f6;
    color: #374151;
}

.sp-tour-actions__nav {
    display: flex;
    gap: 8px;
}

.sp-tour-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.sp-tour-btn--back {
    background: #f3f4f6;
    color: #374151;
}

.sp-tour-btn--back:hover {
    background: #e5e7eb;
}

.sp-tour-btn--next {
    background: var(--sp-primary, #dc3545);
    color: white;
}

.sp-tour-btn--next:hover {
    background: var(--sp-primary-strong, #c82333);
    transform: translateY(-1px);
}

.sp-tour-btn--done {
    background: #10b981;
    color: white;
}

.sp-tour-btn--done:hover {
    background: #059669;
}

/* ============================================
   WELCOME STEP (Special styling)
   ============================================ */

.sp-tour-tooltip--welcome {
    text-align: center;
    max-width: 420px;
}

.sp-tour-tooltip--welcome .sp-tour-tooltip__icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

.sp-tour-enter {
    opacity: 0;
    transform: scale(0.95);
}

.sp-tour-enter-active {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

.sp-tour-leave-active {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.2s ease;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .sp-tour-tooltip {
        max-width: calc(100vw - 24px);
        padding: 20px;
        left: 12px !important;
        right: 12px !important;
        width: auto;
    }
    
    .sp-tour-tooltip--bottom,
    .sp-tour-tooltip--top {
        bottom: auto !important;
        top: auto !important;
    }
    
    /* On mobile, tooltip appears at bottom of screen */
    .sp-tour-tooltip--mobile {
        position: fixed;
        bottom: 80px; /* Above mobile footer nav */
        left: 12px;
        right: 12px;
        transform: none;
    }
    
    .sp-tour-tooltip--mobile::before {
        display: none;
    }
    
    .sp-tour-actions {
        flex-direction: column-reverse;
        gap: 12px;
    }
    
    .sp-tour-actions__nav {
        width: 100%;
        justify-content: space-between;
    }
    
    .sp-tour-btn {
        flex: 1;
        text-align: center;
    }
    
    .sp-tour-actions__skip {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   HIGH CONTRAST / ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    .sp-tour-spotlight,
    .sp-tour-tooltip,
    .sp-tour-progress__dot {
        transition: none;
    }
    
    .sp-tour-spotlight--pulse {
        animation: none;
    }
}

/* Focus styles for keyboard navigation */
.sp-tour-btn:focus-visible,
.sp-tour-actions__skip:focus-visible {
    outline: 2px solid var(--sp-primary, #dc3545);
    outline-offset: 2px;
}




















