/**
 * Free Shipping Info Bar Styles
 * Modern and responsive design
 */

.freeshipping-info-bar {
    margin: 20px 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.freeshipping-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.freeshipping-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Success state (envío gratis alcanzado) */
.freeshipping-success {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #2d5cc4;
}

.freeshipping-success .freeshipping-icon {
    font-size: 48px;
    line-height: 1;
    animation: bounceIn 0.6s ease-out;
    display: none;
}

.freeshipping-success .freeshipping-message {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    text-align: center;
}

.freeshipping-success .freeshipping-message strong {
    font-size: 24px;
    font-weight: 700;
    color: #2d5cc4;
}

.freeshipping-success .freeshipping-message span {
    font-size: 16px;
    opacity: 0.8;
    color: #333;
}

/* Progress state (aún falta para el envío gratis) */
.freeshipping-progress {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #333;
}

.freeshipping-progress .freeshipping-icon {
    font-size: 48px;
    line-height: 1;
    flex-shrink: 0;
    display: none;
}

.freeshipping-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.freeshipping-message {
    font-size: 16px;
    line-height: 1.4;
    text-align: center;
}

.freeshipping-message strong {
    font-size: 20px;
    font-weight: 700;
    color: #2d5cc4;
}

/* Info state (carrito vacío) */
.freeshipping-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: #333;
}

.freeshipping-info .freeshipping-icon {
    font-size: 48px;
    line-height: 1;
    display: none;
}

.freeshipping-info .freeshipping-message {
    font-size: 16px;
    line-height: 1.4;
    text-align: center;
}

.freeshipping-info .freeshipping-message strong {
    font-size: 18px;
    font-weight: 700;
    color: #2d5cc4;
}

/* Barra de progreso */
.freeshipping-bar {
    width: 100%;
}

.freeshipping-bar-bg {
    background: #e8edf5;
    border-radius: 20px;
    height: 30px;
    overflow: hidden;
    position: relative;
}

.freeshipping-bar-fill {
    background: #2d5cc4;
    height: 100%;
    border-radius: 20px;
    transition: width 0.6s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    position: relative;
    overflow: hidden;
}

.freeshipping-bar-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

.freeshipping-percentage {
    font-size: 13px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Animaciones */
@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .freeshipping-container {
        padding: 15px;
    }
    
    .freeshipping-progress,
    .freeshipping-success,
    .freeshipping-info {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .freeshipping-success .freeshipping-message strong {
        font-size: 20px;
    }
    
    .freeshipping-success .freeshipping-message span {
        font-size: 14px;
    }
    
    .freeshipping-message {
        font-size: 14px;
    }
    
    .freeshipping-message strong {
        font-size: 18px;
    }
    
    .freeshipping-info .freeshipping-message {
        font-size: 14px;
    }
    
    .freeshipping-info .freeshipping-message strong {
        font-size: 16px;
    }
    
    .freeshipping-bar-bg {
        height: 25px;
    }
    
    .freeshipping-percentage {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .freeshipping-info-bar {
        margin: 15px 0;
    }
    
    .freeshipping-container {
        padding: 12px;
    }
    
    .freeshipping-progress .freeshipping-icon,
    .freeshipping-success .freeshipping-icon,
    .freeshipping-info .freeshipping-icon {
        font-size: 36px;
    }
}
