/* ============================================= */
/* ОСНОВНЫЕ СТИЛИ ЧАТ-БОТА ОПТИМА */
/* ============================================= */

#chatbotToggler:hover {
    background: #4a4a4a;
    transform: scale(1.05);
}

/* ============================================= */
/* СТИЛИ МОДАЛЬНОГО ОКНА ЧАТА (внутри обёртки) */
/* ============================================= */
.optima-chatbot-container {
    /* Модальное окно */
    .chatbot-modal {
        position: fixed;
        bottom: 100px;
        right: 30px;
        width: 380px;
        max-width: calc(100% - 60px);
        background: white;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        overflow: hidden;
        z-index: 9999;
        transform: translateY(20px);
        opacity: 0;
        visibility: hidden;
        
        transition: all 0.3s ease;
    }  

    .h4-chatbot{
        padding: 5px 5px;
    }

    .chatbot-user-greeting{
        padding: 5px 12px;
    }
    /* Исправляем цвет текста */
    color: #000000; /* Чёрный цвет текста по умолчанию */

    /* Сообщения */
    .message {
        color: #000000; /* Чёрный текст в сообщениях */
    }

    /* Входящие сообщения (пользователь) */
    .incoming {
        color: #000000; /* Чёрный текст */
        background-color: #e3f2fd; /* Голубой фон */
    }

    /* Исходящие сообщения (бот) */
    .outgoing {
        color: #000000; /* Чёрный текст */
        background-color: #dcf8c6; /* Зелёный фон */
    }

    /* Время сообщения */
    .message-time {
        color: #666666; /* Серый цвет для времени */
    }

    /* Формы ввода */
    input, textarea {
        color: #000000; /* Чёрный текст в полях ввода */
        background-color: #ffffff; /* Белый фон */
    }

    /* Шапка чата */
    .chatbot-header {
        color: #ffffff; /* Белый текст в шапке (как было) */
    }

    /* Быстрые вопросы */
    .quick-question {
        color: #000000; /* Чёрный текст */
    }

    /* Ошибки */
    .error-message {
        color: #d32f2f; /* Красный текст ошибок */
    }

    .chatbot-modal.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    /* Шапка */
    .chatbot-header {
        background: #4a4a4a;
        color: white;
        padding: 1px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .chatbot-header h3 {
        margin: 0;
        font-size: 18px;
    }

    /* Контент */
    .chatbot-content {
        height: 400px;
        display: flex;
        flex-direction: column;
    }

    /* Сообщения */
    .chatbot-messages {
        flex: 1;
        overflow-y: auto;
        padding: 10px;
        background-color: #f9f9f9;
    }

    .message {
        margin-bottom: 15px;
        padding: 12px 18px;
        border-radius: 18px;
        max-width: 80%;
        line-height: 1.5;
        word-wrap: break-word;
    }

    .incoming {
        background-color: #e3f2fd;
        margin-right: auto;
        border-bottom-left-radius: 5px;
    }

    .outgoing {
        background-color: #dcf8c6;
        margin-left: auto;
        border-bottom-right-radius: 5px;
    }

    .message-time {
        font-size: 11px;
        color: #666;
        margin-top: 5px;
        text-align: right;
    }

    /* Формы */
    input, textarea {
        margin: 5px;        
        width: 97%;
        padding: 12px;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 14px;
        box-sizing: border-box;
    }

    textarea {
        min-height: 80px;
        max-height: 120px;
        resize: vertical;
    }

    button {
        background-color: #4a4a4a;
        color: white;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-size: 14px;
        width: 100%;
        box-sizing: border-box;
    }

    button:hover {
        background-color: #2b2b2b;
    }

    /* Быстрые вопросы */
    .quick-questions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 5px 12px;
    }

    .quick-question {
        background-color: #eef5ff;
        border: 1px solid #d0e0ff;
        border-radius: 15px;
        padding: 5px 12px;
        font-size: 12px;
        cursor: pointer;
    }

    .quick-question:hover {
        background-color: #d0e0ff;
    }

    /* Адаптивность */
    @media (max-width: 480px) {
        .chatbot-modal {
            width: calc(100% - 30px);
            right: 15px;
            bottom: 80px;
        }
    }
}