/**
 * Donation Form Progress Indicator Styles
 * =========================================
 * Segmented progress bar matching the step-stages.png design
 */

/* Progress Indicator Container */
.donation-progress-indicator {
    margin-bottom: 1.5rem;
}

/* Progress Bar Container */
.progress-bar {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

/* Progress Track (Background Line) */
.progress-track {
    position: absolute;
    top: 20px;
    left: 40px;
    right: 40px;
    height: 4px;
    background-color: #e0e0e0;
    border-radius: 2px;
    z-index: 1;
}

/* Progress Fill (Active Line) */
.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #4bb543 0%, #3498db 100%);
    border-radius: 2px;
    width: 0%;
    transition: width 0.5s ease-in-out;
}

/* Progress fill states */
.step-1-active .progress-fill {
    width: 0%;
}

.step-2-active .progress-fill {
    width: 50%;
}

.step-3-active .progress-fill {
    width: 100%;
}

/* Progress Steps Container */
.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

/* Individual Step */
.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    cursor: default;
    transition: all 0.3s ease;
}

/* Step Circle */
.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f5f5f5;
    border: 3px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s ease;
}

/* Step Number */
.step-number {
    font-size: 16px;
    font-weight: 600;
    color: #999;
    transition: all 0.3s ease;
}

/* Step Checkmark (Hidden by default) */
.step-checkmark {
    position: absolute;
    width: 20px;
    height: 20px;
    color: white;
    display: none;
}

/* Step Label */
.step-label {
    margin-top: 8px;
    font-size: 14px;
    color: #999;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Active Step State */
.progress-step.active .step-circle {
    background-color: #3498db;
    border-color: #3498db;
    transform: scale(1.1);
}

.progress-step.active .step-number {
    color: white;
}

.progress-step.active .step-label {
    color: #3498db;
    font-weight: 600;
}

/* Completed Step State */
.progress-step.completed .step-circle {
    background-color: #4bb543;
    border-color: #4bb543;
}

.progress-step.completed .step-number {
    display: none;
}

.progress-step.completed .step-checkmark {
    display: block;
}

.progress-step.completed .step-label {
    color: #4bb543;
}

/* Hover Effects (for visual feedback) */
.progress-step:not(.completed):not(.active):hover .step-circle {
    border-color: #bbb;
    background-color: #fafafa;
}

/* Pulse Animation for Active Step */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
    }
}

.progress-step.active .step-circle {
    animation: pulse 2s infinite;
}

/* Alternative Style: Connected Dots with Better Visual */
.progress-track::before,
.progress-track::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #e0e0e0;
}

.progress-track::before {
    left: -4px;
}

.progress-track::after {
    right: -4px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .donation-progress-indicator {
        padding: 15px 10px;
        margin-bottom: 25px;
    }

    .progress-bar {
        max-width: 100%;
    }

    .progress-track {
        left: 30px;
        right: 30px;
        top: 18px;
    }

    .step-circle {
        width: 36px;
        height: 36px;
    }

    .step-number {
        font-size: 14px;
    }

    .step-label {
        font-size: 12px;
        margin-top: 6px;
    }

    .step-checkmark {
        width: 18px;
        height: 18px;
    }

    /* Stack labels on very small screens */
    @media (max-width: 320px) {
        .step-label {
            font-size: 11px;
        }
    }
}

/* Color Theme Variations */
.donation-progress-indicator.theme-green .progress-fill {
    background: #4bb543;
}

.donation-progress-indicator.theme-green .progress-step.active .step-circle {
    background-color: #4bb543;
    border-color: #4bb543;
}

.donation-progress-indicator.theme-green .progress-step.active .step-label {
    color: #4bb543;
}

/* Smooth transitions for all state changes */
* {
    transition-property: background-color, border-color, color, transform, width;
    transition-duration: 0.3s;
    transition-timing-function: ease-in-out;
}
