/* Professional AI Expert System - Universal Styling */
/* Created: November 14, 2025 */
/* Matches base.html Jinja2 template structure */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 12px 12px 0 0;
    padding: 30px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    font-weight: 500;
}

/* Status Bar */
.status-bar {
    background: #34495e;
    color: white;
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #27ae60;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.status-indicator strong {
    color: #3498db;
}

/* Main Content - Two Column Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    background: white;
    border-radius: 0 0 12px 12px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Chat Section (Left Column) */
.chat-section {
    padding: 30px;
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

.chat-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
}

.chat-header h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 8px;
}

.chat-header p {
    color: #7f8c8d;
    font-size: 1rem;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
    max-height: 400px;
}

.message {
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease-in;
}

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

.message.assistant .message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.message.user .message-content {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 15px;
    border-radius: 12px;
    margin-left: 60px;
}

.response-content {
    line-height: 1.8;
}

.response-content strong {
    display: block;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* Loading Indicator */
.loading {
    display: none;
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

.loading.active {
    display: block;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ecf0f1;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

/* Input Section */
.input-section {
    margin-top: auto;
    padding-top: 20px;
    border-top: 2px solid #ecf0f1;
}

.input-with-examples {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-area {
    width: 100%;
}

.input-form {
    display: flex;
    gap: 10px;
}

.examples-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.examples-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.examples-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.example-btn {
    background: white;
    border: 2px solid #ecf0f1;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-btn:hover {
    border-color: #3498db;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

#messageInput {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#messageInput:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#sendButton {
    padding: 15px 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#sendButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

#sendButton:active {
    transform: translateY(0);
}

/* Sidebar (Right Column) */
.sidebar {
    background: #f8f9fa;
    padding: 30px 25px;
    border-left: 1px solid #ecf0f1;
    border-radius: 0 0 12px 0;
    overflow-y: auto;
    max-height: 700px;
}

.sidebar-panel {
    margin-bottom: 30px;
}

.panel-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
}

/* Expertise Areas (Info Panels) */
.info-panel {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.info-panel:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.info-panel h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 8px;
    font-weight: 600;
}

.info-panel p {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.5;
}


/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        border-left: none;
        border-top: 1px solid #ecf0f1;
        border-radius: 0 0 12px 12px;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8rem;
    }
    
    .status-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .chat-section {
        padding: 20px;
    }
    
    .sidebar {
        padding: 20px;
    }
    
    .message.user .message-content {
        margin-left: 0;
    }
}
