:root {
    --nudge-size: 74px;
    --nudge-tip-h: 54px;
    --border-min: 10px;
    --border-max: 10px;
    --border-color: #fff;
    --tip-bg: linear-gradient(180deg, #2AB2F0 0%, #1DA1F2 100%);
    --tip-color: #fff;
    --circle-bg: #2AB2F0;
    --icon-offset-x: -3px;
}

.nudge {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    z-index: 20;
}

.nudge[hidden] {
    display: none !important;
}

.nudge__btn {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.nudge__circle {
    width: var(--nudge-size);
    height: var(--nudge-size);
    border-radius: 50%;
    position: relative !important;
    display: grid;
    place-items: center;
    background: var(--circle-bg);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
    z-index: 2;
    transform: scale(.6);
    opacity: 0;
}

.nudge--circle-enter .nudge__circle {
    animation: nudgeIn .45s cubic-bezier(.2, .9, .2, 1.2) forwards;
}

@keyframes nudgeIn {
    0% {
        transform: scale(.6);
        opacity: 0;
        filter: blur(1px);
    }

    60% {
        transform: scale(1.07);
        opacity: 1;
        filter: blur(0);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.nudge--disappear .nudge__circle {
    animation: nudgeOut .35s ease forwards;
}

.nudge--disappear .nudge__tipwrap {
    animation: nudgeOut .35s ease forwards;
}

@keyframes nudgeOut {
    from {
        transform: scale(1);
        opacity: 1;
    }

    to {
        transform: scale(.9);
        opacity: 0;
    }
}

.nudge__ring {
    position: absolute !important;
    inset: calc(-1 * var(--border-max));
    border: var(--border-min) solid var(--border-color);
    border-radius: 50%;
}

.nudge--border-pulse .nudge__ring {
    animation: borderPulse 2.4s ease-in-out infinite;
}

@keyframes borderPulse {

    0%,
    100% {
        border-width: var(--border-min);
    }

    50% {
        border-width: var(--border-max);
    }
}

.nudge__pulse-ring {
    position: absolute !important;
    inset: calc(-1 * var(--border-max));
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, .9);
    animation: nudgePulse 2s ease-out infinite;
    z-index: 0;
}

@keyframes nudgePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, .9);
        opacity: 1;
    }

    70% {
        box-shadow: 0 0 0 36px rgba(255, 255, 255, 0);
        opacity: .35;
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
        opacity: 0;
    }
}

.nudge__icon,
.nudge__icon-svg {
    width: 48%;
    height: 48%;
    display: block;
    position: relative !important;
    left: var(--icon-offset-x);
}

.nudge__icon-svg {
    color: var(--circle-bg);
}

.nudge__tipwrap {
    height: var(--nudge-tip-h);
    max-width: 300px;
    width: max-content;
    display: inline-grid;
    align-items: center;
    padding: 0 22px;
    padding-right: calc(22px + (var(--nudge-size)/2) + var(--border-min));
    margin-right: calc(-1 * ((var(--nudge-size)/2) + var(--border-min)));
    border-radius: 999px;
    background: var(--tip-bg);
    color: var(--tip-color);
    font: 700 18px/1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    white-space: normal;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
    position: absolute !important;
    right: calc(var(--border-min) + (var(--nudge-size)));
    z-index: 1;
    transform: translateX(calc(-1 * ((var(--nudge-size)/2) + var(--border-min))));
    opacity: 0;
    pointer-events: none;
}

.nudge--tip-enter .nudge__tipwrap {
    animation: tipIn .45s ease forwards;
}

.nudge--tip-leave .nudge__tipwrap {
    animation: tipOut .35s ease forwards;
}

@keyframes tipIn {
    from {
        transform: translateX(calc(-1 * ((var(--nudge-size)/2) + var(--border-min))));
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes tipOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(calc(-1 * ((var(--nudge-size)/2) + var(--border-min))));
        opacity: 0;
    }
}