/* =========================================
   تماس شناور زی‌زی‌گولو
   ========================================= */

#zzg-contact-widget {
    --zzg-red: #ef3340;
    --zzg-red-dark: #d91f2d;

    --zzg-blue: #1976d2;
    --zzg-blue-dark: #0d5fb8;

    position: fixed;

    /* دسکتاپ */
    left: 18px;
    bottom: 25px;

    width: 56px;
    height: 56px;

    z-index: 999999;

    direction: ltr;
    box-sizing: border-box;
}

#zzg-contact-widget *,
#zzg-contact-widget *::before,
#zzg-contact-widget *::after {
    box-sizing: border-box;
}


/* =========================================
   موج‌ها - کوچک‌تر و ظریف‌تر
   ========================================= */

#zzg-contact-widget .zzg-pulse {
    position: absolute;

    left: 50%;
    top: 50%;

    width: 56px;
    height: 56px;

    transform: translate(-50%, -50%) scale(1);

    border-radius: 50%;

    border: 1.5px solid var(--zzg-blue);

    opacity: 0;

    pointer-events: none;

    animation: zzgPulse 2.8s infinite ease-out;
}

#zzg-contact-widget .zzg-pulse-1 {
    animation-delay: 0s;
}

#zzg-contact-widget .zzg-pulse-2 {
    border-color: var(--zzg-red);
    animation-delay: .9s;
}

#zzg-contact-widget .zzg-pulse-3 {
    border-color: var(--zzg-blue);
    animation-delay: 1.8s;
}

@keyframes zzgPulse {

    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: .55;
    }

    70% {
        transform: translate(-50%, -50%) scale(1.45);
        opacity: .10;
    }

    100% {
        transform: translate(-50%, -50%) scale(1.65);
        opacity: 0;
    }
}


/* =========================================
   دکمه اصلی - کوچک‌تر
   ========================================= */

#zzg-contact-widget .zzg-contact-main {
    position: absolute;

    left: 50%;
    top: 50%;

    width: 52px;
    height: 52px;

    transform: translate(-50%, -50%);

    border: none;
    outline: none;

    border-radius: 50%;

    cursor: pointer;

    background: linear-gradient(
        145deg,
        var(--zzg-red),
        var(--zzg-red-dark)
    );

    box-shadow:
        0 6px 18px rgba(0, 0, 0, .18),
        inset 0 1px 1px rgba(255, 255, 255, .22);

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        transform .35s ease,
        box-shadow .35s ease;
}

#zzg-contact-widget .zzg-contact-main:hover {
    transform:
        translate(-50%, -50%)
        scale(1.06);

    box-shadow:
        0 8px 22px rgba(0, 0, 0, .23),
        0 0 0 4px rgba(239, 51, 64, .07);
}


/* =========================================
   آیکون اصلی
   ========================================= */

#zzg-contact-widget .zzg-main-icon {
    width: 24px;
    height: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: transform .35s ease;
}

#zzg-contact-widget .zzg-main-icon svg {
    width: 100%;
    height: 100%;
    fill: #fff;
}

#zzg-contact-widget.is-open .zzg-main-icon {
    transform: rotate(15deg) scale(.95);
}


/* =========================================
   نقطه کوچک
   ========================================= */

#zzg-contact-widget .zzg-live-dot {
    position: absolute;

    right: 4px;
    top: 4px;

    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #fff;

    box-shadow:
        0 0 0 2px rgba(255, 255, 255, .16);

    animation:
        zzgDotPulse 1.7s infinite ease-in-out;
}

@keyframes zzgDotPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(.72);
        opacity: .65;
    }
}


/* =========================================
   محدوده گزینه‌ها
   ========================================= */

#zzg-contact-widget .zzg-contact-options {
    position: absolute;

    left: 50%;
    bottom: 28px;

    width: 0;
    height: 0;
}


/* =========================================
   دکمه‌های تماس
   ========================================= */

