/* Modern Order Progress Bar Styles - Redesigned */
.woocommerce-order-progress-bar {
    --primary-color: #6366f1;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --border-radius: 16px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* Remove double border from WooCommerce order details */
.woocommerce-order-details .woocommerce-order-progress-bar,
.woocommerce-order-details ~ .woocommerce-order-progress-bar,
.woocommerce-order-details + .woocommerce-order-progress-bar {
    border: none !important;
    box-shadow: none !important;
    margin: 0 0 30px 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Modern container styling */
.woocommerce-order-progress-bar:not(.inside-order-details) {
    margin: 0 0 50px 0;
    padding: 40px 35px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.woocommerce-order-progress-bar:not(.inside-order-details)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

/* Modern progress bar layout */
.wc-progress-bar {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 15px 60px;
    margin-bottom: 30px;
}

.progress-line {
    position: absolute;
    top: 48px;
    left: 8%;
    right: 8%;
    height: 6px;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 8px;
    z-index: 1;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    border-radius: 8px;
    transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.6) 50%, 
        transparent 100%);
    animation: shimmer 2.5s infinite;
}

.progress-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
    padding: 0 12px;
}

.step-marker {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 4px solid #fff;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    transform: translateY(0);
}

.step-marker i {
    font-size: 28px;
    transition: var(--transition);
}

/* Modern step states */
.progress-step.pending .step-marker {
    background: linear-gradient(135deg, #fef3c7 0%, #f59e0b 100%);
    color: #92400e;
}

.progress-step.processing .step-marker {
    background: linear-gradient(135deg, #dbeafe 0%, #3b82f6 100%);
    color: #1e40af;
}

.progress-step.on-hold .step-marker {
    background: linear-gradient(135deg, #f3f4f6 0%, #9ca3af 100%);
    color: #374151;
}

.progress-step.shipped .step-marker {
    background: linear-gradient(135deg, #e0e7ff 0%, #6366f1 100%);
    color: #3730a3;
}

.progress-step.completed .step-marker {
    background: linear-gradient(135deg, #d1fae5 0%, #10b981 100%);
    color: #065f46;
}

.progress-step.active .step-marker {
    transform: scale(1.2) translateY(-8px);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.2),
        0 0 0 6px #fff,
        0 0 0 10px rgba(99, 102, 241, 0.1);
    animation: float 3s ease-in-out infinite, pulse-ring 2s infinite;
}

.progress-step.completed .step-marker {
    transform: translateY(-4px);
    box-shadow: 
        0 8px 25px rgba(16, 185, 129, 0.3),
        0 4px 12px rgba(16, 185, 129, 0.2);
}

.progress-step.completed .step-marker::after {
    content: '';
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    background: var(--success-color);
    border-radius: 50%;
    border: 3px solid #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-size: 16px;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.step-label {
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
    margin-top: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
    transition: var(--transition);
    position: relative;
    background: linear-gradient(135deg, #64748b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-label::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    transition: var(--transition);
    transform: translateX(-50%);
    border-radius: 2px;
}

.progress-step.active .step-label {
    font-weight: 700;
    transform: translateY(3px);
    background: linear-gradient(135deg, var(--primary-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.progress-step.active .step-label::after {
    width: 40px;
}

.progress-step.completed .step-label {
    background: linear-gradient(135deg, var(--success-color), #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Modern current status box */
.current-status {
    text-align: center;
    padding: 25px 30px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-radius: 16px;
    font-size: 18px;
    border-left: 6px solid var(--primary-color);
    margin-top: 30px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.current-status::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(99, 102, 241, 0.3) 50%, 
        transparent 100%);
}

.status-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.status-icon {
    font-size: 24px;
    animation: bounce 2s infinite;
    background: linear-gradient(135deg, var(--primary-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.status-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.status-text strong {
    color: var(--dark-color);
    font-size: 16px;
    font-weight: 600;
}

.status-highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.5px;
}

/* Modern animations */
@keyframes float {
    0%, 100% { transform: scale(1.2) translateY(-8px); }
    50% { transform: scale(1.2) translateY(-12px); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4), 0 0 0 6px #fff, 0 0 0 10px rgba(99, 102, 241, 0.1); }
    70% { box-shadow: 0 0 0 10px rgba(99, 102, 241, 0), 0 0 0 6px #fff, 0 0 0 14px rgba(99, 102, 241, 0.1); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0), 0 0 0 6px #fff, 0 0 0 10px rgba(99, 102, 241, 0.1); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-6px);}
    60% {transform: translateY(-4px);}
}

/* Enhanced responsive design */
@media (max-width: 1200px) {
    .wc-progress-bar {
        padding: 0 10px 55px;
    }
    
    .step-marker {
        width: 65px;
        height: 65px;
    }
    
    .step-marker i {
        font-size: 26px;
    }
    
    .progress-line {
        left: 6%;
        right: 6%;
        top: 46px;
    }
}

@media (max-width: 768px) {
    .woocommerce-order-progress-bar:not(.inside-order-details) {
        padding: 30px 20px;
        margin: 0 0 40px 0;
    }
    
    .wc-progress-bar {
        padding: 0 0 45px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .progress-step {
        flex: 0 0 33.333%;
        margin-bottom: 30px;
        padding: 0 8px;
    }
    
    .step-label {
        font-size: 14px;
    }
    
    .step-marker {
        width: 55px;
        height: 55px;
        margin-bottom: 15px;
    }
    
    .step-marker i {
        font-size: 22px;
    }
    
    .progress-line {
        left: 12%;
        right: 12%;
        top: 38px;
        height: 5px;
    }
    
    .progress-step.completed .step-marker::after {
        width: 22px;
        height: 22px;
        background-size: 14px;
        top: -6px;
        right: -6px;
    }
    
    .current-status {
        font-size: 16px;
        padding: 20px;
    }
    
    .status-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .status-highlight {
        font-size: 18px;
    }
    
    .status-icon {
        font-size: 22px;
    }
    
    .progress-step.active .step-marker {
        transform: scale(1.15) translateY(-6px);
    }
}

@media (max-width: 576px) {
    .woocommerce-order-progress-bar:not(.inside-order-details) {
        padding: 25px 15px;
        margin: 0 0 30px 0;
    }
    
    .progress-step {
        flex: 0 0 50%;
    }
    
    .step-label {
        font-size: 13px;
        padding: 0 5px;
    }
    
    .step-marker {
        width: 50px;
        height: 50px;
    }
    
    .step-marker i {
        font-size: 20px;
    }
    
    .progress-line {
        left: 15%;
        right: 15%;
        top: 35px;
    }
    
    .current-status {
        font-size: 15px;
        padding: 18px;
    }
    
    .status-highlight {
        font-size: 16px;
    }
}

/* Fix for WooCommerce tracking page */
.woocommerce .woocommerce-order-progress-bar {
    margin: 30px 0 40px;
}

.track_order .woocommerce-order-progress-bar {
    margin-bottom: 40px;
}

/* Specific styling for order details page */
.woocommerce-order-details {
    margin-bottom: 40px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .woocommerce-order-progress-bar:not(.inside-order-details) {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-color: rgba(255, 255, 255, 0.05);
        color: #e2e8f0;
    }
    
    .step-label {
        background: linear-gradient(135deg, #94a3b8, #cbd5e1);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .progress-step.active .step-label {
        background: linear-gradient(135deg, var(--primary-color), var(--success-color));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .current-status {
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
    }
    
    .step-marker {
        background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
        border-color: #334155;
    }
    
    .progress-line {
        background: rgba(255, 255, 255, 0.08);
    }
    
    .status-text strong {
        color: #f1f5f9;
    }
}