﻿.ai-chat-btn {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #fff url('../myimages/buddy.png') center center / cover no-repeat;
    color: transparent;
    text-align: center;
    line-height: 90px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 14px rgba(0,0,0,.22);
    font-weight: bold;
    user-select: none;
    overflow: hidden;
    text-indent: -9999px;
    border: 0;
}

.ai-chat-panel {
    position: fixed;
    right: 16px;
    bottom: 80px;
    width: 360px;
    max-width: calc(100% - 32px);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    z-index: 9999;
    box-shadow: 0 2px 14px rgba(0,0,0,.25);
}

.ai-chat-header {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-chat-header-title {
    display: inline-block;
}

.ai-chat-header-right {
    display: flex;
    align-items: center;
}

.ai-chat-header-icon {
    width: 28px;
    height: 28px;
    margin-left: 8px;
    margin-right: 8px;
    background-image: url('../myimages/buddy_small.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    flex: 0 0 28px;
}
.ai-chat-messages {
    height: 280px;
    overflow: auto;
    padding: 10px 12px;
}

.ai-chat-footer {
    border-top: 1px solid #eee;
    padding: 10px 12px;
}

.ai-chat-meta {
    font-size: 12px;
    color: #777;
    margin-bottom: 6px;
}

.ai-msg {
    margin: 6px 0;
}

    .ai-msg .b {
        display: inline-block;
        padding: 6px 8px;
        border-radius: 6px;
        max-width: 100%;
        white-space: pre-wrap;
    }

    .ai-msg.user .b {
        background: #e9f2ff;
    }

    .ai-msg.bot .b {
        background: #f5f5f5;
    }

.ai-chat-hint {
    margin-top: 6px;
    font-size: 12px;
    color: #888;
}


.ai-chat-loading {
    display: inline-block;
    margin: 8px 10px 0 10px;
    font-size: 12px;
    color: #777;
}

.ai-chat-panel.rtl {
    direction: rtl;
}

    .ai-chat-panel.rtl .pull-left {
        float: right !important;
    }

    .ai-chat-panel.rtl .pull-right {
        float: left !important;
    }

    .ai-chat-panel.rtl .ai-msg.user .b {
        background: #e9f2ff;
    }
    /* можно оставить */
    .ai-chat-panel.rtl .ai-msg.bot .b {
        background: #f5f5f5;
    }

.ai-msg.bot.ai-answering .b {
    opacity: .75;
    font-style: italic;
}
