/* ======================================================
   FLOATING BUTTON V2.0 - STYLE SHEET
   ====================================================== */

/* ---------- Container ---------- */
.fbl-container-v2 {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
    z-index: 9999;
    animation-duration: 0.6s;
    animation-fill-mode: both;
}

/* ---------- Left & Right Groups ---------- */
.fbl-left,
.fbl-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.fbl-left {
    align-items: flex-start;
}
.fbl-right {
    align-items: flex-end;
}

/* ---------- Individual Button ---------- */
.fbl-btn-item {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    position: relative;
    /* width, height, background, border-radius are set inline via PHP */
}

.fbl-btn-item i {
    font-size: 30px;
    line-height: 1;
    transition: transform 0.3s ease;
}

.fbl-btn-item:hover i {
    transform: scale(1.1);
}

/* ---------- Hover Animations ---------- */
.fbl-hover-scale:hover {
    transform: scale(1.1);
}
.fbl-hover-rotate:hover {
    transform: rotate(5deg) scale(1.1);
}
.fbl-hover-glow:hover {
    box-shadow: 0 0 25px rgba(102, 126, 234, 0.6) !important;
}

/* ---------- Labels ---------- */
.fbl-btn-item span {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.fbl-btn-item:hover span {
    opacity: 1 !important;
}

/* Right side buttons → label appears on the LEFT */
.fbl-right .fbl-btn-item span {
    right: auto;
    left: calc(100% + 15px);
}

/* Left side button → label appears on the RIGHT */
.fbl-left .fbl-btn-item span {
    left: auto;
    right: calc(100% + 15px);
}

/* ---------- Greeting Bubble ---------- */
.fbl-greeting-bubble {
    background: #fff;
    padding: 8px 16px;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    font-size: 14px;
    color: #333;
    pointer-events: auto;
    border: 1px solid #eee;
    margin-bottom: 5px;
    animation: fbl-pulse 2.5s infinite ease-in-out;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 220px;
    text-align: center;
    word-break: break-word;
}

/* ---------- Load Animations ---------- */
@keyframes fbl-slideIn {
    from { opacity: 0; transform: translateY(80px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fbl-bounce {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.15); }
}
@keyframes fbl-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.7; }
}
@keyframes fbl-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(102,126,234,0.3); }
    50%      { box-shadow: 0 0 30px rgba(102,126,234,0.8); }
}
@keyframes fbl-shake {
    0%, 100% { transform: rotate(0deg); }
    25%      { transform: rotate(-4deg); }
    75%      { transform: rotate(4deg); }
}

/* Apply animation based on data attribute */
.fbl-container-v2[data-anim="slideIn"] .fbl-btn-item {
    animation-name: fbl-slideIn;
}
.fbl-container-v2[data-anim="bounce"] .fbl-btn-item {
    animation-name: fbl-bounce;
    animation-iteration-count: 1;
}
.fbl-container-v2[data-anim="pulse"] .fbl-btn-item {
    animation-name: fbl-pulse;
    animation-iteration-count: infinite;
}
.fbl-container-v2[data-anim="glow"] .fbl-btn-item {
    animation-name: fbl-glow;
    animation-iteration-count: infinite;
}
.fbl-container-v2[data-anim="shake"] .fbl-btn-item {
    animation-name: fbl-shake;
    animation-iteration-count: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .fbl-container-v2 {
        padding: 0 12px;
        bottom: 15px;
    }
    .fbl-btn-item {
        width: 50px !important;
        height: 50px !important;
    }
    .fbl-btn-item i {
        font-size: 22px !important;
    }
    .fbl-greeting-bubble {
        font-size: 12px !important;
        padding: 6px 12px;
        max-width: 160px;
    }
    .fbl-btn-item span {
        display: none !important; /* Hide labels on mobile to avoid clutter */
    }
}

@media (max-width: 480px) {
    .fbl-container-v2 {
        padding: 0 8px;
        bottom: 10px;
    }
    .fbl-left,
    .fbl-right {
        gap: 6px;
    }
    .fbl-btn-item {
        width: 44px !important;
        height: 44px !important;
    }
    .fbl-btn-item i {
        font-size: 18px !important;
    }
}

/* ---------- Utility ---------- */
.fbl-clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* ---------- Shortcode Button ---------- */
.fbl-shortcode-btn {
    display: inline-block;
    background: #25D366;
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    transition: background 0.3s ease;
}
.fbl-shortcode-btn:hover {
    background: #1da851;
    color: #fff;
}
.fbl-container-v2 .fbl-btn-item img.fbl-platform-icon { width: 52% !important; height: 52% !important; max-width: 52% !important; max-height: 52% !important; object-fit: contain; display: block; flex: none; margin: 0; padding: 0; border: 0; box-shadow: none; }
