/* =========================================================
   CFS GROUP
   FLOATING CALL + WHATSAPP BUTTONS
   Professional Left Side Floating Action
   ========================================================= */


/* =========================================================
   01. FLOATING WRAPPER
   ========================================================= */

.cfs-floating-actions {
    position: fixed;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}


/* =========================================================
   02. COMMON FLOATING BUTTON
   ========================================================= */

.cfs-float-btn {
    position: relative;

    width: 56px;
    height: 56px;
    min-width: 56px;

    display: flex;
    align-items: center;

    border-radius: 30px;

    text-decoration: none;

    overflow: hidden;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.22);

    transition:
        width 0.35s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}


/* =========================================================
   03. ICON CONTAINER
   ========================================================= */

.cfs-float-icon {
    position: relative;

    width: 56px;
    height: 56px;
    min-width: 56px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-size: 21px;

    z-index: 3;
}


/* =========================================================
   04. ICON
   ========================================================= */

.cfs-float-icon i {
    position: relative;
    z-index: 5;

    display: inline-flex;

    align-items: center;
    justify-content: center;
}


/* =========================================================
   05. PHONE ICON BLINK EFFECT
   ========================================================= */

.cfs-float-call .cfs-float-icon i {

    animation:
        cfsPhoneBlink 1.6s ease-in-out infinite;

    transform-origin: center;
}


/*
   Strong but professional phone blink/ring effect
*/

@keyframes cfsPhoneBlink {

    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }

    10% {
        opacity: 0.45;
        transform: scale(0.92) rotate(-7deg);
    }

    20% {
        opacity: 1;
        transform: scale(1.08) rotate(7deg);
    }

    30% {
        opacity: 0.45;
        transform: scale(0.94) rotate(-6deg);
    }

    40% {
        opacity: 1;
        transform: scale(1.05) rotate(5deg);
    }

    55% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}


/* =========================================================
   06. PHONE OUTER BLINK RING
   ========================================================= */

.cfs-float-call .cfs-float-icon::before {

    content: "";

    position: absolute;

    inset: -2px;

    border-radius: 50%;

    border: 2px solid rgba(245, 160, 0, 0.75);

    animation:
        cfsPhoneRingPulse 1.6s ease-out infinite;

    pointer-events: none;
}


@keyframes cfsPhoneRingPulse {

    0% {
        transform: scale(0.85);
        opacity: 0.95;
    }

    45% {
        transform: scale(1.25);
        opacity: 0;
    }

    100% {
        transform: scale(1.25);
        opacity: 0;
    }
}


/* =========================================================
   07. PHONE BUTTON
   ========================================================= */

.cfs-float-call {

    background:
        linear-gradient(
            135deg,
            #06152f 0%,
            #0b2d5c 100%
        );

    border:
        1px solid rgba(245, 160, 0, 0.45);
}


.cfs-float-call .cfs-float-icon {

    background:
        #f5a000;

    color:
        #06152f;
}


/* =========================================================
   08. PHONE BUTTON LIGHT FLASH
   ========================================================= */

.cfs-float-call::after {

    content: "";

    position: absolute;

    top: 0;
    left: -100%;

    width: 45%;
    height: 100%;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,0.18),
            transparent
        );

    transform: skewX(-20deg);

    animation:
        cfsPhoneLight 4s ease-in-out infinite;

    pointer-events: none;
}


@keyframes cfsPhoneLight {

    0% {
        left: -100%;
    }

    25% {
        left: 130%;
    }

    100% {
        left: 130%;
    }
}


/* =========================================================
   09. WHATSAPP BUTTON
   ========================================================= */

.cfs-float-whatsapp {

    background:
        linear-gradient(
            135deg,
            #0d7f43 0%,
            #18a957 100%
        );

    border:
        1px solid rgba(255,255,255,0.18);
}


.cfs-float-whatsapp .cfs-float-icon {

    background:
        #18a957;

    color:
        #ffffff;
}


/* =========================================================
   10. WHATSAPP SOFT PULSE
   ========================================================= */

.cfs-float-whatsapp .cfs-float-icon::before {

    content: "";

    position: absolute;

    inset: -2px;

    border-radius: 50%;

    border:
        2px solid rgba(24,169,87,0.65);

    animation:
        cfsWhatsappPulse 2.5s ease-out infinite;

    pointer-events: none;
}


@keyframes cfsWhatsappPulse {

    0% {
        transform: scale(0.9);
        opacity: 0.8;
    }

    60% {
        transform: scale(1.28);
        opacity: 0;
    }

    100% {
        transform: scale(1.28);
        opacity: 0;
    }
}


/* =========================================================
   11. WHATSAPP ICON
   ========================================================= */

.cfs-float-whatsapp .cfs-float-icon i {

    animation:
        cfsWhatsappIcon 2.8s ease-in-out infinite;
}


