/* AI Search Page Styles */
.knowledge-ai-search-page {
    padding-top: 1rem;
}

.page-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
}

html[data-bs-theme="dark"] .page-header {
    border-bottom-color: #495057;
}

.sample-search {
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
}

.statistic {
    padding: 1rem;
}

.statistic i {
    opacity: 0.8;
}

.statistic h5 {
    font-weight: 600;
    color: #495057;
}

html[data-bs-theme="dark"] .statistic h5 {
    color: #f8f9fa;
}

.card.border-info {
    border-width: 2px !important;
}

/* Dark mode support for cards and borders */
html[data-bs-theme="dark"] .card {
    background-color: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

html[data-bs-theme="dark"] .card.border-info {
    border-color: #0dcaf0 !important;
}

html[data-bs-theme="dark"] .card-header {
    background-color: #495057;
    border-color: #6c757d;
    color: #f8f9fa;
}

html[data-bs-theme="dark"] .card-header.bg-info {
    background-color: #0dcaf0 !important;
    color: #000;
}

html[data-bs-theme="dark"] .card-body {
    background-color: #343a40;
    color: #f8f9fa;
}

/* Table headers dark mode support */
html[data-bs-theme="dark"] .table th {
    background-color: #343a40;
    color: #f8f9fa;
    border-color: #495057;
}

html[data-bs-theme="dark"] .table td {
    background-color: #212529;
    color: #f8f9fa;
    border-color: #495057;
}

html[data-bs-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.05);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.075);
    color: #f8f9fa;
}

/* Text colors for dark mode */
html[data-bs-theme="dark"] .text-muted {
    color: #adb5bd !important;
}

html[data-bs-theme="dark"] .text-primary {
    color: #6ea8fe !important;
}

html[data-bs-theme="dark"] .text-info {
    color: #6dd5ed !important;
}

html[data-bs-theme="dark"] .text-warning {
    color: #ffe69c !important;
}

html[data-bs-theme="dark"] .text-success {
    color: #75b798 !important;
}

html[data-bs-theme="dark"] .text-secondary {
    color: #adb5bd !important;
}

/* Button dark mode adjustments */
html[data-bs-theme="dark"] .btn-outline-success {
    color: #75b798;
    border-color: #198754;
}

html[data-bs-theme="dark"] .btn-outline-success:hover {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
}

html[data-bs-theme="dark"] .btn-outline-info {
    color: #6dd5ed;
    border-color: #0dcaf0;
}

html[data-bs-theme="dark"] .btn-outline-info:hover {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
    color: #000;
}

html[data-bs-theme="dark"] .btn-outline-warning {
    color: #ffe69c;
    border-color: #ffc107;
}

html[data-bs-theme="dark"] .btn-outline-warning:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

html[data-bs-theme="dark"] .btn-outline-secondary {
    color: #adb5bd;
    border-color: #6c757d;
}

html[data-bs-theme="dark"] .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

/* Badge dark mode support */
html[data-bs-theme="dark"] .badge.bg-light {
    background-color: #495057 !important;
    color: #f8f9fa !important;
}

html[data-bs-theme="dark"] .badge.bg-secondary {
    background-color: #6c757d !important;
    color: #f8f9fa !important;
}

/* Background colors for dark mode */
html[data-bs-theme="dark"] .bg-light {
    background-color: #343a40 !important;
}

html[data-bs-theme="dark"] .border-0.bg-light {
    background-color: #343a40 !important;
}

/* Form elements dark mode */
html[data-bs-theme="dark"] .form-control {
    background-color: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

html[data-bs-theme="dark"] .form-control:focus {
    background-color: #343a40;
    border-color: #667eea;
    color: #f8f9fa;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

html[data-bs-theme="dark"] .form-select {
    background-color: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

/* Icons and visual elements */
html[data-bs-theme="dark"] .bi {
    color: #f8f9fa;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .statistic {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .statistic i {
        font-size: 2rem !important;
    }
    
    html[data-bs-theme="dark"] .statistic i {
        color: #f8f9fa;
    }
}

/* Small text elements */
html[data-bs-theme="dark"] .small,
html[data-bs-theme="dark"] small {
    color: #adb5bd;
}

/* List groups dark mode */
html[data-bs-theme="dark"] .list-group-item {
    background-color: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

html[data-bs-theme="dark"] .list-group-item:hover {
    background-color: #495057;
}

/* Navbar and navigation dark mode improvements */
html[data-bs-theme="dark"] .navbar-nav .nav-link {
    color: #f8f9fa;
}

html[data-bs-theme="dark"] .navbar-nav .nav-link:hover {
    color: #6dd5ed;
}

/* Breadcrumb dark mode */
html[data-bs-theme="dark"] .breadcrumb {
    background-color: #343a40;
}

html[data-bs-theme="dark"] .breadcrumb-item a {
    color: #6ea8fe;
}

/* Pagination dark mode */
html[data-bs-theme="dark"] .page-link {
    background-color: #343a40;
    border-color: #495057;
    color: #6ea8fe;
}

html[data-bs-theme="dark"] .page-link:hover {
    background-color: #495057;
    border-color: #6c757d;
    color: #f8f9fa;
}

html[data-bs-theme="dark"] .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Progress bars dark mode */
html[data-bs-theme="dark"] .progress {
    background-color: #495057;
}

/* Tooltip dark mode */
html[data-bs-theme="dark"] .tooltip .tooltip-inner {
    background-color: #495057;
    color: #f8f9fa;
}

/* Popover dark mode */
html[data-bs-theme="dark"] .popover {
    background-color: #343a40;
    border-color: #495057;
}

html[data-bs-theme="dark"] .popover-header {
    background-color: #495057;
    border-color: #6c757d;
    color: #f8f9fa;
}

html[data-bs-theme="dark"] .popover-body {
    color: #f8f9fa;
}