/* ========================================
   UNIFIED CHECKOUT PROGRESS BAR
   A cohesive, aesthetically appealing progress bar
   for the entire checkout flow across all pages
   ======================================== */

/* Progress Bar Container */
.checkout-progress-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0 40px 0;
    position: relative;
    background: transparent;
    border-radius: 0;
    padding: 20px 15px;
    box-shadow: none;
    border: none;
}

/* Individual Progress Step */
.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 3;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Step Circle Styling */
.step-circle {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    color: #6c757d;
    border: 3px solid #e9ecef;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

/* Ripple Effect on Circle */
.step-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
}

/* Active Step Circle */
.step-circle.active {
    background: linear-gradient(135deg, var(--primary-color, #FF6B35) 0%, var(--accent-color, #ff9f1a) 100%);
    color: white;
    border-color: var(--primary-color, #FF6B35);
    box-shadow: 0 6px 24px rgba(255, 107, 53, 0.5);
    transform: scale(1.15);
}

.step-circle.active::before {
    width: 100%;
    height: 100%;
}

/* Completed Step Circle */
.step-circle.completed {
    background: linear-gradient(135deg, var(--success-color, #28a745) 0%, #20c997 100%);
    color: white;
    border-color: var(--success-color, #28a745);
    box-shadow: 0 6px 24px rgba(40, 167, 69, 0.5);
    animation: completedPulse 0.6s ease-in-out;
}

/* Hide step number when completed, show checkmark */
.step-circle.completed .step-number {
    display: none;
}

.step-circle.completed .fa-check {
    display: block !important;
    font-size: 20px;
    animation: checkmarkAppear 0.6s ease-in-out;
}

/* Animations */
@keyframes completedPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1.05); }
}

@keyframes checkmarkAppear {
    0% { 
        transform: scale(0) rotate(-90deg); 
        opacity: 0; 
    }
    50% { 
        transform: scale(1.2) rotate(0deg); 
        opacity: 1; 
    }
    100% { 
        transform: scale(1) rotate(0deg); 
        opacity: 1; 
    }
}

/* Step Label Styling */
.step-label {
    font-size: 14px;
    color: var(--text-secondary, #6c757d);
    text-align: center;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: 20px;
}

.step-label.active {
    color: var(--primary-color, #FF6B35);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255, 107, 53, 0.2);
}

.step-label.completed {
    color: var(--success-color, #28a745);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(40, 167, 69, 0.2);
}

/* Step Connector Line */
.step-connector {
    flex: 1;
    height: 5px;
    background: linear-gradient(90deg, #e9ecef 0%, #f8f9fa 100%);
    position: relative;
    margin: 0 15px;
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Connector Progress Fill */
.step-connector::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary-color, #FF6B35) 0%, var(--accent-color, #ff9f1a) 100%);
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.4);
}

.step-connector.active::before {
    width: 100%;
    background: linear-gradient(90deg, var(--primary-color, #FF6B35) 0%, var(--accent-color, #ff9f1a) 100%);
}

.step-connector.completed {
    background: linear-gradient(90deg, var(--success-color, #28a745) 0%, #20c997 100%);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.4);
}

.step-connector.completed::before {
    width: 100%;
    background: linear-gradient(90deg, var(--success-color, #28a745) 0%, #20c997 100%);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet and Small Desktop */
@media (max-width: 1024px) {
    .checkout-progress-bar {
        padding: 15px 10px;
        margin: 25px 0 35px 0;
    }
    
    .step-circle {
        width: 50px;
        height: 50px;
        font-size: 16px;
    }
    
    .step-connector {
        margin: 0 12px;
    }
}

/* Mobile Landscape and Portrait */
@media (max-width: 768px) {
    .checkout-progress-bar {
        margin: 1rem 0 2rem 0;
        padding: 15px 10px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .progress-step {
        margin: 0;
        min-width: 0;
    }

    .step-circle {
        width: 45px;
        height: 45px;
        font-size: 16px;
        margin-bottom: 8px;
    }

    .step-circle.active {
        transform: scale(1.1);
    }

    .step-connector {
        flex: 1;
        min-width: 30px;
        margin: 0 8px;
        height: 4px;
    }

    .step-label {
        font-size: 11px;
        letter-spacing: 0.3px;
    }
}

/* Small Mobile Devices */
@media (max-width: 576px) {
    .checkout-progress-bar {
        padding: 12px 8px;
        margin: 0.5rem 0 1.5rem 0;
    }

    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .step-connector {
        margin: 0 5px;
        min-width: 25px;
    }

    .step-label {
        font-size: 10px;
        letter-spacing: 0.2px;
    }
}

/* Extra Small Devices */
@media (max-width: 480px) {
    .checkout-progress-bar {
        padding: 10px 6px;
    }
    
    .step-circle {
        width: 35px;
        height: 35px;
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .step-connector {
        margin: 0 4px;
        min-width: 20px;
        height: 3px;
    }
    
    .step-label {
        font-size: 9px;
        letter-spacing: 0.1px;
    }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */

/* High contrast mode support */
@media (prefers-contrast: high) {
    .step-circle {
        border-width: 4px;
    }
    
    .step-circle.active,
    .step-circle.completed {
        border-width: 4px;
    }
    
    .step-connector {
        height: 6px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .step-circle,
    .step-label,
    .step-connector,
    .step-connector::before {
        transition: none;
        animation: none;
    }
    
    .step-circle.active {
        transform: none;
    }
    
    .step-circle.completed {
        animation: none;
    }
}

/* Focus styles for keyboard navigation */
.progress-step:focus-within .step-circle {
    outline: 3px solid var(--primary-color, #FF6B35);
    outline-offset: 2px;
}

/* ========================================
   DARK MODE SUPPORT (if needed)
   ======================================== */

@media (prefers-color-scheme: dark) {
    .checkout-progress-bar {
        background: transparent;
        border: none;
    }
    
    .step-circle {
        background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
        color: #f8f9fa;
        border-color: #495057;
    }
    
    .step-connector {
        background: linear-gradient(90deg, #495057 0%, #6c757d 100%);
    }
    
    .step-label {
        color: #adb5bd;
    }
}
