.chat-ai-container {
    position: fixed;
    right: 30px;
    bottom: 120px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 1000;
    width: 350px;
    max-height: 500px;
}

    .chat-ai-container.collapsed {
        width: 60px;
        height: 60px;
    }

.chat-ai-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.chat-ai-toolbar {
    display: flex;
    gap: 10px;
}

.toolbar-button, .toggle-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    border-radius: 4px;
}

    .toolbar-button:hover, .toggle-button:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

.chat-ai-body {
    display: flex;
    flex-direction: column;
    height: 400px;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 8px 12px;
    border-radius: 8px;
    max-width: 80%;
    word-break: break-word;
}

.user-message {
    background-color: #e6f7ff;
    align-self: flex-end;
}

.assistant-message {
    background-color: #f1f1f1;
    align-self: flex-start;
}

.message-timestamp {
    font-size: 0.7rem;
    color: #888;
    margin-top: 4px;
    text-align: right;
}

.chat-input-area {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
}

.chat-input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 8px;
}

.send-button {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
}

    .send-button:hover {
        background-color: #0069d9;
    }

/* For collapsed state */
.chat-ai-container.collapsed .chat-ai-header {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.chat-ai-container.collapsed .chat-ai-toolbar {
    display: none;
}

.chat-ai-container.collapsed .toggle-button {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
}

.chat-ai-container.collapsed .chat-ai-body, .chat-ai-container.collapsed .chat-close-icon { display: none; }
.chat-ai-container:not(.collapsed) .chat-open-icon { display: none; }
.chat-ai-container .chat-open-icon { max-width: 100%; max-height: 100%; }
.chat-ai-container .message-content ul { margin: 0; padding-left: 18px; }
