#rag-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-width: 90vw;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#rag-chatbot-header {
    background: linear-gradient(135deg, #0F314C 0%, #0D2C48 100%);
    color: white;
    padding: 15px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

#rag-chatbot-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

#rag-chatbot-toggle {
    /*background: rgba(255,255,255,0.2);*/
    background:#AF742E;
    border: none;
    color: white;
    font-size: 18px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#rag-chatbot-toggle:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

#rag-chatbot-window {
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
}

#rag-chatbot-messages {
    height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
}

.rag-message {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    line-height: 1.4;
    font-size: 14px;
}

.rag-message-user {
    background: #e3f2fd;
    color: #333;
    margin-left: 20px;
    border-bottom-right-radius: 4px;
}

.rag-message-bot {
    background: white;
    color: #333;
    margin-right: 20px;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 4px;
}

.rag-message-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.rag-sources {
    margin: 10px 0;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 12px;
}

.rag-sources-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #666;
}

.rag-source-item {
    margin-bottom: 4px;
}

.rag-source-item a {
    color: #1976d2;
    text-decoration: none;
}

.rag-source-item a:hover {
    text-decoration: underline;
}

.similarity {
    color: #888;
    font-size: 11px;
}

#rag-chatbot-input-container {
    display: flex;
    padding: 15px;
    background: white;
    color: #333;
    border-top: 1px solid #e0e0e0;
}

#rag-chatbot-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    margin-right: 10px;
}

#rag-chatbot-input:focus {
    border-color: #667eea;
}

#rag-chatbot-send {
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    background:#AF742E;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#rag-chatbot-send:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

#rag-chatbot-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#rag-chatbot-loading {
    padding: 10px 15px;
    text-align: center;
    font-style: italic;
    color: #666;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
}

/* Scrollbar styling */
#rag-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

#rag-chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

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

#rag-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    #rag-chatbot-container {
        width: calc(100vw - 40px);
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    
    #rag-chatbot-messages {
        height: 250px;
    }
    
    .rag-message-user {
        margin-left: 10px;
    }
    
    .rag-message-bot {
        margin-right: 10px;
    }
}

/* Animation for smooth appearance */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#rag-chatbot-container {
    animation: slideInUp 0.5s ease-out;
}