#zzg-contact-widget .zzg-contact-item {
    position: absolute;

    left: 50%;
    bottom: 0;

    width: 43px;
    height: 43px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none;

    opacity: 0;
    visibility: hidden;

    transform:
        translate(-50%, 0)
        scale(.4);

    box-shadow:
        0 6px 16px rgba(0, 0, 0, .17);

    transition:
        opacity .35s ease,
        visibility .35s ease,
        transform .4s cubic-bezier(.22, 1, .36, 1);
}


/* =========================================
   باز شدن گزینه‌ها
   ========================================= */

#zzg-contact-widget.is-open .zzg-contact-item {
    opacity: 1;
    visibility: visible;
}


/* واتساپ */

#zzg-contact-widget.is-open .whatsapp {
    transform:
        translate(-50%, -66px)
        scale(1);

    transition-delay: .03s;
}


/* تلگرام */

#zzg-contact-widget.is-open .telegram {
    transform:
        translate(-50%, -117px)
        scale(1);

    transition-delay: .08s;
}


/* روبیکا */

#zzg-contact-widget.is-open .rubika {
    transform:
        translate(-50%, -168px)
        scale(1);

    transition-delay: .13s;
}


/* تماس */

#zzg-contact-widget.is-open .phone {
    transform:
        translate(-50%, -219px)
        scale(1);

    transition-delay: .18s;
}


/* =========================================
   آیکون گزینه‌ها
   ========================================= */

#zzg-contact-widget .zzg-contact-icon {
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
}

#zzg-contact-widget .zzg-contact-icon svg {
    width: 20px;
    height: 20px;

    fill: #fff;
}


/* =========================================
   رنگ گزینه‌ها
   ========================================= */

#zzg-contact-widget .whatsapp {
    background: #25D366;
}

#zzg-contact-widget .telegram {
    background: #229ED9;
}

#zzg-contact-widget .rubika {
    background: linear-gradient(
        145deg,
        var(--zzg-red),
        var(--zzg-red-dark)
    );
}

#zzg-contact-widget .phone {
    background: linear-gradient(
        145deg,
        var(--zzg-blue),
        var(--zzg-blue-dark)
    );
}


/* =========================================
   روبیکا
   ========================================= */

#zzg-contact-widget .rubika-icon {
    font-family: Arial, sans-serif;

    font-size: 19px;
    font-weight: 800;

    color: #fff;

    line-height: 1;
}


/* =========================================
   موبایل
   ========================================= */

@media (max-width: 767px) {

    #zzg-contact-widget {

        left: 13px;

        /*
         * بالاتر از فوتر موبایل
         */
        bottom: 105px;

        width: 52px;
        height: 52px;
    }

    #zzg-contact-widget .zzg-contact-main {

        width: 48px;
        height: 48px;
    }

    #zzg-contact-widget .zzg-main-icon {

        width: 22px;
        height: 22px;
    }

    #zzg-contact-widget .zzg-pulse {

        width: 52px;
        height: 52px;
    }

    #zzg-contact-widget .zzg-contact-item {

        width: 41px;
        height: 41px;
    }

    #zzg-contact-widget .zzg-contact-icon svg {

        width: 19px;
        height: 19px;
    }

    #zzg-contact-widget .rubika-icon {

        font-size: 18px;
    }

    /* گزینه‌های بازشونده در موبایل */

    #zzg-contact-widget.is-open .whatsapp {
        transform:
            translate(-50%, -62px)
            scale(1);
    }

    #zzg-contact-widget.is-open .telegram {
        transform:
            translate(-50%, -111px)
            scale(1);
    }

    #zzg-contact-widget.is-open .rubika {
        transform:
            translate(-50%, -160px)
            scale(1);
    }

    #zzg-contact-widget.is-open .phone {
        transform:
            translate(-50%, -209px)
            scale(1);
    }
}


/* =========================================
   کاهش انیمیشن
   ========================================= */

@media (prefers-reduced-motion: reduce) {

    #zzg-contact-widget .zzg-pulse,
    #zzg-contact-widget .zzg-live-dot {
        animation: none;
    }

    #zzg-contact-widget .zzg-contact-item,
    #zzg-contact-widget .zzg-contact-main {
        transition: none;
    }
}