/* WooCommerce Free Shipping Progress Bar - Styles */

.wc-fsp-container {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
}

.wc-fsp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.wc-fsp-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wc-fsp-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #95a5a6;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.wc-fsp-close:hover {
    background: #ecf0f1;
    color: #7f8c8d;
}

.wc-fsp-message {
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 500;
}

.wc-fsp-progress-wrapper {
    position: relative;
}

.wc-fsp-amounts {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.wc-fsp-current {
    color: #2c3e50;
}

.wc-fsp-target {
    color: #2c3e50;
}

.wc-fsp-progress-bar {
    height: 12px;
    background: #ecf0f1;
    border-radius: 6px;
    position: relative;
    overflow: visible; /* Permettre aux icônes de dépasser */
    margin: 35px 0; /* ENCORE plus d'espace pour les grandes icônes */
}

.wc-fsp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%);
    border-radius: 6px;
    position: relative;
    transition: width 0.5s ease-in-out;
    min-width: 24px;
}

.wc-fsp-progress-icon {
    position: absolute;
    right: -6px; /* Plus loin pour éviter le débordement */
    top: 50%;
    transform: translateY(-50%);
    width: 30px; /* ENCORE plus grand */
    height: 30px; /* ENCORE plus grand */
    background: #a3195b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    border: 5px solid #2ecc71; /* Bordure encore plus épaisse */
    z-index: 30; /* Au-dessus de tout */
}

.wc-fsp-progress-icon > .wc-fsp-icon-truck{
    color: #3498db;
    font-size: 10px; /* BEAUCOUP plus grand */
}

.wc-fsp-icon-truck {
    font-size: 28px; /* BEAUCOUP plus grand */
}

.wc-fsp-icon-check {
    color: #27ae60;
    font-weight: bold;
    font-size: 30px; /* BEAUCOUP plus grand */
}

.wc-fsp-icon-gift {
    font-size: 28px; /* BEAUCOUP plus grand */
}

.wc-fsp-icon-star {
    font-size: 28px; /* BEAUCOUP plus grand */
    color: #f39c12;
}
.wc-fsp-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #7f8c8d;
    position: relative;
    margin-top: 8px;
}

