/* Timeline & Icon Alignment Fixes */

/* Container Reference */
.timeline-container {
    position: relative;
    padding-left: 0;
}

/* Container for each step */
.timeline-step {
    position: relative;
    display: flex;
    align-items: center;
    /* Vertically center icon and text */
    margin-bottom: 30px;
    /* Space between steps */
    z-index: 2;
    /* Sit above the line */
    padding: 0;
    margin-left: 0;
}

/* The Line (Background) */
.timeline-line {
    position: absolute;
    top: 20px;
    /* Start below the first dot's center */
    bottom: 40px;
    /* Increased from 20px to trim overflow tail */
    left: 20px;
    /* Center of the 40px dot */
    width: 2px;
    background: #e0e0e0;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-line.fail-line {
    background: #fecaca;
    /* Light red */
}

.timeline-line.success-line {
    background: #a7f3d0;
    /* Light green */
}

/* The Dot/Icon Container */
.step-dot {
    box-sizing: border-box;
    /* Ensure border is included in width */
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    /* Prevent shrinking */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 2px solid #e5e7eb;
    color: #6b7280;
    /* Default icon color */
    transition: all 0.3s ease;
}

/* Failure Node Styles */
.fail-node {
    border-color: #fecaca;
    color: #ef4444;
    /* Red icon */
}

/* Success Node Styles */
.success-node {
    border-color: #6ee7b7;
    color: #10b981;
    /* Green icon */
}

/* Success Node Pulse Animation */
.success-node {
    animation: successPulse 2s infinite;
}

@keyframes successPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Text Content */
.step-content {
    margin-left: 20px;
    /* Space between dot and text */
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
}

.muted {
    color: #9ca3af;
}

.danger-text {
    color: #ef4444;
    font-weight: 800;
}

.highlight-text-step {
    color: #059669;
    /* Darker Green */
    font-weight: 800;
}

/* Final Step Adjustment */
.final-step {
    margin-bottom: 0;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .timeline-step {
        margin-bottom: 20px;
    }

    .step-dot {
        width: 32px;
        height: 32px;
    }

    .timeline-line {
        left: 16px;
        /* Center of 32px dot */
    }

    .step-content {
        font-size: 1rem;
    }
}