/* ============================================
   KidsNation Floating Buttons - Frontend
   ============================================ */

.knfb-floating-container {
    position: fixed;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.knfb-floating-container.knfb-position-bottom-right {
    bottom: 0;
    right: 0;
}

.knfb-floating-container.knfb-position-bottom-left {
    bottom: 0;
    left: 0;
}

.knfb-btn {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.knfb-btn:hover {
    transform: scale(1.08);
}

.knfb-btn:active {
    transform: scale(0.95);
}

/* Pulse Animation */
@keyframes knfb-pulse {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }
    70% {
        transform: scale(1.4);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Slide Up Animation */
@keyframes knfb-slide-up {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Slide Left Animation */
@keyframes knfb-slide-left {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Fade In Animation */
@keyframes knfb-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Bounce Animation */
@keyframes knfb-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Zoom In Animation */
@keyframes knfb-zoom-in {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Tooltip */
.knfb-btn::before {
    content: attr(data-label);
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    background: #2D3436;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.knfb-btn::after {
    content: '';
    position: absolute;
    right: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: #2D3436;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.knfb-btn:hover::before,
.knfb-btn:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

/* Mobile Tooltip Hide */
@media (max-width: 768px) {
    .knfb-btn::before,
    .knfb-btn::after {
        display: none;
    }
}
