/* Botón Flotante para WordPress - Estilos Front-End */
:root {
    --fbb-color-start: #6366f1;
    --fbb-color-end: #d946ef;
    --fbb-color-text: #ffffff;
    --fbb-color-glow: rgba(99, 102, 241, 0.5);
}

.fbb-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    pointer-events: none; /* Let clicks pass through margins */
}

.fbb-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--fbb-color-start), var(--fbb-color-end));
    color: var(--fbb-color-text) !important;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease, filter 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: visible;
    pointer-events: auto; /* Enable hover/clicks on the button itself */
}

/* Icon styling */
.fbb-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    fill: currentColor;
    color: var(--fbb-color-text);
}
.fbb-icon svg {
    width: 100%;
    height: 100%;
}

/* ANIMATIONS */

/* 1. Floating animation */
.fbb-anim-float {
    animation: fbb-float-keyframes 3s ease-in-out infinite;
}

@keyframes fbb-float-keyframes {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* 2. Pulse Glow animation */
.fbb-anim-pulse {
    animation: fbb-pulse-keyframes 2s infinite;
}

@keyframes fbb-pulse-keyframes {
    0% {
        box-shadow: 0 0 0 0 var(--fbb-color-glow), 0 4px 15px rgba(0, 0, 0, 0.15);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(255, 255, 255, 0), 0 4px 15px rgba(0, 0, 0, 0.15);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0), 0 4px 15px rgba(0, 0, 0, 0.15);
    }
}

/* 3. Combined Floating & Pulse Glow animation */
.fbb-anim-both {
    animation: fbb-float-keyframes 3s ease-in-out infinite, fbb-pulse-keyframes 2s infinite;
}

/* Hover & Active Effects */
.fbb-button:hover {
    transform: scale(1.06) translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    filter: brightness(1.08);
}

/* When both animations are running, reset hover transform slightly to feel responsive */
.fbb-anim-float:hover,
.fbb-anim-both:hover {
    /* Stop the floating keyframes scale/transform override during hover if desired, or let transform mix.
       Instead, we can use a wrapper or just simple transition. We keep it simple: */
    animation-play-state: paused;
}

.fbb-button:active {
    transform: scale(0.98) translateY(0);
}

/* Responsive design */
@media (max-width: 600px) {
    .fbb-container {
        bottom: 16px;
        right: 16px;
    }
    
    .fbb-button {
        padding: 11px 18px;
        font-size: 13.5px;
        gap: 8px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    }

    .fbb-icon {
        width: 18px;
        height: 18px;
    }
}
