#ai-welcome-assistant {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 2147483000;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    max-width: min(460px, calc(100vw - 32px));
    pointer-events: none;
    opacity: 0;
    transform: translateY(18px) scale(.97);
    transition: opacity .28s ease, transform .28s ease;
}

#ai-welcome-assistant.ai-welcome-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#ai-welcome-assistant .ai-welcome-robot {
    position: relative;
    flex: 0 0 54px;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 50%;
    background: linear-gradient(145deg, #7367f0, #4f46c8);
    color: #fff;
    font-size: 27px;
    line-height: 1;
    box-shadow: 0 10px 28px rgba(79, 70, 200, .35);
    user-select: none;
}

#ai-welcome-assistant .ai-welcome-online-dot {
    position: absolute;
    right: 1px;
    bottom: 2px;
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #28c76f;
}

#ai-welcome-assistant .ai-welcome-bubble {
    position: relative;
    min-width: 260px;
    max-width: 380px;
    padding: 15px 42px 15px 17px;
    border: 1px solid rgba(115, 103, 240, .18);
    border-radius: 16px 16px 4px 16px;
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #2f2b3d);
    box-shadow: 0 12px 38px rgba(47, 43, 61, .22);
    pointer-events: auto;
}

#ai-welcome-assistant .ai-welcome-bubble::after {
    content: "";
    position: absolute;
    right: -8px;
    bottom: 16px;
    width: 16px;
    height: 16px;
    border-top: 1px solid rgba(115, 103, 240, .18);
    border-right: 1px solid rgba(115, 103, 240, .18);
    background: var(--bs-body-bg, #fff);
    transform: rotate(45deg);
}

#ai-welcome-assistant .ai-welcome-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 5px;
    color: #7367f0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

#ai-welcome-assistant .ai-welcome-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

#ai-welcome-assistant .ai-welcome-typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 21px;
    padding: 4px 2px;
}

#ai-welcome-assistant .ai-welcome-typing-indicator > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7367f0;
    animation: ai-welcome-dot 1.15s infinite ease-in-out;
}

#ai-welcome-assistant .ai-welcome-typing-indicator > span:nth-child(2) {
    animation-delay: .15s;
}

#ai-welcome-assistant .ai-welcome-typing-indicator > span:nth-child(3) {
    animation-delay: .3s;
}

#ai-welcome-assistant.ai-welcome-typing .ai-welcome-robot {
    animation: ai-welcome-robot-pulse 1.6s infinite ease-in-out;
}

@keyframes ai-welcome-dot {
    0%, 60%, 100% {
        opacity: .35;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-4px);
    }
}

@keyframes ai-welcome-robot-pulse {
    0%, 100% {
        box-shadow: 0 10px 28px rgba(79, 70, 200, .28);
    }

    50% {
        box-shadow: 0 10px 34px rgba(79, 70, 200, .55);
    }
}

#ai-welcome-assistant .ai-welcome-close {
    position: absolute;
    top: 8px;
    right: 9px;
    z-index: 1;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 20px;
    line-height: 26px;
    opacity: .55;
    cursor: pointer;
}

#ai-welcome-assistant .ai-welcome-close:hover {
    background: rgba(115, 103, 240, .1);
    opacity: 1;
}

@media (max-width: 575.98px) {
    #ai-welcome-assistant {
        right: 12px;
        bottom: 12px;
        left: 12px;
        max-width: none;
    }

    #ai-welcome-assistant .ai-welcome-robot {
        flex-basis: 46px;
        width: 46px;
        height: 46px;
        font-size: 23px;
    }

    #ai-welcome-assistant .ai-welcome-bubble {
        min-width: 0;
        max-width: none;
        flex: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    #ai-welcome-assistant {
        transition: none;
    }

    #ai-welcome-assistant .ai-welcome-typing-indicator > span,
    #ai-welcome-assistant.ai-welcome-typing .ai-welcome-robot {
        animation: none;
    }
}