@keyframes cfsWhatsappIcon {

    0%,
    70%,
    100% {
        transform: scale(1);
    }

    75% {
        transform: scale(1.08);
    }

    80% {
        transform: scale(1);
    }

    85% {
        transform: scale(1.08);
    }

    90% {
        transform: scale(1);
    }
}


/* =========================================================
   12. TEXT AREA
   ========================================================= */

.cfs-float-text {

    width: 0;

    opacity: 0;

    overflow: hidden;

    display: flex;
    flex-direction: column;

    padding-left: 10px;

    white-space: nowrap;

    transition:
        width 0.35s ease,
        opacity 0.25s ease;
}


.cfs-float-text small {

    display: block;

    margin: 0;

    color:
        rgba(255,255,255,0.70);

    font-size:
        9px;

    line-height:
        1.35;

    font-weight:
        500;

    text-transform:
        uppercase;

    letter-spacing:
        0.4px;
}


.cfs-float-text strong {

    display: block;

    margin-top: 2px;

    color:
        #ffffff;

    font-size:
        11px;

    line-height:
        1.4;

    font-weight:
        600;
}


/* =========================================================
   13. DESKTOP HOVER
   ========================================================= */

.cfs-float-btn:hover {

    width:
        185px;

    transform:
        translateX(5px);

    box-shadow:
        0 12px 30px rgba(0,0,0,0.28);
}


.cfs-float-btn:hover .cfs-float-text {

    width:
        115px;

    opacity:
        1;
}


/* =========================================================
   14. PHONE HOVER
   ========================================================= */

.cfs-float-call:hover .cfs-float-icon {


    background:
        #ffc44d;
}


.cfs-float-call:hover .cfs-float-icon i {

    animation:
        cfsPhoneHover 0.7s ease-in-out infinite;
}


@keyframes cfsPhoneHover {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
    }

    25% {
        transform: rotate(-12deg) scale(1.08);
    }

    50% {
        transform: rotate(12deg) scale(1.08);
    }

    75% {
        transform: rotate(-8deg) scale(1.05);
    }
}


/* =========================================================
   15. TABLET
   ========================================================= */

@media (max-width: 768px) {

    .cfs-floating-actions {

        left:
            12px;

        gap:
            10px;
    }


    .cfs-float-btn {

        width:
            52px;

        height:
            52px;

        min-width:
            52px;
    }


    .cfs-float-icon {

        width:
            52px;

        height:
            52px;

        min-width:
            52px;

        font-size:
            19px;
    }


    /*
       Do not expand on tablet
    */

    .cfs-float-btn:hover {

        width:
            52px;

        transform:
            translateX(2px);
    }


    .cfs-float-btn:hover .cfs-float-text {

        width:
            0;

        opacity:
            0;
    }

}


/* =========================================================
   16. MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .cfs-floating-actions {

        position:
            fixed;

        left:
            10px;

        top:
            auto;

        bottom:
            82px;

        transform:
            none;

        gap:
            9px;
    }


    .cfs-float-btn {

        width:
            50px;

        height:
            50px;

        min-width:
            50px;

        min-height:
            50px;

        border-radius:
            50%;
    }


    .cfs-float-icon {

        width:
            50px;

        height:
            50px;

        min-width:
            50px;

        font-size:
            18px;
    }


    .cfs-float-text {

        display:
            none;
    }


    .cfs-float-btn:hover {

        width:
            50px;

        transform:
            none;
    }


    .cfs-float-btn:hover .cfs-float-text {

        display:
            none;
    }


    /*
       Keep phone blink strong on mobile
    */

    .cfs-float-call .cfs-float-icon i {

        animation:
            cfsPhoneBlink 1.4s ease-in-out infinite;
    }


    .cfs-float-call .cfs-float-icon::before {

        animation:
            cfsPhoneRingPulse 1.5s ease-out infinite;
    }

}


/* =========================================================
   17. SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

    .cfs-floating-actions {

        left:
            8px;

        bottom:
            76px;

        gap:
            8px;
    }


    .cfs-float-btn {

        width:
            46px;

        height:
            46px;

        min-width:
            46px;

        min-height:
            46px;
    }


    .cfs-float-icon {

        width:
            46px;

        height:
            46px;

        min-width:
            46px;

        font-size:
            16px;
    }

}


/* =========================================================
   18. ACCESSIBILITY
   ========================================================= */

.cfs-float-btn:focus-visible {

    outline:
        3px solid rgba(245,160,0,0.65);

    outline-offset:
        3px;
}


/* =========================================================
   19. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .cfs-float-call .cfs-float-icon i,
    .cfs-float-call .cfs-float-icon::before,
    .cfs-float-call::after,
    .cfs-float-whatsapp .cfs-float-icon i,
    .cfs-float-whatsapp .cfs-float-icon::before {

        animation:
            none !important;
    }

    .cfs-float-btn,
    .cfs-float-text {

        transition:
            none !important;
    }
}