/* ---------- Spotlight Tour - Robust Mobile Styles ---------- */

/* Overlay with spotlight hole */
.tour-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    transition: opacity 0.3s ease;
    /* Ensure it covers everything */
    width: 100vw;
    height: 100vh;
}

.tour-overlay.active {
    pointer-events: auto;
}

/* Spotlight cutout - positioned dynamically via JS */
.tour-spotlight {
    position: fixed; /* Must be fixed to match overlay */
    border-radius: 12px;
    /* The huge shadow creates the dimming effect around the hole */
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.85);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1); /* Smooth catch-up */
    pointer-events: none;
    z-index: 9999;
}

/* Pulsing ring around spotlight */
.tour-spotlight::before {
    content: '';
    position: absolute;
    inset: -8px;
    border: 3px solid var(--primary);
    border-radius: inherit;
    animation: tour-pulse 1.5s ease-in-out infinite;
    will-change: transform, opacity; /* Hardware acceleration */
}

@keyframes tour-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.6;
    }
}

/* Coach mark tooltip */
.tour-coach-mark {
    position: fixed; /* Fixed to stick with spotlight */
    z-index: 10000;
    pointer-events: auto;
    
    background: rgba(30, 32, 38, 0.98); /* Less transparent for readability */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 20px;
    width: 280px; /* Fixed width for consistency */
    max-width: 90vw; /* Prevent overflow on tiny screens */
    
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    animation: tour-fade-in 0.3s ease;
    
    /* Hardware acceleration for smooth dragging/positioning */
    will-change: transform, left, top;
}

@keyframes tour-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tour-coach-mark .tour-text {
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 16px;
    line-height: 1.5;
}

.tour-coach-mark .tour-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px; /* Larger touch target */
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: transform 0.1s;
}

.tour-coach-mark .tour-btn:active {
    transform: scale(0.96);
}

.tour-coach-mark .tour-skip {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 12px;
    font-size: 13px;
    cursor: pointer;
    margin-top: 4px;
    width: 100%;
}

/* Step indicator */
.tour-steps {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}

.tour-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.2s;
}

.tour-step-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

/* Arrows */
.tour-arrow {
    position: absolute;
    width: 0;
    height: 0;
}

.tour-arrow.arrow-up {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid rgba(30, 32, 38, 0.98);
}

.tour-arrow.arrow-down {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid rgba(30, 32, 38, 0.98);
}
