/* Smart Shipping Progress Bar - Ultra Minimal Professional Design v4.5.0 
 * Perfect synchronization between CSS structure and JavaScript rendering
 * Single-line layout with icon, text, progress bar, and cost info
 * Fully responsive with configurator style integration
 */

.wcpc-shipping-progress {
    background: white;
    border: 1px solid var(--wcpc-gray-200, #e5e7eb);
    border-radius: var(--wcpc-radius, 0.5rem);
    padding: var(--wcpc-space-4, 1rem);
    margin: var(--wcpc-space-4, 1rem) 0;
    font-family: var(--wcpc-font-sans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
    transition: all 0.2s ease;
    overflow: hidden;
}

.wcpc-shipping-progress.wcpc-stable {
    transition: none;
}

.wcpc-shipping-progress:hover {
    border-color: var(--wcpc-primary-light, #ef4444);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
    transform: translateY(-1px);
}

/* Single Line Layout */
.wcpc-shipping-content {
    display: flex;
    align-items: center;
    gap: var(--wcpc-space-4, 1rem);
    width: 100%;
}

.wcpc-shipping-icon {
    width: 20px;
    height: 20px;
    border-radius: var(--wcpc-radius-full, 9999px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.wcpc-shipping-icon.progress {
    background: var(--wcpc-primary-bg, #fee2e2);
    color: var(--wcpc-primary, #dc2626);
}

.wcpc-shipping-icon.complete {
    background: var(--wcpc-success-light, #d1fae5);
    color: var(--wcpc-success, #10b981);
}

.wcpc-shipping-text {
    display: flex;
    flex-direction: column;
    gap: var(--wcpc-space-1, 0.25rem);
    min-width: 0;
    flex: 1;
}

.wcpc-shipping-title {
    font-size: var(--wcpc-text-sm, 0.875rem);
    font-weight: 600;
    color: var(--wcpc-gray-800, #1f2937);
    margin: 0;
    line-height: 1.2;
}

.wcpc-shipping-subtitle {
    font-size: var(--wcpc-text-xs, 0.75rem);
    color: var(--wcpc-gray-600, #4b5563);
    margin: 0;
    line-height: 1.2;
}

.wcpc-shipping-subtitle.success {
    color: var(--wcpc-success, #10b981);
    font-weight: 600;
}

.wcpc-shipping-subtitle.warning {
    color: var(--wcpc-primary, #dc2626);
    font-weight: 600;
}

/* Ultra Minimal Progress Bar */
.wcpc-progress-container {
    flex: 1;
    max-width: 120px;
    position: relative;
}

.wcpc-progress-track {
    height: 3px;
    background: var(--wcpc-gray-200, #e5e7eb);
    border-radius: var(--wcpc-radius-full, 9999px);
    overflow: hidden;
    position: relative;
}

.wcpc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--wcpc-primary, #dc2626), var(--wcpc-primary-dark, #b91c1c));
    border-radius: var(--wcpc-radius-full, 9999px);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 2px;
}

.wcpc-progress-fill.complete {
    background: linear-gradient(90deg, var(--wcpc-success, #10b981), #059669);
}

.wcpc-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 8px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5));
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-8px); }
    100% { transform: translateX(8px); }
}

/* Compact Info Badge */
.wcpc-shipping-info {
    display: flex;
    align-items: center;
    gap: var(--wcpc-space-2, 0.5rem);
    flex-shrink: 0;
}

.wcpc-shipping-count {
    font-size: var(--wcpc-text-xs, 0.75rem);
    font-weight: 700;
    color: var(--wcpc-primary, #dc2626);
    font-variant-numeric: tabular-nums;
}

.wcpc-shipping-count.complete {
    color: var(--wcpc-success, #10b981);
}

.wcpc-shipping-cost {
    font-size: var(--wcpc-text-xs, 0.75rem);
    font-weight: 600;
    color: var(--wcpc-gray-700, #374151);
    font-variant-numeric: tabular-nums;
}

.wcpc-shipping-cost.free {
    color: var(--wcpc-success, #10b981);
}

/* Hover Effects */
.wcpc-shipping-progress:hover .wcpc-shipping-icon {
    transform: scale(1.05);
}

.wcpc-shipping-progress:hover .wcpc-progress-fill::after {
    animation-duration: 1s;
}

/* WooCommerce Integration - Progress bar at TOP */
.wcpc-shipping-progress + .woocommerce-cart-form {
    margin-top: var(--wcpc-space-4, 1rem);
}

.wcpc-shipping-progress:first-child {
    margin-top: 0;
}

/* When progress bar is at the top of cart */
.woocommerce-cart .wcpc-shipping-progress {
    margin-bottom: var(--wcpc-space-6, 1.5rem);
    margin-top: 0;
}

/* When after notices */
.woocommerce-notices-wrapper + .wcpc-shipping-progress {
    margin-top: var(--wcpc-space-4, 1rem);
}

/* Mini Cart Ultra Compact */
.widget_shopping_cart .wcpc-shipping-progress {
    padding: var(--wcpc-space-3, 0.75rem);
    margin: var(--wcpc-space-2, 0.5rem) 0;
    border-radius: var(--wcpc-radius-sm, 0.375rem);
}

.widget_shopping_cart .wcpc-shipping-content {
    gap: var(--wcpc-space-2, 0.5rem);
}

.widget_shopping_cart .wcpc-shipping-icon {
    width: 16px;
    height: 16px;
    font-size: 8px;
}

.widget_shopping_cart .wcpc-shipping-title {
    font-size: var(--wcpc-text-xs, 0.75rem);
}

.widget_shopping_cart .wcpc-shipping-subtitle {
    font-size: 10px;
}

.widget_shopping_cart .wcpc-progress-container {
    max-width: 80px;
}

.widget_shopping_cart .wcpc-progress-track {
    height: 2px;
}

.widget_shopping_cart .wcpc-shipping-count,
.widget_shopping_cart .wcpc-shipping-cost {
    font-size: 10px;
}

/* Cart Page */
.woocommerce-cart .wcpc-shipping-progress {
    margin: var(--wcpc-space-4, 1rem) 0;
    max-width: 100%;
}

/* Checkout Page */
.woocommerce-checkout .wcpc-shipping-progress {
    margin: var(--wcpc-space-3, 0.75rem) 0;
}

/* Order Review Table */
.woocommerce-checkout-review-order-table .wcpc-shipping-progress {
    border: none;
    box-shadow: none;
    background: var(--wcpc-gray-50, #f9fafb);
    margin: 0;
    padding: var(--wcpc-space-3, 0.75rem);
}

/* Mobile Responsive - Stacked Layout */
@media (max-width: 768px) {
    .wcpc-shipping-progress {
        padding: var(--wcpc-space-3, 0.75rem);
        margin: var(--wcpc-space-3, 0.75rem) 0;
    }
    
    .wcpc-shipping-content {
        flex-direction: column;
        gap: var(--wcpc-space-2, 0.5rem);
        align-items: stretch;
    }
    
    .wcpc-shipping-text {
        text-align: center;
    }
    
    .wcpc-progress-container {
        max-width: none;
        order: 1;
    }
    
    .wcpc-shipping-info {
        justify-content: center;
        order: 2;
    }
    
    .wcpc-shipping-icon {
        align-self: center;
        order: 0;
    }
}

/* Tablet Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    .wcpc-shipping-progress {
        padding: var(--wcpc-space-3, 0.75rem);
    }
    
    .wcpc-progress-container {
        max-width: 100px;
    }
}

/* Performance & Accessibility */
.wcpc-shipping-progress {
    opacity: 1;
    visibility: visible;
    min-height: 48px;
    will-change: transform;
}

.wcpc-shipping-progress.wcpc-loading {
    opacity: 0.8;
    pointer-events: none;
}

/* Smooth entrance animation */
.wcpc-shipping-progress {
    animation: wcpcSlideIn 0.3s ease-out;
}

@keyframes wcpcSlideIn {
    from {
        opacity: 0;
        transform: translateY(-2px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wcpc-shipping-progress {
        border-width: 2px;
    }
    
    .wcpc-progress-track {
        border: 1px solid var(--wcpc-gray-400, #9ca3af);
    }
    
    .wcpc-shipping-icon {
        border: 1px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wcpc-shipping-progress,
    .wcpc-shipping-progress *,
    .wcpc-progress-fill,
    .wcpc-progress-fill::after {
        animation: none !important;
        transition: none !important;
    }
}

/* Print styles */
@media print {
    .wcpc-shipping-progress {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .wcpc-progress-fill::after {
        display: none;
    }
}