/* Custom styles for Alcora RAG System */

:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --background-dark: #1f2937;
    --background-light: #f9fafb;
}

/* Main container */
#root {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Messages */
.message {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
}

.message.user {
    background-color: var(--primary-color);
    color: white;
}

.message.assistant {
    background-color: var(--background-light);
    border-left: 4px solid var(--secondary-color);
}

/* Action buttons */
.action-button {
    padding: 0.5rem 1rem;
    margin: 0.25rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Source citations */
.source-citation {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #f3f4f6;
    border-left: 3px solid var(--secondary-color);
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.source-citation-title {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

/* File upload area */
.file-upload-area {
    border: 2px dashed var(--primary-color);
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
}

.file-upload-area:hover {
    background-color: rgba(37, 99, 235, 0.05);
    border-color: var(--secondary-color);
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

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

/* Stats cards */
.stats-card {
    padding: 1rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    margin-bottom: 1rem;
}

/* Document list */
.document-item {
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}

.document-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-indexed {
    background-color: #d1fae5;
    color: #065f46;
}

.status-processing {
    background-color: #fef3c7;
    color: #92400e;
}

.status-error {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Markdown headers - compact sizes for chat messages */
h1 { font-size: 1.1rem !important; }
h2 { font-size: 1rem !important; }
h3 { font-size: 0.95rem !important; }
h4, h5, h6 { font-size: 0.9rem !important; }

/* Responsive design */
@media (max-width: 768px) {
    .message {
        padding: 0.75rem;
    }

    .action-button {
        width: 100%;
        margin: 0.5rem 0;
    }
}
