/* Floating Action Buttons Styles */

.fab-ring-container {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 15px;
    pointer-events: none;
    /* Let clicks pass through empty areas */
}

/* Position Options */
.fab-ring-container.fab-pos-right {
    right: 20px;
    flex-direction: row;
}

.fab-ring-container.fab-pos-left {
    left: 20px;
    flex-direction: row-reverse;
}

.fab-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fab-pos-right .fab-wrapper {
    align-items: flex-end;
}

.fab-pos-left .fab-wrapper {
    align-items: flex-start;
}

/* Make clickable */
.fab-item {
    pointer-events: auto;
    text-decoration: none !important;
    display: block;
    position: relative;
    transition: all 0.3s ease;
}

/* Phone Button Pill */
.fab-phone-pill {
    background-color: #2196f3;
    color: #fff;
    display: flex;
    align-items: center;
    border-radius: 50px;
    padding: 4px 16px 4px 4px;
    transition: all 0.3s ease;
}

.fab-phone-pill:hover {
    transform: scale(1.05);
    background-color: #1a4c85;
    box-shadow: 0 6px 20px rgba(26, 76, 133, 0.4);
}

.fab-phone .fab-icon-wrap {
    background-color: #fff;
    color: #2196f3;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-size: 18px;
    transition: color 0.3s ease;
}

.fab-phone-pill:hover .fab-icon-wrap {
    color: #1a4c85;
}

.fab-phone .fab-text {
    font-weight: bold;
    font-size: 15px;
    white-space: nowrap;
}

/* Social Buttons Stack */
.fab-socials {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fab-socials .fab-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.fab-socials .fab-item:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.fab-zalo {
    background-color: #0068ff;
}

.fab-zalo-text {
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 18px;
    letter-spacing: -0.5px;
}

.fab-messenger {
    background-color: #0084ff;
}

.fab-facebook {
    background-color: #1877f2;
}

/* ==================================
   ANIMATIONS
====================================*/

/* Common pseudo elements for animations */
.fab-item .fab-icon-wrap::before,
.fab-item .fab-icon-wrap::after,
.fab-socials .fab-item::before,
.fab-socials .fab-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    z-index: -1;
}

/* 1. Ring Animation */
.fab-anim-ring .fab-phone .fab-icon-wrap i {
    animation: fab-ring-anim 1s infinite ease-in-out;
}

@keyframes fab-ring-anim {
    0% {
        transform: rotate(0) scale(1) skew(1deg);
    }

    10% {
        transform: rotate(-25deg) scale(1) skew(1deg);
    }

    20% {
        transform: rotate(25deg) scale(1) skew(1deg);
    }

    30% {
        transform: rotate(-25deg) scale(1) skew(1deg);
    }

    40% {
        transform: rotate(25deg) scale(1) skew(1deg);
    }

    50% {
        transform: rotate(0) scale(1) skew(1deg);
    }

    100% {
        transform: rotate(0) scale(1) skew(1deg);
    }
}

.fab-anim-ring .fab-item::before {
    border: 2px solid inherit;
    animation: fab-ripple 1.5s infinite ease-out;
    border-color: currentColor;
    opacity: 0.5;
}

/* 2. Pulse Animation */
.fab-anim-pulse .fab-item {
    animation: fab-pulse-anim 1.5s infinite;
}

@keyframes fab-pulse-anim {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 104, 255, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(0, 104, 255, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 104, 255, 0);
    }
}

/* 3. Bounce Animation */
.fab-anim-bounce .fab-item {
    animation: fab-bounce-anim 2s infinite;
}

@keyframes fab-bounce-anim {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-15px);
    }

    60% {
        transform: translateY(-7px);
    }
}

/* 4. Shake Animation */
.fab-anim-shake .fab-item {
    animation: fab-shake-anim 2s infinite cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes fab-shake-anim {

    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translate3d(-2px, 0, 0);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translate3d(2px, 0, 0);
    }
}

/* Ripple Base Keyframe */
@keyframes fab-ripple {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Fix Zalo color for before effect */
.fab-zalo {
    color: #0068ff;
}

.fab-messenger {
    color: #0084ff;
}

.fab-facebook {
    color: #1877f2;
}

.fab-phone {
    color: #0068ff;
}

.fab-item::before {
    border-color: currentColor !important;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .fab-ring-container.fab-pos-right {
        right: 10px;
    }

    .fab-ring-container.fab-pos-left {
        left: 10px;
    }

    .fab-phone .fab-text {
        display: none;
    }

    .fab-phone-pill {
        padding: 0;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        justify-content: center;
    }

    .fab-phone .fab-icon-wrap {
        width: 100%;
        height: 100%;
        margin-right: 0;
        background-color: transparent;
        color: #fff;
        font-size: 20px;
    }

    .fab-phone-pill:hover .fab-icon-wrap {
        color: #fff;
    }

    .fab-socials .fab-item {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}