/* Dark Mode Styles for NBFC Platform */

/* Base theme switching */
body[data-theme="dark"], 
html[data-theme="dark"] {
    background-color: #121212 !important;
    color: #ffffff !important;
}

body[data-theme="light"], 
html[data-theme="light"] {
    background-color: #ffffff !important;
    color: #000000 !important;
}
body[data-theme="dark"] .avatar-circle {
    background: #2a252594;
    box-shadow: inset 7px 30px 20px rgba(0, 0, 0, 0.62);
}
/* Dark mode text colors */
body[data-theme="dark"] *:not(.feature-card):not(.feature-card *):not(.card):not(.card *):not(.content):not(.content *):not(.main-content):not(.main-content *):not(.btn):not(.btn *),
body[data-theme="dark"] h1:not(.feature-card h1):not(.card h1):not(.content h1):not(.btn h1),
body[data-theme="dark"] h2:not(.feature-card h2):not(.card h2):not(.content h2):not(.btn h2),
body[data-theme="dark"] h3:not(.feature-card h3):not(.card h3):not(.content h3):not(.btn h3),
body[data-theme="dark"] h4:not(.feature-card h4):not(.card h4):not(.content h4):not(.btn h4),
body[data-theme="dark"] h5:not(.feature-card h5):not(.card h5):not(.content h5):not(.btn h5),
body[data-theme="dark"] h6:not(.feature-card h6):not(.card h6):not(.content h6):not(.btn h6),
body[data-theme="dark"] p:not(.feature-card p):not(.card p):not(.content p):not(.btn p),
body[data-theme="dark"] span:not(.feature-card span):not(.card span):not(.content span):not(.btn span),
body[data-theme="dark"] div:not(.feature-card):not(.card):not(.content):not(.feature-card div):not(.card div):not(.content div):not(.btn):not(.btn div),
body[data-theme="dark"] a:not(.feature-card a):not(.card a):not(.content a):not(.btn):not(.btn a),
body[data-theme="dark"] li:not(.feature-card li):not(.card li):not(.content li):not(.btn li),
body[data-theme="dark"] label:not(.feature-card label):not(.card label):not(.content label):not(.btn),
body[data-theme="dark"] .nav-button,
body[data-theme="dark"] .user-welcome {
    color: #ffffff !important;
}

/* Dark mode background elements */
body[data-theme="dark"] .bg-white,
body[data-theme="dark"] .bg-light {
    background-color: #1e1e1e !important;
    color: #ffffff !important;
}

body[data-theme="dark"] .bg-secondary,
body[data-theme="dark"] .project-card ,
body[data-theme="dark"] .card-image-wrapper ,
body[data-theme="dark"] .tool-content,
body[data-theme="dark"] .tools-nav-btn{
    background-color: #2d2d2d !important;
}

body[data-theme="dark"] .bg-primary {
    background-color: #0d6efd !important;
}

/* Text color overrides for dark mode */
body[data-theme="dark"] .text-dark,
body[data-theme="dark"] .text-muted,
body[data-theme="dark"] .banner-description {
    color: #ffffff !important;
}

body[data-theme="dark"] .text-secondary {
    color: #adb5bd !important;
}

/* Cards and containers */
body[data-theme="dark"] .card {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #ffffff !important;
}

body[data-theme="dark"] .feature-card {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
}

body[data-theme="dark"] .card-header,
body[data-theme="dark"] .card-footer {
    background-color: #404040 !important;
    border-color: #404040 !important;
    color: #ffffff !important;
}

/* Forms and inputs */
body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-select {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #ffffff !important;
}

