/* Chatbot Styles */
.chatbot-panel {
    display: flex;
    flex-direction: column;
}

/* Контейнер сообщений чат-бота */
.chatbot-messages {
    flex: 1;
    padding: 15px 0;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    min-height: 300px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

/* Сообщения чата */
.chat-message {
    margin-bottom: 15px;
    display: flex;
    animation: fadeInMessage 0.3s ease;
}

@keyframes fadeInMessage {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.chat-message.user {
    justify-content: flex-end;
}

.chat-message.assistant {
    justify-content: flex-start;
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.message-content.user {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-content.assistant {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 4px;
}

/* Приветственное сообщение */
.welcome-message .assistant-message {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

.message-content.assistant {
    margin-left: 0;
    border-radius: 18px 18px 18px 4px; /* Скругление только с правой стороны */
}

/* Индикатор печати */
.typing-indicator {
    display: none;
    justify-content: flex-start;
    margin-bottom: 15px;
    padding: 0 15px;
}

.typing-indicator.active {
    display: flex;
}

.typing-dots {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 18px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom-left-radius: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    margin: 0 2px;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { 
    animation-delay: -0.32s; 
}

.typing-dots span:nth-child(2) { 
    animation-delay: -0.16s; 
}

@keyframes typing {
    0%, 80%, 100% { 
        transform: scale(0.8); 
        opacity: 0.5; 
    }
    40% { 
        transform: scale(1); 
        opacity: 1; 
    }
}

/* Поле ввода чат-бота */
.chatbot-input {
    padding: 15px;
    background: white;
    border-top: 1px solid #e9ecef;
    margin: 0 -15px -15px -15px;
}

.chatbot-input .input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chatbot-input .form-control {
    flex: 1;
    border-radius: 25px;
    border: 1px solid #e9ecef;
    padding: 12px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.chatbot-input .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
}

.send-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
}

.send-button:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(45, 90, 39, 0.3);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Assistant page panel */
.assistant-page-panel {
    min-height: 600px;
    display: flex;
    flex-direction: column;
}