/* Chat widget overrides and additional styles */

/* Fix the n8n chat textarea sizing issue */
.n8n-chat .n8n-textarea {
    min-height: 60px !important;
    height: auto !important;
    width: 100% !important;
}

/* Remove the "powered by" message */
.n8n-chat .n8n-powered-by {
    display: none !important;
}

/* Make the chat window larger */
.n8n-chat .n8n-chat-window {
    width: 350px !important; 
    max-height: 550px !important;
}

/* Ensure the text input container has appropriate sizing */
.n8n-chat .n8n-chat-input-container {
    width: 100% !important;
    padding: 10px !important;
}

/* Form submission states */
.loading-message,
.success-message,
.error-message {
    text-align: center;
    padding: 2rem;
}

.success-message h3 {
    color: var(--success-color, #28a745);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.error-message h3 {
    color: var(--danger-color, #dc3545);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.loading-message .spinner {
    width: 3rem;
    height: 3rem;
    border: 0.25rem solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color, #4f46e5);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

.retry-btn {
    margin-top: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Floating chat button */
.chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color, #4f46e5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.chat-button i {
    font-size: 24px;
}
