.cfb-floating-buttons {
    --cfb-desktop-size: 58px;
    --cfb-mobile-size: 50px;
    --cfb-gap: 14px;
    position: fixed;
    z-index: 99999;
    display: flex;
    gap: var(--cfb-gap);
    pointer-events: none;
}

.cfb-position-left,
.cfb-position-right {
    bottom: 96px;
    flex-direction: column;
    transform: none;
}

.cfb-position-left {
    left: 22px;
}

.cfb-position-right {
    right: 22px;
}

.cfb-position-center {
    left: 50%;
    bottom: 24px;
    flex-direction: row;
    transform: translateX(-50%);
}

.cfb-button {
    position: relative;
    width: var(--cfb-desktop-size);
    height: var(--cfb-desktop-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    text-decoration: none;
    pointer-events: auto;
    filter: drop-shadow(0 16px 20px rgba(15, 23, 42, 0.22));
    transition: transform 180ms ease, filter 180ms ease;
}

.cfb-button::before {
    content: "";
    position: absolute;
    inset: -7px;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
    opacity: 0.9;
}

.cfb-icon-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: inherit;
    background: #fff;
}

.cfb-icon-wrap img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.cfb-button:hover,
.cfb-button:focus-visible {
    transform: translateY(-4px) scale(1.04);
    filter: drop-shadow(0 20px 26px rgba(15, 23, 42, 0.28));
}

.cfb-tooltip {
    position: absolute;
    top: 50%;
    right: calc(100% + 13px);
    width: max-content;
    max-width: 180px;
    padding: 8px 11px;
    border-radius: 8px;
    background: rgba(17, 24, 39, 0.94);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    opacity: 0;
    transform: translate(8px, -50%);
    transition: opacity 160ms ease, transform 160ms ease;
    pointer-events: none;
    white-space: nowrap;
}

.cfb-position-left .cfb-tooltip {
    right: auto;
    left: calc(100% + 13px);
    transform: translate(-8px, -50%);
}

.cfb-position-center .cfb-tooltip {
    top: auto;
    right: auto;
    bottom: calc(100% + 13px);
    left: 50%;
    transform: translate(-50%, 8px);
}

.cfb-button:hover .cfb-tooltip,
.cfb-button:focus-visible .cfb-tooltip {
    opacity: 1;
    transform: translate(0, -50%);
}

.cfb-position-left .cfb-button:hover .cfb-tooltip,
.cfb-position-left .cfb-button:focus-visible .cfb-tooltip {
    transform: translate(0, -50%);
}

.cfb-position-center .cfb-button:hover .cfb-tooltip,
.cfb-position-center .cfb-button:focus-visible .cfb-tooltip {
    transform: translate(-50%, 0);
}

.cfb-animation-pulse .cfb-button::before {
    animation: cfb-pulse 1.8s ease-out infinite;
}

.cfb-animation-float .cfb-button {
    animation: cfb-float 2.7s ease-in-out infinite;
}

.cfb-animation-float .cfb-button:nth-child(2) {
    animation-delay: 0.25s;
}

.cfb-animation-shine .cfb-icon-wrap::after {
    content: "";
    position: absolute;
    top: -35%;
    left: -85%;
    width: 45%;
    height: 170%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
    transform: rotate(22deg);
    animation: cfb-shine 2.8s ease-in-out infinite;
}

@keyframes cfb-pulse {
    0% {
        transform: scale(0.88);
        opacity: 0.72;
    }
    70% {
        transform: scale(1.2);
        opacity: 0;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

@keyframes cfb-float {
    0%,
    100% {
        translate: 0 0;
    }
    50% {
        translate: 0 -8px;
    }
}

@keyframes cfb-shine {
    0% {
        left: -85%;
    }
    55%,
    100% {
        left: 130%;
    }
}

@media (max-width: 767px) {
    .cfb-floating-buttons {
        gap: max(8px, calc(var(--cfb-gap) - 4px));
    }

    .cfb-button {
        width: var(--cfb-mobile-size);
        height: var(--cfb-mobile-size);
    }

    .cfb-position-left {
        left: 14px;
        bottom: 76px;
    }

    .cfb-position-right {
        right: 14px;
        bottom: 76px;
    }

    .cfb-position-center {
        bottom: 16px;
    }

    .cfb-device-desktop {
        display: none;
    }
}

@media (min-width: 768px) {
    .cfb-device-mobile {
        display: none;
    }
}