.wc-fsp-label-start {
    font-weight: 500;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.wc-fsp-label-end {
    font-weight: 500;
    position: absolute;
    right: 30px; /* Aligné avec l'icône de droite */
    text-align: center;
    transform: translateX(50%);
}

.wc-fsp-label-end.wc-fsp-bonus {
    color: #e74c3c;
}

.wc-fsp-amounts {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.wc-fsp-current {
    color: #27ae60;
    font-weight: 600;
}

.wc-fsp-target {
    color: #2c3e50;
    font-weight: 600;
}

.wc-fsp-product-suggestion {
    margin-top: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.wc-fsp-product-suggestion p {
    margin: 0;
    font-size: 13px;
    color: #2c3e50;
}

/* Shortcode styles */
.wc-fsp-shortcode {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.wc-fsp-shortcode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.wc-fsp-shortcode h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

/* Styles pour différentes variantes */
.wc-fsp-style-minimal {
    border: none;
    background: transparent;
    padding: 10px 0;
}

.wc-fsp-style-compact .wc-fsp-progress-bar {
    height: 8px;
}

.wc-fsp-style-compact .wc-fsp-progress-icon {
    width: 20px;
    height: 20px;
    right: -10px;
}

/* Responsive design */
@media (max-width: 768px) {
    .wc-fsp-container {
        margin: 15px 0;
        padding: 15px;
    }
    
    .wc-fsp-title {
        font-size: 14px;
    }
    
    .wc-fsp-message {
        font-size: 13px;
    }
    
    .wc-fsp-amounts {
        font-size: 13px;
    }
}

/* Animation pour l'apparition */
.wc-fsp-container {
    animation: wc-fsp-fadeIn 0.5s ease-out;
}

@keyframes wc-fsp-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation de la barre de progression */
.wc-fsp-progress-fill {
    position: relative;
    overflow: hidden;
}

.wc-fsp-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: wc-fsp-shimmer 2s infinite;
}

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

/* Styles pour l'état de succès */
.wc-fsp-container.success .wc-fsp-progress-fill {
    background: linear-gradient(90deg, #27ae60 0%, #2ecc71 100%);
}

.wc-fsp-container.success .wc-fsp-message {
    color: #27ae60;
    font-weight: 600;
}

/* Styles pour l'intégration Elementor */
.elementor-widget-wc-free-shipping-progress .wc-fsp-container {
    margin: 0;
}

/* Styles pour les couleurs personnalisées */
.wc-fsp-container[data-bar-color] .wc-fsp-progress-fill {
    background: var(--wc-fsp-bar-color);
}

.wc-fsp-container[data-bg-color] {
    background: var(--wc-fsp-bg-color);
}

.wc-fsp-container[data-text-color] .wc-fsp-title,
.wc-fsp-container[data-text-color] .wc-fsp-message,
.wc-fsp-container[data-text-color] .wc-fsp-current,
.wc-fsp-container[data-text-color] .wc-fsp-target {
    color: var(--wc-fsp-text-color);
}


/* Styles pour les deux seuils */

.wc-fsp-free-shipping-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid #3498db;
    font-size: 10px;
    z-index: 2;
}

.wc-fsp-progress-icon {
    z-index: 3;
}

.wc-fsp-thresholds {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 11px;
}

.wc-fsp-threshold-free-shipping,
.wc-fsp-threshold-bonus {
    text-align: center;
    color: #7f8c8d;
    transition: color 0.3s ease;
}

.wc-fsp-threshold-free-shipping.achieved,
.wc-fsp-threshold-bonus.achieved {
    color: #27ae60;
    font-weight: 600;
}

.wc-fsp-threshold-amount {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}

.wc-fsp-threshold-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wc-fsp-bonus-active {
    color: #e74c3c !important;
    font-weight: 700 !important;
    animation: wc-fsp-pulse 2s infinite;
}

@keyframes wc-fsp-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.wc-fsp-icon-star {
    color: #f39c12;
    font-size: 14px;
}

.wc-fsp-icon-gift {
    color: #e74c3c;
    font-size: 12px;
}

/* Progression par étapes */
.wc-fsp-progress-fill {
    position: relative;
}

.wc-fsp-progress-fill::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.5);
    transform: translateX(-50%);
}

/* États de progression */
.wc-fsp-container.free-shipping-reached .wc-fsp-progress-fill {
    background: linear-gradient(90deg, #27ae60 0%, #27ae60 50%, #3498db 50%, #2980b9 100%);
}

.wc-fsp-container.bonus-reached .wc-fsp-progress-fill {
    background: linear-gradient(90deg, #27ae60 0%, #27ae60 50%, #e74c3c 50%, #c0392b 100%);
}

/* Responsive pour les seuils */
@media (max-width: 768px) {
    .wc-fsp-thresholds {
        font-size: 10px;
    }
    
    .wc-fsp-threshold-label {
        font-size: 9px;
    }
    
    .wc-fsp-free-shipping-marker {
        width: 16px;
        height: 16px;
        font-size: 8px;
    }
}


/* Marqueurs pour les deux seuils */
.wc-fsp-threshold-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 60px; /* Même taille que l'icône principale */
    height: 60px; /* Même taille que l'icône principale */
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    z-index: 30; /* Au-dessus de la barre */
    font-size: 28px; /* Plus grand */
}

.wc-fsp-threshold-free-shipping {
    left: 50%;
    border: 5px solid #3498db; /* Bordure plus épaisse */
}

.wc-fsp-threshold-free-shipping.achieved {
    border-color: #27ae60;
    background: #d5f4e6;
}

.wc-fsp-threshold-bonus {
    right: -30px; /* Même position que l'icône principale */
    border: 5px solid #e74c3c; /* Bordure plus épaisse */
}

.wc-fsp-threshold-bonus.achieved {
    border-color: #f39c12;
    background: #fef9e7;
}

/* États de progression */
.wc-fsp-container.free-shipping-reached .wc-fsp-progress-fill {
    background: linear-gradient(90deg, #27ae60 0%, #3498db 50%, #e74c3c 100%);
}

.wc-fsp-container.bonus-reached .wc-fsp-progress-fill {
    background: linear-gradient(90deg, #27ae60 0%, #3498db 50%, #f39c12 100%);
}

/* Animation pour les seuils atteints */
.wc-fsp-threshold-marker.achieved {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* Responsive pour les icônes */
@media (max-width: 768px) {
    .wc-fsp-progress-icon,
    .wc-fsp-threshold-marker {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
    
    .wc-fsp-progress-icon {
        right: -27px;
    }
    
    .wc-fsp-threshold-bonus {
        right: -27px;
    }
    
    .wc-fsp-progress-bar {
        margin: 30px 0;
    }
}

@media (max-width: 480px) {
    .wc-fsp-progress-icon,
    .wc-fsp-threshold-marker {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    
    .wc-fsp-progress-icon {
        right: -25px;
    }
    
    .wc-fsp-threshold-bonus {
        right: -25px;
    }
    
    .wc-fsp-progress-bar {
        margin: 25px 0;
    }
}


/* Libellés des montants sous les marqueurs */
.wc-fsp-threshold-labels {
    position: relative;
    height: 20px;
    margin-top: 5px;
}

.wc-fsp-threshold-amount-free {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    top: 12px;
    font-weight: 600;
    color: #3498db;
    text-align: center;
}

.wc-fsp-threshold-amount-bonus {
    position: absolute;
    right: 30px; /* Aligné avec l'icône de droite */
    transform: translateX(50%);
    font-size: 12px;
    top: 12px;
    font-weight: 600;
    color: #e74c3c;
    text-align: center;
}

