/**
 * DataFirefly Free Shipping Bar
 */

/* ========== Container ========== */
.dffreeshipbar {
    padding: 10px 20px;
    text-align: center;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.dffreeshipbar--banner {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.dffreeshipbar--cart {
    margin: 15px 0;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.dffreeshipbar--nav {
    padding: 6px 15px;
    font-size: 0.85em;
}

/* ========== Info / Success message ========== */
.dffreeshipbar__info,
.dffreeshipbar__success {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 16px;
    line-height: 1.4;
    flex-wrap: wrap;
}

.dffreeshipbar__icon {
    font-size: 18px;
    flex-shrink: 0;
}

.dffreeshipbar__icon--success {
    font-size: 20px;
    font-weight: bold;
}

.dffreeshipbar__message {
    display: inline;
}

.dffreeshipbar__amount {
    white-space: nowrap;
}

/* ========== Progress bar track ========== */
.dffreeshipbar__track {
    width: 100%;
    height: 6px;
    background-color: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.dffreeshipbar--cart .dffreeshipbar__track {
    height: 8px;
    border-radius: 4px;
}

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

.dffreeshipbar__fill--animated {
    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: dffreeshipbar-stripes 0.8s linear infinite;
}

.dffreeshipbar__fill--complete {
    background-image: none;
    animation: dffreeshipbar-pulse 1.5s ease-in-out 1;
}

/* ========== Animations ========== */
@keyframes dffreeshipbar-stripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 0;
    }
}

@keyframes dffreeshipbar-pulse {
    0% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 1;
    }
}

@keyframes dffreeshipbar-confetti {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.02);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.dffreeshipbar__success {
    animation: dffreeshipbar-confetti 0.5s ease-out;
}

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

    .dffreeshipbar__info,
    .dffreeshipbar__success {
        font-size: 12px;
    }

    .dffreeshipbar__icon {
        font-size: 15px;
    }

    .dffreeshipbar__track {
        height: 5px;
    }
}
