/* Custom styles for RAG Management System */

/* General styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Card hover effects */
.document-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Chat styles */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 56px - 56px);
    /* Navbar and footer height */
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f8f9fa;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    background-color: #fff;
}

.message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    max-width: 80%;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.message-user {
    background-color: #e9ecef;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 0;
}

.message-assistant {
    background-color: #d1e7dd;
    border-bottom-left-radius: 0;
}

/* Sidebar */
.sidebar {
    background-color: #f8f9fa;
    min-height: calc(100vh - 56px - 56px);
    border-right: 1px solid #dee2e6;
}

/* Custom buttons */
.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

/* Footer */
footer {
    background-color: #343a40;
    color: white;
    padding: 1rem 0;
    margin-top: auto;
}

/* Document detail */
.document-info {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Chunk content */
pre.chunk-content {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Loading spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .message {
        max-width: 90%;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}