/* Custom CSS for KnowledgeCenter */

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Root variables */
:root {
    --bs-primary: #0d6efd;
    --bs-primary-rgb: 13, 110, 253;
    --bs-secondary: #6c757d;
    --bs-success: #198754;
    --bs-info: #0dcaf0;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;
    --bs-light: #f8f9fa;
    --bs-dark: #212529;
    --bs-body-bg: #121212;
    --bs-body-color: #ffffff;
    --bs-border-color: #495057;
}

/* Global styles */
* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: transparent; /* Ensure body background is transparent to show images */
    color: var(--bs-body-color);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Background image with overlay */
/* body::before rule removed as background is now handled by JavaScript */

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* Keep overlay for consistent look, but background image is handled by JS */
    backdrop-filter: blur(2px);
    z-index: -1;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.4) !important; /* Changed to 40% transparent black */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--bs-primary) !important;
}

/* Main content */
.main-content {
    min-height: calc(100vh - 120px);
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Cards */
.card {
    background: rgba(0, 0, 0, 0.2) !important; /* Changed to 20% transparent black */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.bg-dark-subtle {
    background-color: rgba(0, 0, 0, 0.2) !important; /* Changed to 20% transparent black */
}

/* Form styles */
.form-control {
    background-color: rgba(52, 58, 64, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    transition: all 0.3s ease;
}

.form-control:focus {
    background-color: rgba(52, 58, 64, 0.9) !important;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
    color: #ffffff !important;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

.input-group-text {
    background-color: rgba(52, 58, 64, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

.form-label {
    color: #ffffff;
    font-weight: 500;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #0d6efd, #0056b3);
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

.btn-outline-secondary {
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(25, 135, 84, 0.2);
    color: #75b798;
    border: 1px solid rgba(25, 135, 84, 0.3);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.2);
    color: #f1aeb5;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.alert-info {
    background: rgba(13, 202, 240, 0.2);
    color: #9eeaf9;
    border: 1px solid rgba(13, 202, 240, 0.3);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.2);
    color: #ffda6a;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Markdown content styling */
.markdown-content {
    line-height: 1.7;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.2); /* 20% transparent black */
    padding: 1.5rem; /* Add some padding for better appearance */
    border-radius: 0.5rem; /* Slightly rounded corners */
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    color: #ffffff;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.markdown-content h1 {
    font-size: 2.5rem;
    border-bottom: 2px solid #ffffff; /* Changed from primary blue to white */
    padding-bottom: 0.5rem;
}

.markdown-content h2 {
    font-size: 2rem;
    color: #ffffff; /* Changed from primary blue to white */
}

.markdown-content h3 {
    font-size: 1.5rem;
}

.markdown-content p {
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.markdown-content a {
    color: #FFD700; /* Changed to gold (harder yellow) */
    text-decoration: none;
}

.markdown-content a:hover {
    color: #FFFFE0; /* Changed hover color to light yellow */
    text-decoration: underline;
}

.markdown-content blockquote {
    border-left: 4px solid #ffffff; /* Changed border color to white */
    padding-left: 1rem;
    margin: 1.5rem 0;
    background: rgba(0, 0, 0, 0.2); /* 20% transparent black */
    padding: 1rem;
    border-radius: 0.25rem;
}

.markdown-content code {
    background: rgba(0, 0, 0, 0.2); /* 20% transparent black */
    color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.markdown-content pre {
    background: rgba(0, 0, 0, 0.2); /* 20% transparent black */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.markdown-content pre code {
    background: none;
    padding: 0;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.markdown-content th,
.markdown-content td {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.75rem;
    text-align: left;
}

.markdown-content th {
    background: rgba(0, 0, 0, 0.2); /* 20% transparent black */
    font-weight: 600;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Footer */
.footer {
    background: rgba(0, 0, 0, 0.2); /* Changed to 40% transparent black */
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.6s ease-out;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-content {
        padding-top: 1rem;
    }
    
    .card-body {
        padding: 2rem !important;
    }
    
    .display-5 {
        font-size: 2rem !important;
    }
    
    .markdown-content h1 {
        font-size: 2rem;
    }
    
    .markdown-content h2 {
        font-size: 1.5rem;
    }
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

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

::-webkit-scrollbar-track {
    background: rgba(33, 37, 41, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(13, 110, 253, 0.6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(13, 110, 253, 0.8);
}

.hosted-by-widget {
    position: fixed;
    bottom: 10px;
    left: 10px;
    background-color: #0d6efd;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 1000;
    text-decoration: none;
}

.hosted-by-widget:hover {
    background-color: #0b5ed7;
    color: white;
}
/* Logs Admin Page */
.form-control-sm {
    font-size: 0.8rem;
}

.table-sm th, .table-sm td {
    font-size: 0.8rem;
    padding: 0.4rem;
}

.selectpicker {
    font-size: 0.8rem !important;
}

.bootstrap-select .dropdown-menu {
    font-size: 0.8rem;
}

.bootstrap-select .btn {
    font-size: 0.8rem !important;
    padding: 0.25rem 0.5rem;
}
