#floating-snap-btn-wrapper {
    position: fixed;
    top: var(--cfb-init-top, 40%);
    z-index: 999999;
    touch-action: none;
}

#floating-snap-btn-wrapper.left {
    left: 0 !important;
    right: auto !important;
}

#floating-snap-btn-wrapper.right {
    right: 0 !important;
    left: auto !important;
}

/* Base tab button */
#floating-snap-btn-wrapper .fab-btn {
    position: relative;
    overflow: hidden;
    background-color: var(--cfb-bg-color, #6B26BB);
    color: var(--cfb-text-color, #ffffff);
    padding: 15px 5px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    white-space: nowrap;
    letter-spacing: 1.5px;
    text-transform: capitalize;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-block;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Glow wave layer — pseudo element that sweeps bottom to top */
#floating-snap-btn-wrapper .fab-btn::before {
    content: '';
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top,
            rgba(255, 255, 255, 0.0) 0%,
            rgba(255, 255, 255, 0.3) 40%,
            rgba(255, 255, 255, 0.55) 55%,
            rgba(255, 255, 255, 0.3) 70%,
            rgba(255, 255, 255, 0.0) 100%);
    animation: cfb-wave-rise 2.8s infinite ease-in-out;
    pointer-events: none;
    z-index: 1;
}

/* Tab text stays above glow wave */
#floating-snap-btn-wrapper .fab-btn span {
    position: relative;
    z-index: 2;
}

/* Edge specific rotations and styles */
#floating-snap-btn-wrapper.left .fab-btn {
    border-radius: 0 8px 8px 0;
    border-left: none;
}

#floating-snap-btn-wrapper.right .fab-btn {
    transform: rotate(180deg);
    border-radius: 0 8px 8px 0;
    border-left: none;
}

/* Pull-out hover interactions */
#floating-snap-btn-wrapper .fab-btn:hover {
    box-shadow: 0px 6px 22px rgba(0, 0, 0, 0.25);
}

#floating-snap-btn-wrapper.left .fab-btn:hover {
    transform: translateX(3px);
}

#floating-snap-btn-wrapper.right .fab-btn:hover {
    transform: rotate(180deg) translateX(3px);
}

#floating-snap-btn-wrapper .fab-btn:active {
    opacity: 0.85;
}

/* Rising glow wave keyframes — sweeps from bottom to top then fades */
@keyframes cfb-wave-rise {
    0% {
        bottom: -100%;
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    70% {
        opacity: 1;
    }

    100% {
        bottom: 140%;
        opacity: 0;
    }
}