body[data-theme="dark"] .form-control:focus,
body[data-theme="dark"] .form-select:focus {
    background-color: #2d2d2d !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

body[data-theme="dark"] .form-control::placeholder {
    color: #adb5bd !important;
}

/* Tables */
body[data-theme="dark"] .table {
    color: #ffffff !important;
}

body[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > td,
body[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > th {
    background-color: #2d2d2d !important;
}

body[data-theme="dark"] .table th,
body[data-theme="dark"] .table td {
    border-color: #404040 !important;
}

/* Dropdowns */
/* body[data-theme="dark"] .dropdown-menu {
    background-color: black !important;
    border-color: whitesmoke !important;
} */

body[data-theme="dark"] .dropdown-item {
    color: #ffffff !important;
}

body[data-theme="dark"] .dropdown-item:hover,
body[data-theme="dark"] .dropdown-item:focus {
    background-color: #404040 !important;
    color: #ffffff !important;
}

body[data-theme="dark"] .dropdown-item:not(.btn):not(.text-danger) {
    color: #ffffff !important;
}

body[data-theme="dark"] .dropdown-divider {
    border-color: #404040 !important;
}

/* Navigation */
body[data-theme="dark"] header,
body[data-theme="dark"] footer {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}

body[data-theme="dark"] .navbar {
    background-color: #1a1a1a !important;
}

body[data-theme="dark"] .navbar-nav .nav-link {
    color: #ffffff !important;
}

body[data-theme="dark"] .navbar-nav .nav-link:hover {
    color: #adb5bd !important;
}

/* Buttons - preserve original button colors but ensure text is readable */
body[data-theme="dark"] .btn:not(.btn-primary) 
{
    border-style: solid !important;
    border-color: #404040 !important;
    color: #ffffff !important;
    transition: none !important;
}

body[data-theme="dark"] .btn:not(.btn-primary):not(.btn-secondary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.btn-light):not(.btn-dark):hover,
body[data-theme="dark"] .btn-sm:not(.btn-primary):not(.btn-secondary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.btn-light):not(.btn-dark):hover {
    background-color: #404040 !important;
    border-color: #404040 !important;
    color: #ffffff !important;
}

/* Alerts */
body[data-theme="dark"] .alert {
    border-color: #404040 !important;
}

body[data-theme="dark"] .alert-primary {
    background-color: #0d1418 !important;
    border-color: #0d6efd !important;
    color: #9ec5fe !important;
}

body[data-theme="dark"] .alert-secondary {
    background-color: #161618 !important;
    border-color: #6c757d !important;
    color: #dde0e3 !important;
}

body[data-theme="dark"] .alert-success {
    background-color: #0f1b0f !important;
    border-color: #198754 !important;
    color: #a3cfbb !important;
}

body[data-theme="dark"] .alert-danger {
    background-color: #1c0f0f !important;
    border-color: #dc3545 !important;
    color: #f1aeb5 !important;
}

/* Modals */
body[data-theme="dark"] .modal-content {
    background-color: #2d2d2d !important;
    color: #ffffff !important;
}

body[data-theme="dark"] .modal-header,
body[data-theme="dark"] .modal-footer {
    border-color: #404040 !important;
}

body[data-theme="dark"] .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Lists */
body[data-theme="dark"] .list-group-item {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #ffffff !important;
}

body[data-theme="dark"] .list-group-item.active {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

/* Progress bars */
body[data-theme="dark"] .progress {
    background-color: #404040 !important;
}

/* Breadcrumbs */
body[data-theme="dark"] .breadcrumb {
    background-color: #2d2d2d !important;
}

body[data-theme="dark"] .breadcrumb-item a {
    color: #9ec5fe !important;
}

/* Pagination */
body[data-theme="dark"] .page-link {
    background-color: #2d2d2d !important;
    border-color: #404040 !important;
    color: #ffffff !important;
}

body[data-theme="dark"] .page-link:hover {
    background-color: #404040 !important;
    border-color: #404040 !important;
    color: #ffffff !important;
}

body[data-theme="dark"] .page-item.active .page-link {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

/* Scrollbars for webkit browsers */
body[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

body[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #2d2d2d;
}

body[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}

body[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* Code blocks and pre elements */
body[data-theme="dark"] pre,
body[data-theme="dark"] code {
    background-color: #1a1a1a !important;
    color: #f8f9fa !important;
    border-color: #404040 !important;
}

/* Borders */
body[data-theme="dark"] hr {
    border-color: #404040 !important;
}

body[data-theme="dark"] .border {
    border-color: #404040 !important;
}

/* Custom animations for theme transitions */
body, html {
    transition: background-color 0.3s ease, color 0.3s ease;
}

.card, .form-control, .btn, .dropdown-menu, .alert {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}