/* KGA AI Chatbot Styles */

.kga-ai-chatbot {
    display: flex;
    flex-direction: column;
    height: 500px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
}

.kga-ai-chatbot-header {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    padding: 15px;
    text-align: center;
    border-bottom: 2px solid #229954;
}

.kga-ai-chatbot-title {
    font-weight: bold;
    font-size: 16px;
    margin: 0;
}

.kga-ai-chatbot-subtitle {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 3px;
}

.kga-ai-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f9f9f9;
}

.kga-ai-message {
    display: flex;
    margin-bottom: 10px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.kga-ai-message-user {
    justify-content: flex-end;
}

.kga-ai-message-assistant {
    justify-content: flex-start;
}

.kga-ai-message-content {
    max-width: 85%;
    padding: 10px 12px;
    border-radius: 8px;
    word-wrap: break-word;
    line-height: 1.6;
    font-size: 14px;
	white-space: pre-wrap;  /* ← Erhält Zeilenumbrüche */
    word-break: break-word;  /* ← Bricht lange Wörter */
}

.kga-ai-message-user .kga-ai-message-content {
    background: #2ecc71;
    color: white;
    border-bottom-right-radius: 2px;
}

.kga-ai-message-assistant .kga-ai-message-content {
    background: #e8e8e8;
    color: #333;
    border-bottom-left-radius: 2px;
}

.kga-ai-chatbot-input-area {
    display: flex;
    padding: 10px;
    background: white;
    border-top: 1px solid #eee;
    gap: 8px;
}

#kga-message-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#kga-message-input:focus {
    border-color: #2ecc71;
    box-shadow: 0 0 4px rgba(46, 204, 113, 0.2);
}

#kga-send-btn {
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s;
}

#kga-send-btn:hover {
    background: #27ae60;
}

#kga-send-btn:active {
    transform: scale(0.95);
}

#kga-send-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.kga-send-icon {
    font-size: 18px;
}

.kga-ai-chatbot-info {
    padding: 5px;
    text-align: center;
    font-size: 11px;
    color: #999;
    background: #f5f5f5;
}

/* Scrollbar Styling */
.kga-ai-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.kga-ai-chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.kga-ai-chatbot-messages::-webkit-scrollbar-thumb {
    background: #2ecc71;
    border-radius: 3px;
}

.kga-ai-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #27ae60;
}

/* Responsive */
@media (max-width: 600px) {
    .kga-ai-chatbot {
        height: 400px;
    }

    .kga-ai-message-content {
        max-width: 95%;
    }

    #kga-message-input {
        font-size: 16px;
    }
}
