/**
 * Cart Progress Block Styling
 */

/* Main Container */
.cart-progress-block {
    background: transparent;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 24px;
    margin: 24px 0;
    font-family: inherit;
}

.cart-progress-block.cart-progress-compact {
    padding: 16px;
    margin: 16px 0;
}

/* Progress Section */
.cart-progress-minimum,
.cart-progress-shipping {
    margin-bottom: 24px;
}

.cart-progress-minimum:last-child,
.cart-progress-shipping:last-child {
    margin-bottom: 0;
}

.cart-progress-compact .cart-progress-minimum,
.cart-progress-compact .cart-progress-shipping {
    margin-bottom: 16px;
}

/* Header */
.cart-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cart-progress-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.cart-progress-compact .cart-progress-title {
    font-size: 16px;
}

.cart-progress-amount {
    font-size: 16px;
    font-weight: 600;
    color: #666;
}

.cart-progress-compact .cart-progress-amount {
    font-size: 14px;
}

/* Progress Bar */
.cart-progress-bar-container {
    margin-bottom: 12px;
}

.cart-progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 12px;
    overflow: hidden;
    position: relative;
}

.cart-progress-compact .cart-progress-bar {
    height: 8px;
}

.cart-progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
}

/* Minimum Order Bar */
.minimum-order-bar .cart-progress-fill {
    background: #81C784;
}

/* Shipping Bar */
.shipping-bar .cart-progress-fill {
    background: #4C62A9;
}

/* Progress Text */
.cart-progress-text {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.cart-progress-text.success {
    color: #28a745;
    font-weight: 600;
    font-size: 16px;
}

.cart-progress-compact .cart-progress-text {
    font-size: 13px;
}

/* Success State */
.cart-progress-success {
    text-align: center;
    padding: 16px;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
}

.cart-progress-compact .cart-progress-success {
    padding: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-progress-block {
        padding: 16px;
    }
    
    .cart-progress-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .cart-progress-title {
        font-size: 16px;
    }
    
    .cart-progress-amount {
        font-size: 14px;
    }
    
    .cart-progress-text {
        font-size: 13px;
    }
}

/* Animation for progress bars */
@keyframes progressSlide {
    from {
        width: 0%;
    }
}

.cart-progress-fill {
    animation: progressSlide 1s ease-out;
}

/* Accessibility */
.cart-progress-bar {
    position: relative;
}

.cart-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cart-progress-block {
        border-color: #333;
        background: transparent;
    }
    
    .cart-progress-bar {
        border: 1px solid #333;
    }
    
    .minimum-order-bar .cart-progress-fill {
        background: #81C784;
    }
    
    .shipping-bar .cart-progress-fill {
        background: #1976D2;
    }
}

/* Focus states for accessibility */
.cart-progress-block:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Disabled checkout button styling */
.minimum-order-disabled {
    opacity: 0.6 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
    position: relative;
}

.minimum-order-disabled::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

/* Ensure disabled state is visible across different themes */
.minimum-order-disabled,
.minimum-order-disabled:hover,
.minimum-order-disabled:focus,
.minimum-order-disabled:active {
    opacity: 0.6 !important;
    filter: grayscale(50%);
    transform: none !important;
    box-shadow: none !important;
}