/**
 * Free Shipping Threshold Styles
 */

.freeshipping-container {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.freeshipping-header {
    padding: 8px 15px;
    margin: 0;
    background: linear-gradient(90deg, #fff8e1 0%, #fff3cd 100%);
    border-bottom: 1px solid #ffc107;
}

.freeshipping-cart {
    margin: 15px 0;
    padding: 15px;
    border: 1px solid #e0e0e0;
}

.freeshipping-message {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    margin-bottom: 8px;
}

.freeshipping-message i,
.freeshipping-message .material-icons {
    font-size: 20px;
}

.freeshipping-progress {
    color: #333;
}

.freeshipping-progress i,
.freeshipping-progress .material-icons {
    color: #ff9800;
}

.freeshipping-success {
    color: #2e7d32;
    margin-bottom: 0;
}

.freeshipping-success i,
.freeshipping-success .material-icons {
    color: #4caf50;
}

.freeshipping-remaining {
    color: #e65100;
    font-weight: 700;
    font-size: 15px;
}

.freeshipping-bar-container {
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.freeshipping-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease-in-out;
    position: relative;
}

.freeshipping-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: shimmer 2s infinite;
}

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

.freeshipping-threshold-info {
    font-size: 12px;
    color: #666;
    text-align: right;
}

/* Responsive */
@media (max-width: 767px) {
    .freeshipping-container {
        padding: 8px 12px;
    }

    .freeshipping-message {
        font-size: 13px;
        flex-wrap: wrap;
    }

    .freeshipping-message i,
    .freeshipping-message .material-icons {
        font-size: 18px;
    }
}

/* Animation for success state */
.freeshipping-success {
    animation: celebrate 0.5s ease-out;
}

@keyframes celebrate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .freeshipping-container {
        background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
        border-color: #404040;
    }

    .freeshipping-progress {
        color: #e0e0e0;
    }

    .freeshipping-threshold-info {
        color: #aaa;
    }
}
