#n8n-chat-container {
    max-width: 900px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
}

#n8n-conversation-sidebar {
    width: 280px;
    background-color: #f8f9fa;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

#n8n-conversation-sidebar h3 {
    margin: 0;
    padding: 15px;
    background-color: #e9ecef;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

#conversation-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.conversation-item {
    padding: 12px 15px;
    border-bottom: 1px solid #e9ecef;
    cursor: pointer;
    transition: background-color 0.2s;
}

.conversation-item:hover {
    background-color: #e9ecef;
}

.conversation-item.active {
    background-color: #ce1620;
    color: white;
}

.conversation-date {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
}

.conversation-item.active .conversation-date {
    color: rgba(255, 255, 255, 0.8);
}

.conversation-preview {
    font-size: 13px;
    line-height: 1.3;
}

#n8n-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#n8n-chat-window {
    background-color: #f4f4f4;
    height: 400px;
    overflow-y: auto;
    padding: 20px;
}

#n8n-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.bot-message {
    display: flex;
    justify-content: flex-start;
}

.user-message .message-content {
    background-color: #ce1620;
    color: white;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 70%;
    word-wrap: break-word;
    margin-left: auto;
}

.bot-message .message-content {
    background-color: white;
    color: #333;
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 70%;
    word-wrap: break-word;
    border: 1px solid #ddd;
    margin-right: auto;
}

.loading-message .message-content {
    font-style: italic;
    opacity: 0.7;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

#n8n-chat-controls {
    background-color: white;
    padding: 15px;
    border-top: 1px solid #ddd;
}

#new-conversation-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin: 10px;
    transition: background-color 0.2s;
}

#new-conversation-btn:hover {
    background-color: #e0e0e0;
}

#n8n-chat-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

#n8n-chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

#n8n-chat-input:focus {
    border-color: #ce1620;
}

#n8n-chat-send {
    background-color: #ce1620;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

#n8n-chat-send:hover:not(:disabled) {
    background-color: #005a87;
}

#n8n-chat-send:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    #n8n-chat-container {
        margin: 10px;
        max-width: none;
        flex-direction: column;
    }
    
    #n8n-conversation-sidebar {
        width: 100%;
        max-height: 150px;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    
    #conversation-list {
        max-height: 120px;
    }
    
    #n8n-chat-window {
        height: 300px;
        padding: 15px;
    }
    
    .user-message .message-content,
    .bot-message .message-content {
        max-width: 85%;
        font-size: 14px;
    }
    
    #n8n-chat-controls {
        padding: 12px;
    }
    
    #n8n-chat-input {
        font-size: 16px;
    }
}