#bot-priem-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: Arial, sans-serif;
}
/* кнопка открыть */
#chatbot-toggle-btn {
    background-color: #f56960;
    border: none;
    color: white;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
/* кнопка закрыть х */
#chatbot-close-btn {
    display: none;
    border: 2px solid #222D38;
    border-radius: 50%;
    padding: 6px;
    background: none;
    font-size: 14px;
    color: #222D38;
    cursor: pointer;
    width: 35px;
    height: 35px;
    position: relative;
    left: -40px;
    top: 40px;
}

#chatbot-window {
    display: none;
    width: 320px;
    max-height: 450px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    overflow: hidden;
    flex-direction: column;
    position: relative;
}
/* заголовок чата */
#chatbot-header {
    background-color: #f56960;
    color: white;
    padding: 10px;
    display: flex;
    align-items: center;
}

#chatbot-header img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

#chatbot-response {
    padding: 10px;
    height: 300px;
    overflow-y: auto;
    background-color: #f9f9f9;
    flex-grow: 1;
}

.chat-message {
    font-size: 16px;
    display: block; /* Блоки теперь занимают всю ширину */
    width: fit-content; /* Автоматически подстраивается под текст */
    max-width: 80%;
    padding: 8px 12px;
    margin: 10px; /* Отступы между блоками */
    border-radius: 10px;
    word-wrap: break-word; /* Перенос длинного текста */
}

.chat-message.left {
    text-align: left; /* Выравнивание блока слева */
    margin-left: 10px; /* Отступ от левого края */
    margin-right: auto;
}

.chat-message.right {
    text-align: right; /* Выравнивание блока справа */
    margin-right: 10px; /* Отступ от правого края */
    margin-left: auto;
}

.chat-message.bot-message {
    background-color: #e0e0e0;
    color: #000;
}

.chat-message.user-message {
    background-color: #4CAF50;
    color: #fff;
}




/* "Печатает..." */
#typing-indicator {
    padding: 5px 10px;
    font-size: 14px;
    font-style: italic;
    color: grey;
    text-align:left;
    background-color: #f9f9f9;
}



#chatbot-input-area {
    display: flex;
    border-top: 1px solid #ddd;
}

#chatbot-input-area input {
    flex-grow: 1;
    border: none;
    padding: 10px;
    outline: none;
}

#chatbot-send-btn {
    background-color: #f56960;
    border: none;
    color: white;
    padding: 10px 15px;
    cursor: pointer;
}

/* Анимация подпрыгивания кнопки */
@keyframes chatbot-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* По умолчанию анимации нет */
#chatbot-toggle-btn.bounce {
    animation: chatbot-bounce 0.8s ease;
}
