/* GPL-2.0. Catppuccin Mocha color-only Opale JMES palette. Loaded for screen only, never print.
   No layout, font, icon, filter, image or inline user-color changes. */
html[data-redmine-dark] {
  color-scheme: dark;
  --rd-bg: #1e1e2e;
  --rd-panel: #313244;
  --rd-raised: #45475a;
  --rd-line: #6c7086;
  --rd-text: #cdd6f4;
  --rd-muted: #bac2de;
  --rd-link: #cba6f7;
  background-color: var(--rd-bg);
}
html[data-redmine-dark] body,
html[data-redmine-dark] :is(#wrapper, #main, #content, #sidebar, #footer) {
  color: var(--rd-text); background-color: var(--rd-bg); border-color: var(--rd-line);
}
html[data-redmine-dark] :is(h1, h2, h3, h4, h5, h6, legend, label, dt) { color: var(--rd-text); }
html[data-redmine-dark] :is(a, a:link, a:visited):not([class*="tracker-"]) { color: var(--rd-link); }
html[data-redmine-dark] :is(a:hover, a:focus):not([class*="tracker-"]) { color: #b4befe; }
html[data-redmine-dark] :is(#header, #top-menu) { background-color: #181825; color: #cdd6f4; }
html[data-redmine-dark] :is(#header, #top-menu) :is(a, h1, h2) { color: #cdd6f4; }
html[data-redmine-dark] :is(#main-menu, #main-menu ul) { background-color: #181825; }
html[data-redmine-dark] #main-menu li a { background-color: transparent; color: #cdd6f4; }
html[data-redmine-dark] #main-menu li :is(a.selected, a:hover) { background-color: var(--rd-bg); color: var(--rd-link); }
html[data-redmine-dark] :is(.box, div.issue, #login-form, .filecontent, pre, code, .ui-widget-content, .drdn-content, .menu-children, .flyout-menu, .tribute-container, #context-menu ul) {
  background-color: var(--rd-panel); color: var(--rd-text); border-color: var(--rd-line);
}
html[data-redmine-dark] :is(table.list, table.list td, table.list th, fieldset, hr, .journal, .journal h4, .wiki table, .wiki td, .wiki th) { border-color: var(--rd-line); }
html[data-redmine-dark] :is(table.list th, .ui-widget-header, .ui-datepicker-header, .tabs ul li a, .pagination ul.pages li, .jstTabs, .jstElements, .wiki th) {
  background-color: var(--rd-raised); color: var(--rd-text); border-color: var(--rd-line);
}
html[data-redmine-dark] :is(table.list tbody tr:nth-child(odd), .odd, table.list tbody tr:nth-child(odd) td) { background-color: var(--rd-panel); }
html[data-redmine-dark] :is(table.list tbody tr:nth-child(even), .even, table.list tbody tr:nth-child(even) td) { background-color: #1e1e2e; }
html[data-redmine-dark] :is(table.list tbody tr:hover, table.list tbody tr:hover td) { background-color: #45475a; }
html[data-redmine-dark] :is(table.list tr.context-menu-selection, table.list tr.context-menu-selection td) { background-color: #585b70 !important; color: #cdd6f4 !important; }
html[data-redmine-dark] table.list tr.context-menu-selection a { color: #cdd6f4 !important; }
html[data-redmine-dark] :is(input:not([type=submit]):not([type=button]):not([type=reset]):not([type=checkbox]):not([type=radio]):not([type=color]):not([type=range]), textarea, select) {
  background-color: #313244; color: var(--rd-text); border-color: #7f849c;
}
html[data-redmine-dark] :is(input, textarea)::placeholder { color: var(--rd-muted); }
html[data-redmine-dark] :is(input, textarea, select):disabled { background-color: var(--rd-raised); color: var(--rd-muted); }
html[data-redmine-dark] :is(button, input[type=submit], input[type=button], input[type=reset], a.button) {
  background-color: #45475a; color: #cdd6f4; border-color: #cba6f7;
}
html[data-redmine-dark] :is(button, input[type=submit], input[type=button], input[type=reset], a.button):hover { background-color: #585b70; }
html[data-redmine-dark] :is(input[type=checkbox], input[type=radio]) { accent-color: #cba6f7; }
html[data-redmine-dark] :is(.tabs ul li a.selected, .tabs ul li a:hover, .pagination ul.pages li.current, .ui-state-active, .ui-state-hover, .drdn-items a:hover, .tribute-container li.highlight) {
  background-color: #45475a; color: #cdd6f4; border-color: var(--rd-line);
}
html[data-redmine-dark] :is(.tabs, .tabs ul, .tabs ul li a, .ui-dialog, .ui-dialog-titlebar, .drdn-content, #context-menu ul) { border-color: var(--rd-line); }
html[data-redmine-dark] :is(.author, .age, .help, .info, #footer, .journal .details, .subtitle) { color: var(--rd-muted); }
html[data-redmine-dark] :is(.flash.notice, .flash.success) { background-color: #181825; color: #a6e3a1; border-color: #a6e3a1; }
html[data-redmine-dark] :is(.flash.error, #errorExplanation) { background-color: #181825; color: #f38ba8; border-color: #f38ba8; }
html[data-redmine-dark] :is(.flash.warning, .warning, .nodata) { background-color: #181825; color: #f9e2af; border-color: #f9e2af; }
html[data-redmine-dark] :is(.flash a, #errorExplanation a) { color: inherit; }
html[data-redmine-dark] :is(.required, .overdue .due_date, .overdue .due-date .value) { color: #f38ba8; }
html[data-redmine-dark] :is(.badge, span.status) { background-color: #45475a; color: #cba6f7; border-color: #cba6f7; }
html[data-redmine-dark] .badge-status-open { background-color: #181825; color: #89b4fa; border-color: #89b4fa; }
html[data-redmine-dark] .badge-status-locked { background-color: #45475a; color: #cdd6f4; border-color: #9399b2; }
html[data-redmine-dark] .badge-status-closed { background-color: #181825; color: #a6e3a1; border-color: #a6e3a1; }
html[data-redmine-dark] :is(.diff_in, .diff_in span) { background-color: #181825; color: #a6e3a1; }
html[data-redmine-dark] :is(.diff_out, .diff_out span) { background-color: #181825; color: #f38ba8; }
html[data-redmine-dark] :is(.wiki blockquote, .wiki pre, .wiki code) { border-color: var(--rd-line); }
html[data-redmine-dark] :is(.syntaxhl .c, .syntaxhl .c1, .syntaxhl .cm) { color: #a6adc8; }
html[data-redmine-dark] :is(.syntaxhl .k, .syntaxhl .kd, .syntaxhl .kn, .syntaxhl .kt) { color: #cba6f7; }
html[data-redmine-dark] :is(.syntaxhl .s, .syntaxhl .s1, .syntaxhl .s2) { color: #a6e3a1; }
html[data-redmine-dark] :is(.gantt_hdr, .gantt_subjects, .gantt_subjects_container, .gantt_selected_column, .gantt_selected_column_container, .gantt_area, table.cal td) {
  background-color: var(--rd-panel); color: var(--rd-text); border-color: var(--rd-line);
}
html[data-redmine-dark] :is(table.cal td.odd, table.cal td.week-number, .gantt_hdr.nwday) { background-color: var(--rd-raised); }
html[data-redmine-dark] :is(table.cal td.today, .gantt_hdr.today) { background-color: #45475a; }
html[data-redmine-dark] :is(.ui-state-default, .ui-widget-content .ui-state-default) { background-color: var(--rd-raised); color: var(--rd-text); border-color: var(--rd-line); }
html[data-redmine-dark] :is(#cbp_paste_dlg, #cbp_instructions, .cbp-toolbar, .cbp-editor-toolbar) { background-color: var(--rd-panel); color: var(--rd-text); border-color: var(--rd-line); }
html[data-redmine-dark] [data-redmine-dark-toggle][aria-pressed=true] { color: #cba6f7; }
html[data-redmine-dark] :is(.dropdown-content, .dropdown-content .user-info, #cbp_tools, #cbp_text_options) { background-color: var(--rd-panel); color: var(--rd-text); border-color: var(--rd-line); }
html[data-redmine-dark] #top-menu .dropdown-content a { color: var(--rd-link); }
html[data-redmine-dark] :is(.dropdown-divider, .dropdown-content .user-info) { border-color: var(--rd-line); }
html[data-redmine-dark] #cbp_tools button[aria-pressed=true] { background-color: #585b70; color: #cdd6f4; border-color: #cba6f7; }
/* Opale's component selectors override generic headings/inherited body color. */
html[data-redmine-dark] #content .wiki,
html[data-redmine-dark] #content .issue.details .subject h3,
html[data-redmine-dark] #content .issue .attribute:not(.status) .value,
html[data-redmine-dark] #content .issue table.attributes td:not(.status),
html[data-redmine-dark] #account .dropdown-content .user-name { color: var(--rd-text); }
html[data-redmine-dark] #content .issue .attribute .label,
html[data-redmine-dark] #content .issue table.attributes th,
html[data-redmine-dark] #account .dropdown-content .user-login { color: var(--rd-muted); }
html[data-redmine-dark] body .flyout-menu a.selected { background-color: #45475a; color: #cdd6f4; }

html[data-redmine-dark] :is(#sidebar, #footer) { background-color: #181825; }
/* Actual My page blocks have their own Opale background and inherited text. */
html[data-redmine-dark] #my-page .mypage-box {
  background-color: var(--rd-panel); color: var(--rd-text); border-color: var(--rd-line);
}
html[data-redmine-dark] #content table.list td { color: var(--rd-text); }
html[data-redmine-dark] #header #project-jump .drdn-trigger,
html[data-redmine-dark] #header #project-jump .drdn-content {
  background-color: var(--rd-panel); color: var(--rd-text); border-color: var(--rd-line);
}
html[data-redmine-dark] #header #project-jump a { color: var(--rd-link); }
html[data-redmine-dark] #header #project-jump a:hover { background-color: var(--rd-raised); }
/* Opale renders these actions as links, rather than button elements. */
html[data-redmine-dark] #content :is(.contextual > a.icon, .contextual .drdn-trigger, .buttons > a.icon, .other-formats a, .next-prev-links a, .next-prev-links span),
html[data-redmine-dark] #main #sidebar-switch-panel {
  background-color: var(--rd-raised); color: var(--rd-text); border-color: var(--rd-line);
}
html[data-redmine-dark] #main #sidebar-switch-panel:is(:hover, :focus, :active) {
  background-color: #585b70; color: var(--rd-text);
}
html[data-redmine-dark] #main #sidebar-switch-button { color: var(--rd-text); }
html[data-redmine-dark] #content :is(.contextual > a.icon, .contextual .drdn-trigger, .buttons > a.icon, .other-formats a, .next-prev-links a):hover {
  background-color: #585b70; color: var(--rd-text);
}
html[data-redmine-dark] #sidebar ul:not(.watchers) li > a:not(.icon-only).selected {
  background-color: var(--rd-raised); color: var(--rd-text); border-color: var(--rd-link);
}
/* Journal headings and speech-bubble tips are separately painted by Opale. */
html[data-redmine-dark] #history .journal h4 {
  background-color: var(--rd-panel); color: var(--rd-muted);
}
html[data-redmine-dark] #history .journal h4 a { color: var(--rd-link); }
html[data-redmine-dark] #history .journal h4 .update-info { color: #fab387; }
html[data-redmine-dark] #history .journal h4::after { border-right-color: var(--rd-panel); }
html[data-redmine-dark] #history .journal h4::before { border-right-color: var(--rd-line); }
html[data-redmine-dark] #history .journal > div:target > h4::before { border-right-color: var(--rd-link); }
html[data-redmine-dark] #history .journal > div + .contextual > .heart-link-with-count {
  background-color: var(--rd-bg); color: var(--rd-link);
}
html[data-redmine-dark] #history .journal .details i:first-of-type {
  background-color: #181825; color: #fab387;
}
html[data-redmine-dark] #history .journal .details i:last-of-type {
  background-color: #181825; color: #a6e3a1;
}
