#ai-chat-root {
    font-family: Arial, sans-serif;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
}

#ai-chat-toggle {
    width: 60px;
    height: 60px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

#ai-chat-window {
    width: 380px;
    height: 560px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    position: absolute;
    bottom: 80px;
    right: 0;
}

#ai-chat-window.hidden { display: none; }

.ai-chat-header {
    padding: 12px;
    background: #007bff;
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#ai-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

#ai-chat-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: #f8f9fa;
}

.ai-msg {
    margin: 8px 0;
    padding: 10px 14px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
}

.ai-msg.user {
    background: #007bff;
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.ai-msg.bot {
    background: #e9ecef;
    color: #333;
    align-self: flex-start;
}

.ai-chat-input {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 8px;
    border-top: 1px solid #ddd;
}

#ai-chat-question {
    resize: none;
    height: 60px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.ai-chat-file-label {
    cursor: pointer;
    color: #007bff;
    font-size: 14px;
}

.ai-chat-file-label input {
    display: none;
}

#ai-chat-send {
    align-self: flex-end;
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}