/* JB Floating Widget - Premium Design */

.jb-floating-widget-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    pointer-events: none; /* Let clicks pass through empty space */
}

.jb-floating-widget-wrapper > * {
    pointer-events: auto; /* Re-enable clicks for the actual buttons */
}

/* --- Back to Top Button --- */
.jb-back-to-top {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #4a4a4a;
}

.jb-back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.jb-back-to-top:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
    color: #1a1a1a;
}

.jb-back-to-top svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.jb-back-to-top:hover svg {
    transform: translateY(-2px);
}

/* --- WhatsApp Button --- */
.jb-whatsapp-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    transition: all 0.3s ease;
    animation: jb-bounce-in 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, jb-pulse 3s infinite;
    animation-delay: 0s, 1.5s; /* Start pulse after bounce in */
}

.jb-whatsapp-btn:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
    animation: none; /* Stop pulsing on hover */
}

.jb-whatsapp-btn svg {
    width: 35px;
    height: 35px;
    fill: #fff;
    transition: transform 0.3s ease;
}

.jb-whatsapp-btn:hover svg {
    transform: scale(1.05);
}

/* Animations */
@keyframes jb-bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(20px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes jb-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .jb-floating-widget-wrapper {
        bottom: 20px;
        right: 20px;
        gap: 12px;
    }
    .jb-whatsapp-btn {
        width: 55px;
        height: 55px;
    }
    .jb-whatsapp-btn svg {
        width: 32px;
        height: 32px;
    }
    .jb-back-to-top {
        width: 40px;
        height: 40px;
    }
    .jb-back-to-top svg {
        width: 20px;
        height: 20px;
    }
}
