/* Chat UI Styles */
.chat-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.chat-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.chat-header h1 {
    margin: 0;
    font-size: 2.5em;
    font-weight: 700;
}

.chat-header p {
    margin: 10px 0 0 0;
    font-size: 1.1em;
    opacity: 0.9;
}

.chat-input-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.chat-input-section label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    display: block;
}

.chat-input-section input,
.chat-input-section textarea {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

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

.chat-interface {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.chatbot-container {
    height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: #fafbfc;
}

.message {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}

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

.message.assistant {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 15px 20px;
    border-radius: 20px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.user .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 5px;
}

.message.assistant .message-content {
    background: white;
    color: #333;
    border: 1px solid #e9ecef;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chat-input-area {
    padding: 20px;
    background: white;
    border-top: 1px solid #e9ecef;
}

.chat-input-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.chat-input-row textarea {
    flex: 1;
    min-height: 60px;
    resize: vertical;
}

.chat-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.file-upload-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 2px dashed #dee2e6;
    transition: border-color 0.3s ease;
}

.file-upload-section:hover {
    border-color: #667eea;
}

.file-status {
    background: #e9ecef;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    color: #6c757d;
    margin-top: 10px;
}

.api-integration {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-top: 20px;
    border-left: 4px solid #667eea;
}

.api-integration h3 {
    color: #495057;
    margin-top: 0;
    margin-bottom: 15px;
}

.api-integration ul {
    margin: 0;
    padding-left: 20px;
}

.api-integration li {
    margin-bottom: 8px;
    color: #6c757d;
}

.api-status {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 15px;
}

/* Responsive design */
@media (max-width: 768px) {
    .chat-container {
        padding: 10px;
    }
    
    .chat-header h1 {
        font-size: 2em;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .chat-input-row {
        flex-direction: column;
    }
    
    .chat-buttons {
        justify-content: center;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Code blocks in messages */
.message-content pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 10px 0;
    border: 1px solid #e9ecef;
}

.message-content code {
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* Emoji and icons */
.emoji {
    font-size: 1.2em;
    margin-right: 5px;
}

/* Success/Error states */
.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
} 