/* Floating Contact Bar - Curved Background Styles */
/* Spacing for bottom bar only when present */
body.fcb-has-bottom {
    padding-bottom: 100px;
    /* space for 60px bar + canvas/shadow */
}

.fcb-contact-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    z-index: 9999;
    overflow: visible;
}

canvas {
    width: 100%;
    height: 100%;
    pointer-events: none;
    filter: drop-shadow(rgba(0, 0, 0, 0.1) 0px -4px 8px)
}

.contact-list {
    position: absolute;
    width: 100%;
    height: 100%;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.contact-list a {
    width: 50px;
    height: 50px;
    -webkit-animation: pxg-swing 1s ease-in-out;
    animation: pxg-swing 1s ease-in-out;
    animation-iteration-count: infinite;
    position: relative;
    display: inline-block;
}

.contact-list a img {
    width: 100%;
    height: 100%;
    border-radius: 100%;
}

/* Ripple/pulse effect around icons (configurable per item via --pulse-color) */
.contact-list a {
    --pulse-color: rgba(0, 0, 0, 0.2);
}

.contact-list a::before,
.contact-list a::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 6px solid var(--pulse-color);
    opacity: 0;
    -webkit-animation: fcb-pulse 2.2s ease-out infinite;
    animation: fcb-pulse 2.2s ease-out infinite;
}

.contact-list a::after {
    -webkit-animation-delay: .9s;
    animation-delay: .9s;
}

/* Brand colors for pulses */
.fcb-phone {
    --pulse-color: rgba(255, 77, 79, 0.35);
}

.fcb-phone2 {
    --pulse-color: rgba(0, 200, 83, 0.35);
}

.fcb-zalo {
    --pulse-color: rgba(2, 136, 209, 0.35);
}

.fcb-messenger {
    --pulse-color: rgba(24, 119, 242, 0.35);
}

.fcb-contact-bar a[title="Map"] {
    --pulse-color: rgba(52, 168, 83, 0.35);
}

@-webkit-keyframes fcb-pulse {
    0% {
        -webkit-transform: scale(1);
        opacity: .55;
    }

    70% {
        -webkit-transform: scale(1.9);
        opacity: 0;
    }

    100% {
        -webkit-transform: scale(1.9);
        opacity: 0;
    }
}

