/*
 * admin_tools CSS gates dark mode only via @media (prefers-color-scheme: dark),
 * ignoring Django admin's theme toggle. Force colors to follow data-theme.
 */

/* Light theme: html[data-theme="light"] */

/* Menu (admin_tools/css/menu.css) */

html[data-theme="light"] #header #navigation-menu {
    background-color: #f8f8f8;
    border-color: #ddd;
}

html[data-theme="light"] #header ul#navigation-menu li a,
html[data-theme="light"] #header ul#navigation-menu li ul li ul,
html[data-theme="light"] #header ul#navigation-menu li ul li a {
    border-color: #ededed;
    color: #555;
}

html[data-theme="light"] #header ul#navigation-menu li.disabled a,
html[data-theme="light"] #header ul#navigation-menu li.disabled a:hover {
    background-color: transparent;
    color: #bbb;
}

html[data-theme="light"] #header ul#navigation-menu li:hover,
html[data-theme="light"] #header ul#navigation-menu li.over,
html[data-theme="light"] #header ul#navigation-menu li.selected,
html[data-theme="light"] #header ul#navigation-menu li:hover > ul li,
html[data-theme="light"] #header ul#navigation-menu li.over > ul li,
html[data-theme="light"] #header ul#navigation-menu li ul li:hover > ul li,
html[data-theme="light"] #header ul#navigation-menu li ul li.over > ul li {
    background-color: #fff;
}

html[data-theme="light"] #header ul#navigation-menu li ul li:hover,
html[data-theme="light"] #header ul#navigation-menu li ul li.over,
html[data-theme="light"] #header ul#navigation-menu li ul li ul li:hover,
html[data-theme="light"] #header ul#navigation-menu li ul li ul li.over {
    background-color: #fafafa;
}

/* Dashboard (admin_tools/css/dashboard.css) */

html[data-theme="light"] .group ul,
html[data-theme="light"] .dashboard-module,
html[data-theme="light"] .dashboard-placeholder,
html[data-theme="light"] #dashboard-panel ul li {
    border-color: #d3d3d3;
}

html[data-theme="light"] .group .ui-state-default,
html[data-theme="light"] .dashboard-module-content {
    border-color: #d3d3d3;
}

html[data-theme="light"] #dashboard-panel h3 a {
    background: #f8f8f8;
}

html[data-theme="light"] .group ul {
    background: #fff;
}

html[data-theme="light"] .dashboard-module.ui-tabs-panel,
html[data-theme="light"] .group .ui-state-default,
html[data-theme="light"] .group-accordion .group-accordion-header.ui-state-default,
html[data-theme="light"] #dashboard-panel ul li,
html[data-theme="light"] .dashboard-module ul li {
    background: #fff;
}

html[data-theme="light"] .dashboard-module ul li:hover {
    background: #fafafa;
    color: #666;
}

html[data-theme="light"] .group .ui-state-default a {
    color: #5B80B2;
}

html[data-theme="light"] .group .ui-tabs-active,
html[data-theme="light"] .group .ui-state-default:hover,
html[data-theme="light"] .dashboard-placeholder {
    background-color: #fafafa;
}

html[data-theme="light"] .dashboard-module h2 {
    background-color: var(--primary);
    color: var(--header-link-color, #fff);
}

html[data-theme="light"] .dashboard-module h3 {
    background-color: #f8f8f8;
    color: #666;
}

html[data-theme="light"] .dashboard-module ul li.odd {
    background-color: #fff;
}

html[data-theme="light"] .dashboard-module ul li.even {
    background-color: #f8f8f8;
}

html[data-theme="light"] .dashboard-module h2 a.toggle-icon,
html[data-theme="light"] .dashboard-module h2 a.close-icon {
    filter: none;
}

/* Dark theme: html[data-theme="dark"] */

/* Menu (admin_tools/css/menu.css) */

html[data-theme="dark"] #header #navigation-menu {
    background-color: #1f1f1f;
    border-color: #333;
}

html[data-theme="dark"] #header ul#navigation-menu li a,
html[data-theme="dark"] #header ul#navigation-menu li ul li ul,
html[data-theme="dark"] #header ul#navigation-menu li ul li a {
    border-color: #333;
    color: #ccc;
}

html[data-theme="dark"] #header ul#navigation-menu li.disabled a,
html[data-theme="dark"] #header ul#navigation-menu li.disabled a:hover {
    background-color: #1f1f1f;
    color: #444;
}

html[data-theme="dark"] #header ul#navigation-menu li:hover,
html[data-theme="dark"] #header ul#navigation-menu li.over,
html[data-theme="dark"] #header ul#navigation-menu li.selected,
html[data-theme="dark"] #header ul#navigation-menu li:hover > ul li,
html[data-theme="dark"] #header ul#navigation-menu li.over > ul li,
html[data-theme="dark"] #header ul#navigation-menu li ul li:hover > ul li,
html[data-theme="dark"] #header ul#navigation-menu li ul li.over > ul li {
    background-color: #111;
    color: #fff;
}

html[data-theme="dark"] #header ul#navigation-menu li ul li:hover,
html[data-theme="dark"] #header ul#navigation-menu li ul li.over,
html[data-theme="dark"] #header ul#navigation-menu li ul li ul li:hover,
html[data-theme="dark"] #header ul#navigation-menu li ul li ul li.over {
    background-color: #111;
}

/* Dashboard (admin_tools/css/dashboard.css) */

html[data-theme="dark"] .group ul,
html[data-theme="dark"] .dashboard-module,
html[data-theme="dark"] .dashboard-placeholder,
html[data-theme="dark"] #dashboard-panel ul li {
    border-color: #666;
    border-radius: 0;
}

html[data-theme="dark"] .group .ui-state-default,
html[data-theme="dark"] .dashboard-module-content {
    border-color: #666;
}

html[data-theme="dark"] #dashboard-panel h3 a {
    background: #666;
}

html[data-theme="dark"] .group ul {
    border: 0;
    background: #111;
}

html[data-theme="dark"] .dashboard-module.ui-tabs-panel,
html[data-theme="dark"] .group .ui-state-default,
html[data-theme="dark"] .group-accordion .group-accordion-header.ui-state-default,
html[data-theme="dark"] #dashboard-panel ul li,
html[data-theme="dark"] .dashboard-module ul li {
    background: #111;
}

html[data-theme="dark"] .dashboard-module ul li:hover {
    background: #1a1a1a;
    color: #aaa;
}

html[data-theme="dark"] .group .ui-state-default a {
    color: #aaa;
}

html[data-theme="dark"] .group .ui-tabs-active,
html[data-theme="dark"] .group .ui-state-default:hover,
html[data-theme="dark"] .dashboard-placeholder {
    background-color: #333;
}

html[data-theme="dark"] .dashboard-module h2 {
    background-color: var(--primary);
    color: #ccc;
}

html[data-theme="dark"] .dashboard-module h3 {
    background-color: #1f1f1f;
    color: #aaa;
}

html[data-theme="dark"] .dashboard-module ul li.odd {
    background-color: #1a1a1a;
}

html[data-theme="dark"] .dashboard-module ul li.even {
    background-color: #111;
}

html[data-theme="dark"] .dashboard-module h2 a.toggle-icon,
html[data-theme="dark"] .dashboard-module h2 a.close-icon {
    filter: invert(1);
}
