/**
 * AI Chat Styles - Stili per la chat AI sotto gli articoli
 */

.wpai-ai-chat-container {
    background: linear-gradient(135deg, var(--background-light, #f8f9fa) 0%, var(--border-color, #e9ecef) 100%);
    border-radius: var(--border-radius, 16px);
    padding: 24px;
    margin: 40px 0;
    border: 1px solid var(--border-color, #dee2e6);
    box-shadow: var(--shadow, 0 4px 12px rgba(102, 126, 234, 0.08));
}

.wpai-ai-chat-header {
    text-align: center;
    margin-bottom: 20px;
}

.wpai-ai-chat-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color, #23283a);
    margin: 0 0 8px 0;
}

.wpai-ai-chat-header p {
    color: var(--light-text, #6c757d);
    font-size: 0.95rem;
    margin: 0;
}

.wpai-ai-chat-form {
    margin-bottom: 20px;
}

.wpai-ai-chat-input-group {
    margin-bottom: 16px;
}

.wpai-ai-chat-input-group textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px 16px;
    border: 2px solid var(--border-color, #e9ecef);
    border-radius: var(--border-radius, 12px);
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: inherit;
}

.wpai-ai-chat-input-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.wpai-ai-chat-recaptcha {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.wpai-ai-chat-submit {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.wpai-ai-chat-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

.wpai-ai-chat-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wpai-ai-chat-submit .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wpai-ai-chat-response {
    margin-top: 16px;
    padding: 16px;
    border-radius: 12px;
    animation: slideInUp 0.3s ease;
    display: none;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wpai-ai-chat-response .response-content {
    line-height: 1.6;
    color: #23283a;
}

.wpai-ai-chat-response.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.wpai-ai-chat-response.error .response-content {
    color: #721c24;
}

.wpai-ai-chat-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 12px;
}

.wpai-ai-chat-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 12px;
    color: #721c24;
}

.wpai-ai-chat-info {
    text-align: center;
    margin-top: 16px;
}

.wpai-ai-chat-info small {
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
    .wpai-ai-chat-container {
        padding: 20px;
        margin: 30px 0;
    }
    
    .wpai-ai-chat-header h3 {
        font-size: 1.2rem;
    }
    
    .wpai-ai-chat-input-group textarea {
        min-height: 70px;
        font-size: 0.9rem;
    }
    
    .wpai-ai-chat-submit {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .wpai-ai-chat-container {
        padding: 16px;
        margin: 20px 0;
        border-radius: 12px;
    }
    
    .wpai-ai-chat-header h3 {
        font-size: 1.1rem;
    }
    
    .wpai-ai-chat-header p {
        font-size: 0.9rem;
    }
    
    .wpai-ai-chat-input-group textarea {
        min-height: 60px;
        padding: 10px 12px;
    }
    
    .wpai-ai-chat-submit {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .wpai-ai-chat-response {
        padding: 16px;
    }
    
    .wpai-ai-chat-info small {
        font-size: 0.8rem;
    }
} 