:root {
    --ld-dark-mode-header-bg: #272727;
    --ld-dark-mode-sidebar-bg: #1c1c1c;
    --ld-dark-mode-content-bg: #121212;
    --ld-dark-mode-content-text: #cccccc;
    --ld-dark-mode-link-color: #cccccc;
    --ld-dark-mode-link-hover-color: #fff;
    --ld-dark-mode-text-secondary: #aaa;
    --ld-dark-mode-border-color: rgba(255, 255, 255, 0.1);
}


/* Header Area */
.buddyx-dark-theme.ld-in-focus-mode a {
    color: var(--ld-dark-mode-content-text);
}

.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus .ld-focus-header .ld-mobile-nav span {
    background-color: var(--ld-dark-mode-content-text);
}

@media (max-width: 768px) {
    .buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus .ld-focus-header .ld-content-actions {
        background-color: var(--ld-dark-mode-header-bg);
    }
}

body:not(.buddyx-dark-theme) .learndash-light-mode,
body.buddyx-dark-theme .learndash-dark-mode {
    display: none;
}

#buddyx-toggle-track {
    width: 30px;
    height: 100%;
    display: flex;
    align-items: center;
}

.buddyx-dark-theme #buddyx-toggle-track {
    color: #fff;
}

.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus .ld-focus-header,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus .ld-focus-header .ld-brand-logo {
    background: var(--ld-dark-mode-header-bg);
}

.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus .ld-focus-header {
    border: 0;
    color: var(--ld-dark-mode-content-text);
}

.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus .ld-focus-header .ld-progress,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus .ld-focus-header .ld-content-action,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus .ld-focus-header .ld-user-menu,
.buddyx-dark-theme.ld-in-focus-mode #buddyx-toggle-track,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus .ld-focus-header .ld-content-actions {
    border-color: var(--ld-dark-mode-border-color);
}

.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus .ld-focus-header .ld-user-menu .ld-text,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-course-navigation .ld-lesson-item-preview .ld-expand-button {
    color: var(--ld-dark-mode-content-text);
}

.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-course-navigation .ld-table-list.ld-topic-list .ld-table-list-item .ld-table-list-item-preview.ld-is-current-item {
    color: var(--ld-dark-mode-link-hover-color);
}

/* Main Content Area */
body.buddyx-dark-theme.ld-in-focus-mode,
body.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper {
    background: var(--ld-dark-mode-content-bg);
}

body.buddyx-dark-theme.ld-in-focus-mode pre {
    background: rgba(0, 0, 0, 0.7);
}

.buddyx-dark-theme.ld-in-focus-mode .ld-focus .ld-focus-content {
    color: var(--ld-dark-mode-content-text);
}

.buddyx-dark-theme.ld-in-focus-mode .ld-focus .ld-focus-content h1,
.buddyx-dark-theme.ld-in-focus-mode .ld-focus .ld-focus-content h2,
.buddyx-dark-theme.ld-in-focus-mode .ld-focus .ld-focus-content h3,
.buddyx-dark-theme.ld-in-focus-mode .ld-focus .ld-focus-content h4,
.buddyx-dark-theme.ld-in-focus-mode .ld-focus .ld-focus-content h5,
.buddyx-dark-theme.ld-in-focus-mode .ld-focus .ld-focus-content h6 {
    color: var(--ld-dark-mode-content-text);
}

.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-table-list a.ld-table-list-item-preview {
    color: var(--ld-dark-mode-link-color);
}

.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-table-list .ld-table-list-item,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-table-list .ld-table-list-items,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-content-actions,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-table-list.ld-no-pagination,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation .ld-lesson-item,
.buddyx-dark-theme.ld-in-focus-mode .ld-focus.ld-focus .buddyx-sfwd-course-position-wrapper {
    border-color: var(--ld-dark-mode-border-color);
}

.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__back-to-course-link,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__back-to-course-link:active,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__back-to-course-link:focus,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__back-to-course-link:focus-visible,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__back-to-course-link:focus-within,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__back-to-course-link:hover,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__next-link,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__next-link:active,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__next-link:focus,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__next-link:focus-visible,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__next-link:focus-within,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__next-link:hover,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__previous-link,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__previous-link:active,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__previous-link:focus,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__previous-link:focus-visible,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__previous-link:focus-within,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__previous-link:hover {
    background-color: rgb(255, 255, 255, 0.1);
}

