/*
Step Progress Bar Components
Created by: RSK World (https://rskworld.in)
Founder: Molla Samser
Designer & Tester: Rima Khatun
Contact: +91 93305 39277 | info@rskworld.com | support@rskworld.in
Address: Nutanhat, Mongolkote, Purba Burdwan, West Bengal, India - 713147
Year: 2026
*/

/* Step Progress Bar Container */
.step-progress-container {
    width: 100%;
    padding: 2rem 0;
    position: relative;
}

/* Horizontal Step Progress */
.step-progress-horizontal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin: 2rem 0;
}

.step-progress-horizontal .step-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #e0e0e0;
    z-index: 1;
    transform: translateY(-50%);
}

.step-progress-horizontal .step-line-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    width: 0%;
    transition: width 1s ease-in-out;
    position: relative;
}

.step-progress-horizontal .step-line-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #3498db;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
}

.step-progress-horizontal .step {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-progress-horizontal .step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    border: 4px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #7f8c8d;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-progress-horizontal .step.active .step-circle {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.3);
}

.step-progress-horizontal .step.completed .step-circle {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    box-shadow: 0 4px 16px rgba(39, 174, 96, 0.3);
}

.step-progress-horizontal .step.completed .step-circle::before {
    content: '✓';
    font-size: 1.2rem;
}

.step-progress-horizontal .step-label {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: #7f8c8d;
    font-weight: 500;
    max-width: 100px;
}

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

.step-progress-horizontal .step.completed .step-label {
    color: #27ae60;
    font-weight: bold;
}

/* Vertical Step Progress */
.step-progress-vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    padding-left: 3rem;
    margin: 2rem 0;
}

.step-progress-vertical .step-line {
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #e0e0e0;
    z-index: 1;
}

.step-progress-vertical .step-line-fill {
    width: 100%;
    background: linear-gradient(180deg, #3498db, #2980b9);
    height: 0%;
    transition: height 1s ease-in-out;
    position: relative;
}

.step-progress-vertical .step {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.step-progress-vertical .step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    border: 4px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #7f8c8d;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    margin-left: -30px;
}

.step-progress-vertical .step.active .step-circle {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.3);
}

.step-progress-vertical .step.completed .step-circle {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    box-shadow: 0 4px 16px rgba(39, 174, 96, 0.3);
}

.step-progress-vertical .step.completed .step-circle::before {
    content: '✓';
    font-size: 1.2rem;
}

.step-progress-vertical .step-content {
    flex: 1;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-progress-vertical .step-title {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.step-progress-vertical .step-description {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.4;
}

.step-progress-vertical .step.active .step-title {
    color: #3498db;
}

.step-progress-vertical .step.completed .step-title {
    color: #27ae60;
}

/* Milestone Progress Bar */
.milestone-progress {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.milestone-progress h3 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}

.milestone-progress .milestone-track {
    position: relative;
    height: 60px;
    background: linear-gradient(90deg, #ecf0f1 0%, #bdc3c7 100%);
    border-radius: 30px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.milestone-progress .milestone-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2980b9);
    border-radius: 30px;
    transition: width 1s ease-in-out;
    position: relative;
    overflow: hidden;
}

.milestone-progress .milestone-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.3) 0%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.3) 100%);
    animation: milestoneShine 3s infinite;
}

@keyframes milestoneShine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.milestone-progress .milestone-markers {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.milestone-progress .milestone-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e74c3c;
    z-index: 2;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.milestone-progress .milestone-marker:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.5);
}

.milestone-progress .milestone-marker.reached {
    background: #e74c3c;
    border-color: #c0392b;
}

.milestone-progress .milestone-marker::after {
    content: attr(data-label);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #7f8c8d;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.milestone-progress .milestone-marker:hover::after {
    opacity: 1;
}

.milestone-progress .milestone-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
}

.milestone-progress .milestone-percentage {
    font-size: 1.5rem;
    font-weight: bold;
    color: #3498db;
}

.milestone-progress .milestone-status {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.milestone-progress .milestone-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
}

/* Timeline Progress Bar */
.timeline-progress {
    position: relative;
    padding: 2rem 0;
    margin: 2rem 0;
}

.timeline-progress .timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #e0e0e0;
    transform: translateX(-50%);
}

.timeline-progress .timeline-fill {
    position: absolute;
    left: 50%;
    top: 0;
    width: 4px;
    background: linear-gradient(180deg, #3498db, #2980b9);
    transform: translateX(-50%);
    transition: height 1s ease-in-out;
}

.timeline-progress .timeline-items {
    position: relative;
    z-index: 2;
}

.timeline-progress .timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
}

.timeline-progress .timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-progress .timeline-point {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #e0e0e0;
    border: 4px solid #fff;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.timeline-progress .timeline-item.active .timeline-point {
    background: #3498db;
    transform: translateX(-50%) scale(1.3);
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.5);
}

.timeline-progress .timeline-item.completed .timeline-point {
    background: #27ae60;
    box-shadow: 0 0 20px rgba(39, 174, 96, 0.5);
}

.timeline-progress .timeline-content {
    flex: 1;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    margin: 0 2rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.timeline-progress .timeline-item:hover .timeline-content {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.timeline-progress .timeline-date {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
}

.timeline-progress .timeline-title {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.timeline-progress .timeline-description {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.4;
}

/* Progress Path */
.progress-path {
    position: relative;
    width: 100%;
    height: 300px;
    margin: 2rem 0;
}

.progress-path svg {
    width: 100%;
    height: 100%;
}

.progress-path .path-background {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.progress-path .path-fill {
    fill: none;
    stroke: url(#pathGradient);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 2s ease-in-out;
}

.progress-path .path-marker {
    fill: #3498db;
    stroke: #fff;
    stroke-width: 2;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.progress-path .path-marker.visible {
    opacity: 1;
}

.progress-path .path-marker.active {
    fill: #e74c3c;
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .step-progress-horizontal {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .step-progress-horizontal .step-line {
        display: none;
    }
    
    .step-progress-horizontal .step {
        flex: 0 0 auto;
        min-width: 60px;
    }
    
    .timeline-progress .timeline-item {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    
    .timeline-progress .timeline-line {
        left: 20px;
    }
    
    .timeline-progress .timeline-fill {
        left: 20px;
    }
    
    .timeline-progress .timeline-point {
        left: 20px;
        transform: translateX(-50%);
    }
    
    .timeline-progress .timeline-content {
        margin: 1rem 0 1rem 3rem;
    }
}
