/* Prevent floating buttons from creating mobile horizontal scroll */
html,
body {
    overflow-x: hidden;
}

/* Floating wrapper */
.floating-buttons {
    position: fixed;
    right: 14px;
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* Common button style */
.float-btn {
    position: relative;
    width: 54px;
    height: 54px;
    min-width: 54px;
    min-height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-size: 24px;
    text-decoration: none !important;
    pointer-events: auto;
    isolation: isolate;
    overflow: hidden;
    box-shadow:
        0 12px 25px rgba(0, 0, 0, 0.32),
        inset 0 1px 2px rgba(255, 255, 255, 0.35);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: floatingMove 3s ease-in-out infinite;
}

.float-btn i {
    position: relative;
    z-index: 3;
}

/* WhatsApp real gradient */
.float-whatsapp {
    background: linear-gradient(145deg, #2fe56f 0%, #18b957 45%, #0b8f43 100%);
}

/* Call button matching your red brand */
.float-call {
    background: linear-gradient(145deg, #ff4b55 0%, #ed1c24 48%, #b80f17 100%);
    animation-delay: 0.35s;
}

/* Soft outside glow */
.float-btn::before {
    content: "";
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    z-index: -1;
    opacity: 0.7;
    animation: pulseRing 2s infinite;
}

.float-whatsapp::before {
    background: rgba(37, 211, 102, 0.45);
}

.float-call::before {
    background: rgba(237, 28, 36, 0.45);
}

/* Shine effect */
.float-btn::after {
    content: "";
    position: absolute;
    top: -60%;
    left: -80%;
    width: 55%;
    height: 220%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.55),
        transparent
    );
    transform: rotate(25deg);
    animation: shineMove 3.5s infinite;
    z-index: 2;
}

/* Hover only for desktop */
@media (hover: hover) and (pointer: fine) {
    .float-btn:hover {
        transform: translateY(-5px) scale(1.08);
        box-shadow:
            0 18px 35px rgba(0, 0, 0, 0.42),
            inset 0 1px 2px rgba(255, 255, 255, 0.4);
    }

    .float-btn:hover::after {
        animation-duration: 1.1s;
    }
}

/* Animations */
@keyframes pulseRing {
    0% {
        transform: scale(0.85);
        opacity: 0.75;
    }

    70% {
        transform: scale(1.35);
        opacity: 0;
    }

    100% {
        transform: scale(0.85);
        opacity: 0;
    }
}

@keyframes shineMove {
    0% {
        left: -90%;
    }

    45% {
        left: 130%;
    }

    100% {
        left: 130%;
    }
}

@keyframes floatingMove {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Tablet */
@media (max-width: 991px) {
    .floating-buttons {
        right: 12px;
        bottom: calc(16px + env(safe-area-inset-bottom));
        gap: 10px;
    }

    .float-btn {
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
        font-size: 22px;
    }
}

/* Mobile */
@media (max-width: 575px) {
    .floating-buttons {
        right: 10px;
        bottom: calc(14px + env(safe-area-inset-bottom));
        gap: 9px;
    }

    .float-btn {
        width: 46px;
        height: 46px;
        min-width: 46px;
        min-height: 46px;
        font-size: 20px;
    }

    .float-btn::before {
        inset: -5px;
    }
}

/* Very small mobile */
@media (max-width: 380px) {
    .floating-buttons {
        right: 8px;
        bottom: 12px;
    }

    .float-btn {
        width: 43px;
        height: 43px;
        min-width: 43px;
        min-height: 43px;
        font-size: 18px;
    }
}