/* Saved post content and imported job panels follow the theme appearance switch. */
html[data-a24-theme="dark"] .page-prose {
    --a24-content-surface: #1c293d;
    --a24-content-heading-surface: #293c59;
    --a24-content-text: #edf3ff;
    --a24-content-muted: #c5d3e9;
    --a24-content-link: #b9c9ff;
    --a24-content-border: #42526d;
}

/* The importer owns these classes. Its light stylesheet can load after the theme. */
html[data-a24-theme="dark"] body .page-prose :is(.a24fi-overview, .a24fi-application, .a24fi-card),
html[data-a24-theme="dark"] body .page-prose :is(.has-white-background-color, .has-very-light-gray-background-color, .has-light-gray-background-color, .has-cyan-bluish-gray-background-color):not(.a24-ad-placement *):not(.ad-widget *) {
    background-color: var(--a24-content-surface) !important;
    background-image: none !important;
    color: var(--a24-content-text) !important;
    border-color: var(--a24-content-border) !important;
    box-shadow: none;
}

html[data-a24-theme="dark"] body .page-prose :is(.a24fi-overview, .a24fi-application, .a24fi-card) :is(h2, h3, h4, p, li, strong, b),
html[data-a24-theme="dark"] body .page-prose :is(.has-white-background-color, .has-very-light-gray-background-color, .has-light-gray-background-color, .has-cyan-bluish-gray-background-color):not(.a24-ad-placement *):not(.ad-widget *) :is(h2, h3, h4, strong, b) {
    color: var(--a24-content-text) !important;
}
html[data-a24-theme="dark"] body .page-prose :is(.a24fi-application small, .a24fi-card-detail span, .a24fi-card-detail small) {
    color: var(--a24-content-muted) !important;
}
html[data-a24-theme="dark"] body .page-prose .a24fi-description :is(h2, h3, h4) {
    color: var(--a24-content-text) !important;
}
html[data-a24-theme="dark"] body .page-prose .a24fi-card-logo {
    background-color: #2b3b5e !important;
    color: var(--a24-content-text) !important;
}
html[data-a24-theme="dark"] body .page-prose :is(.a24fi-card-title, .a24fi-card-link) {
    color: var(--a24-content-link) !important;
    border-color: var(--a24-content-border) !important;
}
html[data-a24-theme="dark"] body .page-prose .a24fi-card-link:hover {
    background-color: var(--a24-content-heading-surface) !important;
}
html[data-a24-theme="dark"] body .page-prose .a24fi-apply-link {
    background-color: #3b64e7 !important;
    color: #ffffff !important;
}
html[data-a24-theme="dark"] body .page-prose .a24fi-apply-link:hover {
    background-color: #2b50c7 !important;
}
html[data-a24-theme="dark"] body .page-prose .a24fi-apply-link :is(span, strong, b) {
    color: inherit !important;
}
html[data-a24-theme="dark"] body .page-prose .btn-primary:not(.a24-ad-placement *):not(.ad-widget *) {
    background-color: #3b64e7 !important;
    color: #ffffff !important;
}

/* Related-article links use Gutenberg's saved neutral background classes. */
html[data-a24-theme="dark"] body .page-prose :is(.has-white-background-color, .has-very-light-gray-background-color, .has-light-gray-background-color, .has-cyan-bluish-gray-background-color):not(.a24-ad-placement *):not(.ad-widget *) a:not(.wp-block-button__link):not(.btn):not(.button):not([style*="background"]) {
    color: var(--a24-content-link) !important;
}
html[data-a24-theme="dark"] body .page-prose :is(.has-white-background-color, .has-very-light-gray-background-color, .has-light-gray-background-color, .has-cyan-bluish-gray-background-color):not(.a24-ad-placement *):not(.ad-widget *) a:not(.wp-block-button__link):not(.btn):not(.button):not([style*="background"]) :is(span, strong, b) {
    color: inherit !important;
}

/* Native and Ninja Tables need dark body cells as well as dark table headings. */
html[data-a24-theme="dark"] body .page-prose table:not(.tablepress):not(.a24fi-facts):not(.a24-ad-placement table):not(.ad-widget table),
html[data-a24-theme="dark"] body .page-prose table:not(.tablepress):not(.a24fi-facts):not(.a24-ad-placement table):not(.ad-widget table) :is(tbody, tr, td) {
    background-color: var(--a24-content-surface) !important;
    color: var(--a24-content-text) !important;
    border-color: var(--a24-content-border) !important;
}
html[data-a24-theme="dark"] body .page-prose table:not(.tablepress):not(.a24fi-facts):not(.a24-ad-placement table):not(.ad-widget table) :is(thead, tfoot, th) {
    background-color: var(--a24-content-heading-surface) !important;
    color: var(--a24-content-text) !important;
    border-color: var(--a24-content-border) !important;
}
html[data-a24-theme="dark"] body .page-prose table:not(.tablepress):not(.a24-ad-placement table):not(.ad-widget table) :is(td, th) :is(p, span, strong, b) {
    color: inherit !important;
}
html[data-a24-theme="dark"] body .page-prose table:not(.tablepress):not(.a24-ad-placement table):not(.ad-widget table) a:not(.btn):not(.button):not(.wp-block-button__link):not([style*="background"]) {
    color: var(--a24-content-link) !important;
}

/* Job overview cells are transparent on the overview panel's dark surface. */
html[data-a24-theme="dark"] body .page-prose table.a24fi-facts,
html[data-a24-theme="dark"] body .page-prose table.a24fi-facts :is(thead, tbody, tfoot, tr, th, td) {
    background-color: transparent !important;
    color: var(--a24-content-text) !important;
    border-color: var(--a24-content-border) !important;
}
html[data-a24-theme="dark"] body .page-prose table.a24fi-facts th {
    color: var(--a24-content-muted) !important;
}

/* Search and paging controls injected by Ninja Tables have their own light CSS. */
html[data-a24-theme="dark"] body .page-prose .ninja_footable :is(.form-control, .btn-default, .dropdown-menu),
html[data-a24-theme="dark"] body .page-prose .ninja_footable .footable-paging .pagination :is(a, button) {
    background-color: var(--a24-content-heading-surface) !important;
    color: var(--a24-content-text) !important;
    border-color: var(--a24-content-border) !important;
}
html[data-a24-theme="dark"] body .page-prose .ninja_footable .dropdown-menu :is(a, label),
html[data-a24-theme="dark"] body .page-prose .ninja_footable .form-control::placeholder {
    color: var(--a24-content-muted) !important;
}
html[data-a24-theme="dark"] body .page-prose .ninja_footable .footable-paging .pagination .active :is(a, button) {
    background-color: #3b64e7 !important;
    color: #ffffff !important;
}