@keyframes fcb-pulse {
    0% {
        transform: scale(1);
        opacity: .55;
    }

    70% {
        transform: scale(1.9);
        opacity: 0;
    }

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


/* Highlight the center contact item: if 3, center is 2nd; if 5, center is 3rd; if 1, center is 1st, etc. */
.contact-list a:only-child,
.contact-list a:nth-child(2):nth-last-child(1),
/* 2 items: 2nd */
.contact-list a:nth-child(2):nth-last-child(2),
/* 3 items: center */
.contact-list a:nth-child(2):nth-last-child(2),
/* 4 items: 2nd and 3rd (first of two centers) */
.contact-list a:nth-child(3):nth-last-child(1),
/* 4 items: 3rd (second of two centers) */
.contact-list a:nth-child(3):nth-last-child(3)

/* 5 items: center */
    {
    margin-top: -90px;
    -webkit-animation: pxg-heartBeat 1.5s ease-in-out;
    animation: pxg-heartBeat 1.5s ease-in-out;
    animation-iteration-count: infinite;
}


@-webkit-keyframes pxg-heartBeat {
    0% {
        -webkit-transform: scale(1)
    }

    14% {
        -webkit-transform: scale(1.3)
    }

    28% {
        -webkit-transform: scale(1)
    }

    42% {
        -webkit-transform: scale(1.3)
    }

    70% {
        -webkit-transform: scale(1)
    }
}

@keyframes pxg-heartBeat {
    0% {
        transform: scale(1)
    }

    14% {
        transform: scale(1.3)
    }

    28% {
        transform: scale(1)
    }

    42% {
        transform: scale(1.3)
    }

    70% {
        transform: scale(1)
    }
}

.pxg-heartBeat {
    -webkit-animation: pxg-heartBeat 1.5s ease-in-out;
    animation: pxg-heartBeat 1.5s ease-in-out;
}

@-webkit-keyframes pxg-swing {
    20% {
        -webkit-transform: rotate(15deg)
    }

    40% {
        -webkit-transform: rotate(-10deg)
    }

    60% {
        -webkit-transform: rotate(5deg)
    }

    80% {
        -webkit-transform: rotate(-5deg)
    }

    to {
        -webkit-transform: rotate(0)
    }
}

@keyframes pxg-swing {
    20% {
        transform: rotate(15deg)
    }

    40% {
        transform: rotate(-10deg)
    }

    60% {
        transform: rotate(5deg)
    }

    80% {
        transform: rotate(-5deg)
    }

    to {
        transform: rotate(0)
    }
}

.pxg-swing {
    -webkit-animation: pxg-swing 1s ease-in-out;
    animation: pxg-swing 1s ease-in-out
}

@-webkit-keyframes pxg-tada {
    0% {
        -webkit-transform: scale(1)
    }

    10%,
    20% {
        -webkit-transform: scale(.9) rotate(-3deg)
    }

    30%,
    50%,
    70%,
    90% {
        -webkit-transform: scale(1.1) rotate(3deg)
    }

    40%,
    60%,
    80% {
        -webkit-transform: scale(1.1) rotate(-3deg)
    }

    to {
        -webkit-transform: scale(1)
    }
}

@keyframes pxg-tada {
    0% {
        transform: scale(1)
    }

    10%,
    20% {
        transform: scale(.9) rotate(-3deg)
    }

    30%,
    50%,
    70%,
    90% {
        transform: scale(1.1) rotate(3deg)
    }

    40%,
    60%,
    80% {
        transform: scale(1.1) rotate(-3deg)
    }

    to {
        transform: scale(1)
    }
}

.pxg-tada {
    -webkit-animation: pxg-tada 1s ease-in-out;
    animation: pxg-tada 1s ease-in-out
}

/* Position variants */
/* Bottom (default) */
.fcb-contact-bar.fcb-bottom {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 60px;
}

/* Side variants: right/left as vertical stack */
.fcb-contact-bar.fcb-right,
.fcb-contact-bar.fcb-left {
    top: 50%;
    bottom: auto;
    width: 60px;
    height: auto;
    transform: translateY(-50%);
}

.fcb-contact-bar.fcb-right {
    right: 16px;
    left: auto;
}

.fcb-contact-bar.fcb-left {
    left: 16px;
    right: auto;
}

/* Hide curved canvas on side variants */
.fcb-contact-bar.fcb-right canvas,
.fcb-contact-bar.fcb-left canvas {
    display: none;
}

/* Layout contacts vertically on side variants */
.fcb-contact-bar.fcb-right .contact-list,
.fcb-contact-bar.fcb-left .contact-list {
    position: static;
    width: 100%;
    height: auto;
    transform: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

/* Phone number label (shown only on side variants) */
.fcb-phone-label {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #ff4d4f;
    color: #fff;
    padding: 8px 12px;
    border-radius: 999px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 8px 24px rgba(255, 77, 79, 0.35);
    white-space: nowrap;
    z-index: 2;
}

.fcb-contact-bar.fcb-right .fcb-phone .fcb-phone-label,
.fcb-contact-bar.fcb-right .fcb-phone2 .fcb-phone-label {
    display: inline-block;
    right: 60px;
    /* 50px icon + gap */
}

.fcb-contact-bar.fcb-left .fcb-phone .fcb-phone-label,
.fcb-contact-bar.fcb-left .fcb-phone2 .fcb-phone-label {
    display: inline-block;
    left: 60px;
    /* 50px icon + gap */
}

/* Hide labels on bottom variant */
.fcb-contact-bar.fcb-bottom .fcb-phone-label {
    display: none !important;
}

/* Ensure bottom variant keeps original layout */
.fcb-contact-bar.fcb-bottom .contact-list {
    position: absolute;
    width: 100%;
    height: 100%;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}