/*
 * AI4Triage Dark Theme Styles
 * 
 * Color Palette:
 * - Primary: #3b82f6 (blue-500)
 * - Secondary: #8b5cf6 (violet-500)
 * - Background: #111827 (gray-900)
 * - Surface: #1f2937 (gray-800)
 * - Border: #374151 (gray-700)
 * - Text Primary: #f3f4f6 (gray-100)
 * - Text Secondary: #9ca3af (gray-400)
 * - Success: #10b981 (emerald-500)
 * - Warning: #f59e0b (amber-500)
 * - Error: #ef4444 (red-500)
 */

/* Base styles */
:root {
    --ai4-primary: #3b82f6;
    --ai4-secondary: #8b5cf6;
    --ai4-bg-dark: #111827;
    --ai4-bg-surface: #1f2937;
    --ai4-bg-elevated: #374151;
    --ai4-border: #4b5563;
    --ai4-text-primary: #f3f4f6;
    --ai4-text-secondary: #9ca3af;
    --ai4-success: #10b981;
    --ai4-warning: #f59e0b;
    --ai4-error: #ef4444;
}

/* Body and main container */
body {
    background-color: var(--ai4-bg-dark) !important;
    color: var(--ai4-text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header styling */
.q-header {
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%) !important;
    border-bottom: 1px solid var(--ai4-border) !important;
}

/* Tab styling */
.q-tabs {
    background: transparent !important;
}

.q-tab {
    color: var(--ai4-text-secondary) !important;
    transition: all 0.2s ease;
}

.q-tab:hover {
    color: var(--ai4-text-primary) !important;
}

.q-tab--active {
    color: var(--ai4-primary) !important;
}

.q-tab__indicator {
    background: var(--ai4-primary) !important;
}

/* Card styling */
.q-card {
    background: var(--ai4-bg-surface) !important;
    border: 1px solid var(--ai4-border) !important;
    border-radius: 12px !important;
}

/* Input styling */
.q-field--outlined .q-field__control {
    border-color: var(--ai4-border) !important;
}

.q-field--outlined .q-field__control:hover {
    border-color: var(--ai4-primary) !important;
}

.q-field--focused .q-field__control {
    border-color: var(--ai4-primary) !important;
}

.q-field__label {
    color: var(--ai4-text-secondary) !important;
}

/* Button styling */
.q-btn--primary {
    background: linear-gradient(135deg, var(--ai4-primary) 0%, var(--ai4-secondary) 100%) !important;
}

.q-btn--primary:hover {
    filter: brightness(1.1);
}

/* Select dropdown styling */
.q-select__dropdown-icon {
    color: var(--ai4-text-secondary) !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--ai4-bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--ai4-border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ai4-text-secondary);
}

/* Notification styling */
.q-notification {
    background: var(--ai4-bg-elevated) !important;
    border: 1px solid var(--ai4-border) !important;
}

/* Governance panel specific styles */
.governance-check-passed {
    color: var(--ai4-success) !important;
}

.governance-check-warning {
    color: var(--ai4-warning) !important;
}

.governance-check-blocked {
    color: var(--ai4-error) !important;
}

.governance-check-pending {
    color: var(--ai4-text-secondary) !important;
}

/* Source card styles */
.source-card {
    background: var(--ai4-bg-elevated) !important;
    border: 1px solid var(--ai4-border) !important;
    transition: all 0.2s ease;
}

.source-card:hover {
    border-color: var(--ai4-primary) !important;
    transform: translateY(-2px);
}

/* Chat message styles */
.chat-message-user {
    background: var(--ai4-primary) !important;
    border-radius: 16px 16px 4px 16px !important;
}

.chat-message-assistant {
    background: var(--ai4-bg-elevated) !important;
    border-radius: 16px 16px 16px 4px !important;
}

/* Loading spinner */
.loading-spinner {
    border: 3px solid var(--ai4-border);
    border-top: 3px solid var(--ai4-primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .q-header {
        padding: 8px !important;
    }
    
    .q-tabs {
        font-size: 12px !important;
    }
}

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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