/* ===== Модерна постоянна лента (винаги в дъното) ===== */
.kwf-bar-v5 {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999999;
    background: #ffffff;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.35s ease;
    border-radius: 16px 16px 0 0;
}

/* Скрито състояние (минимизирано) */
.kwf-bar-v5.kwf-bar-v5--hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.kwf-bar-v5-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    min-height: 52px;
    box-sizing: border-box;
    gap: 14px;
}

.kwf-bar-v5-msg {
    font-size: 15px;
    color: #1e293b;
    line-height: 1.4;
    flex: 1;
}

.kwf-bar-v5-msg b {
    font-weight: 700;
    color: #0f172a;
}

/* Бутон за минимизиране */
.kwf-bar-v5-minimize {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.kwf-bar-v5-minimize:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Прогрес линия */
.kwf-bar-v5-track {
    width: 100%;
    height: 5px;
    background: #e2e8f0;
    overflow: hidden;
    border-radius: 0 0 16px 16px;
}

.kwf-bar-v5-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 0 2px 2px 0;
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Shimmer ефект, когато прагът не е достигнат */
.kwf-bar-v5:not([data-reached]) .kwf-bar-v5-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2.8s infinite;
}

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

/* Успешно достигнат праг */
.kwf-bar-v5[data-reached="true"] .kwf-bar-v5-fill {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

/* ===== Минимизирано балонче (десктоп – в левия ъгъл) ===== */
.kwf-bubble-v5 {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 999998;
    background: #ffffff;
    border-radius: 50px;
    padding: 14px 20px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: box-shadow 0.3s, transform 0.2s;
    user-select: none;
    max-width: calc(100vw - 48px);
}

.kwf-bubble-v5:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.16);
    transform: translateY(-2px);
}

.kwf-bubble-v5-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.kwf-bubble-v5-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.kwf-bubble-v5-text {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kwf-bubble-v5-track {
    width: 44px;
    height: 5px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.kwf-bubble-v5-fill {
    height: 100%;
    width: 0%;
    background: #22c55e;
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* ===== МОБИЛНА АДАПТАЦИЯ – центрирано балонче ===== */
@media (max-width: 768px) {
    .kwf-bar-v5-inner {
        padding: 10px 14px;
        min-height: 46px;
    }
    .kwf-bar-v5-msg {
        font-size: 13px;
    }
    .kwf-bar-v5-track {
        height: 4px;
    }

    /* Балончето е центрирано и точно в дъното */
    .kwf-bubble-v5 {
        bottom: 3px;
        left: 50%;
        transform: translateX(-50%);  /* перфектно центриране */
        padding: 12px 18px;
        border-radius: 40px;
        max-width: 90vw;             /* да не излиза извън екрана */
    }

    /* При hover вдигаме леко, но запазваме центрирането */
    .kwf-bubble-v5:hover {
        transform: translateX(-50%) translateY(-2px);
    }

    .kwf-bubble-v5-icon {
        font-size: 20px;
    }
    .kwf-bubble-v5-text {
        font-size: 13px;
    }
    .kwf-bubble-v5-track {
        width: 36px;
        height: 4px;
    }
}