.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__back-to-course-link:active,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__back-to-course-link:hover,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__next-link:active,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__next-link:hover,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__previous-link:active,
.buddyx-dark-theme.ld-in-focus-mode .ld-navigation__previous-link:hover {
    background-color: rgb(255, 255, 255, 0.2)
}

.buddyx-dark-theme.ld-in-focus-mode .ld-breadcrumbs.ld-breadcrumbs--modern,
.buddyx-dark-theme.ld-in-focus-mode .ld-breakpoint--small .ld-navigation,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper:not(.ld-registration__outer-wrapper):not(.learndash-wrapper--modern) .ld-content-actions {
    border-color: var(--ld-dark-mode-border-color);
}

/* Breadcrumbs */
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-breadcrumbs,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-topic-status,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper pre {
    color: var(--ld-dark-mode-text-secondary);
    background-color: var(--ld-dark-mode-sidebar-bg);
}

.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-breadcrumbs {
    border-radius: 0;
}

/* Tabs */
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-tabs .ld-tabs-navigation .ld-tab {
    color: var(--ld-dark-mode-text-secondary);
}

.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-tabs .ld-tabs-navigation::after {
    background: var(--ld-dark-mode-header-bg);
}

/* Sidebar */
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus.ld-focus .ld-focus-sidebar a.course-entry-link,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus.ld-focus .ld-focus-sidebar .lms-course-members-list .lms-count {
    background-color: rgb(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus.ld-focus .ld-focus-sidebar a.course-entry-link:hover {
    background-color: rgb(255, 255, 255, 0.2) !important;
}

.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus .ld-focus-sidebar,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus.ld-focus .ld-focus-sidebar .lms-topic-sidebar-progress,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus.ld-focus .ld-focus-sidebar .lms-course-members-list h4.lms-course-sidebar-heading {
    border-color: var(--ld-dark-mode-border-color);
}

.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation .ld-topic-list.ld-table-list:before {
    background: var(--ld-dark-mode-header-bg);
}

.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus .ld-focus-sidebar,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation .ld-lesson-item {
    background: var(--ld-dark-mode-sidebar-bg) !important;
}

.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus.ld-focus .ld-focus-sidebar .ld-pagination .ld-pages i,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus.ld-focus .ld-focus-sidebar .ld-pagination .ld-pages span,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus.ld-focus .ld-focus-sidebar .lms-course-members-list h4.lms-course-sidebar-heading,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus.ld-focus .ld-focus-sidebar .lms-course-members-list ul.course-members-list {
    color: var(--ld-dark-mode-link-color);
}

/* Topics List */
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation .ld-topic-list.ld-table-list,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus-sidebar .ld-table-list .ld-table-list-items {
    background: var(--ld-dark-mode-sidebar-bg);
    color: var(--ld-dark-mode-content-text);
}

.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-course-navigation .ld-lesson-item-preview a.ld-lesson-item-preview-heading,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-course-navigation .ld-table-list.ld-topic-list .ld-table-list-item .ld-table-list-title a,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-course-navigation .ld-table-list.ld-topic-list .ld-table-list-item a.ld-table-list-item-preview,
.buddyx-dark-theme.ld-in-focus-mode .ld-progress-bar {
    color: var(--ld-dark-mode-content-text);
}

/* Sidebar: Current Item */
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-course-navigation .ld-lesson-item.ld-is-current-lesson .ld-lesson-item-preview-heading,
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-course-navigation .ld-lesson-item.ld-is-current-lesson .ld-lesson-title {
    color: var(--ld-dark-mode-link-color);
    background: none;
}

/* Sidebar: Section Headings */
.buddyx-dark-theme.ld-in-focus-mode .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation .ld-lesson-item-section-heading {
    color: var(--ld-dark-mode-text-secondary);
    border-top: 1px solid var(--ld-dark-mode-border-color);
}