/* User Journey Flow Visualization */
.user-journey-flow {
    width: 100%;
    height: 100%;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 1rem;
    background: transparent;
    border-radius: 1rem;
}

.journey-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
    position: relative;
    overflow-x: auto;
    padding: 0.5rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.journey-container::-webkit-scrollbar {
    display: none;
}

.journey-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    min-width: 100px;
    flex: 1;
    transition: all 0.3s ease;
    transform-origin: center;
}

.journey-step:hover {
    transform: translateY(-5px);
}

.step-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    position: relative;
    background: #ffffff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    color: #1d0c46;
    font-size: 1.5rem;
    overflow: hidden;
    z-index: 2;
}

.step-icon i {
    font-size: 1.5rem;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 0.5rem;
    max-width: 100px;
    line-height: 1.2;
}

.step-count {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.25rem 0.5rem;
    min-width: 40px;
    text-align: center;
}

.journey-connector {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        rgba(255, 255, 255, 0.5) 50%, 
        rgba(255, 255, 255, 0.3) 100%);
    z-index: 1;
}

/* Pulse animation for active step */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.step-icon.active {
    animation: pulse 2s infinite;
    background: rgba(255, 255, 255, 0.2);
}

.step-icon.completed::after {
    content: '✓';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #1d0c46;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

/* Progress indicator */
.progress-indicator {
    position: absolute;
    top: 30px;
    left: 60px;
    height: 2px;
    background: linear-gradient(90deg, #CAA968, #D4B87A);
    z-index: 1;
    transition: width 1s ease-in-out;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .user-journey-flow {
        padding: 1rem 0.5rem;
        min-height: 280px;
        overflow: hidden;
    }
    
    .journey-container {
        padding: 0.5rem;
        gap: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scroll-padding: 0.5rem;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        max-width: 100%;
    }
    
    .journey-step {
        min-width: 0;
        flex: 1;
        scroll-snap-align: center;
        margin-right: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .step-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
        margin-bottom: 0.4rem;
    }
    
    .step-label {
        font-size: 0.7rem;
        max-width: 80px;
        text-align: center;
        margin-bottom: 0.25rem;
        line-height: 1.2;
    }
    
    .step-count {
        font-size: 0.7rem;
        min-width: 30px;
        padding: 0.15rem 0.4rem;
    }
    
    .journey-connector {
        top: 27px;
        height: 2px;
    }
    
    .progress-indicator {
        top: 27px;
        height: 3px;
    }
}

@media (max-width: 480px) {
    .user-journey-flow {
        min-height: 250px;
        padding: 0.75rem 0.25rem;
        overflow: hidden;
    }
    
    .journey-container {
        padding: 0.25rem;
        gap: 0.25rem;
        scroll-padding: 0.25rem;
        width: 100%;
        max-width: 100%;
        justify-content: space-between;
    }
    
    .journey-step {
        min-width: 0;
        flex: 1;
        margin-right: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .step-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    
    .step-label {
        font-size: 0.65rem;
        max-width: 70px;
        margin-bottom: 0.2rem;
        text-align: center;
        line-height: 1.1;
    }
    
    .step-count {
        font-size: 0.65rem;
        min-width: 25px;
        padding: 0.1rem 0.3rem;
    }
    
    .journey-connector {
        top: 22px;
        height: 2px;
    }
    
    .progress-indicator {
        top: 22px;
        left: 45px;
        height: 3px;
    }
}

/* Scroll indicator for mobile */
@media (max-width: 768px) {
    .journey-container::after {
        content: "← Scroll to see more →";
        position: absolute;
        bottom: -25px;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.7rem;
        color: #CAA968;
        opacity: 0.7;
        white-space: nowrap;
        pointer-events: none;
    }
}
