/* ==========================================================
   Free Shipping Bar — PrestaShop 8 Module v1.1
   Colors are set inline from Back Office configuration.
   This file handles layout, animations, and structure only.
   ========================================================== */

.fsb-container {
    border-width: 2px;
    border-style: solid;
    border-radius: 0;
    padding: 18px 22px;
    margin: 0;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

/* Subtle animated shimmer when goal is reached */
.fsb-container.fsb-reached::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: fsb-shimmer 2.5s ease-in-out infinite;
    pointer-events: none;
}

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

/* Message text */
.fsb-message {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.fsb-reached .fsb-message {
    font-size: 16px;
}

/* Progress bar wrapper */
.fsb-bar-wrapper {
    width: 100%;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

/* Progress bar fill */
.fsb-bar-progress {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
}

/* Animated stripe effect on the progress bar */
.fsb-bar-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(
        -45deg,
        rgba(255, 255, 255, 0.2) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.2) 75%,
        transparent 75%,
        transparent
    );
    background-size: 20px 20px;
    animation: fsb-stripes 1s linear infinite;
}

@keyframes fsb-stripes {
    from { background-position: 0 0; }
    to   { background-position: 20px 0; }
}

/* Hint text below the bar */
.fsb-hint {
    font-size: 12px;
    margin-top: 8px;
    letter-spacing: 0.3px;
}

/* ---- Responsive ---- */
@media (max-width: 576px) {
    .fsb-container {
        padding: 14px 16px;
        margin: 0;
    }

    .fsb-message {
        font-size: 14px;
    }

    .fsb-bar-wrapper {
        height: 10px;
    }
}

/* Fix: hide empty card-block left by theme when it moves the cart title */
body#cart .cart-grid-body .card-block:not(.cart-detailed-subtotals):not(.cart-summary-totals) {
    display: none !important;
}
body#cart .cart-grid-body .card-block:not(.cart-detailed-subtotals):not(.cart-summary-totals) + * {
    border-top: none !important;
}
