/* Menu and header themes */

html[data-adm-theme="purple"] body.admin-new-theme
{
    --adm-header-start: #4d19ac;
    --adm-header-end: #6a2bd9;
    --adm-menu: #3a1290;
    --adm-menu-sub: #320f7d;
    --adm-menu-text: #e4dcfb;
    --adm-menu-muted: #b5a6e6;
    --adm-menu-accent: #ffd54a;
}

html[data-adm-theme="night"] body.admin-new-theme
{
    --adm-header-start: #1d1733;
    --adm-header-end: #1d1733;
    --adm-menu: #1d1733;
    --adm-menu-sub: #17122a;
    --adm-menu-text: #c9c2de;
    --adm-menu-muted: #8d85a8;
}

html[data-adm-theme="ocean"] body.admin-new-theme
{
    --adm-header-start: #0f2742;
    --adm-header-end: #0f2742;
    --adm-menu: #0f2742;
    --adm-menu-sub: #0b1f36;
    --adm-menu-text: #c3d4e8;
    --adm-menu-muted: #7f97b3;
    --adm-menu-accent: #60a5fa;
}

html[data-adm-theme="forest"] body.admin-new-theme
{
    --adm-header-start: #12302a;
    --adm-header-end: #12302a;
    --adm-menu: #12302a;
    --adm-menu-sub: #0e2621;
    --adm-menu-text: #c5dcd3;
    --adm-menu-muted: #7fa395;
    --adm-menu-accent: #34d399;
}

html[data-adm-theme="light"] body.admin-new-theme
{
    --adm-header-start: #ffffff;
    --adm-header-end: #ffffff;
    --adm-header-text: #5b6475;
    --adm-menu: #f4f3f9;
    --adm-menu-sub: #ecebf4;
    --adm-menu-text: #344054;
    --adm-menu-muted: #667085;
    --adm-menu-accent: #4d19ac;
    --adm-chrome-strong: #171a21;
    --adm-chrome-overlay: 77, 25, 172;
}

html[data-adm-theme="light"] body.admin-new-theme .navbar.navbar-inverse
{
    border-bottom: 1px solid var(--adm-border);
}

html[data-adm-theme="light"] body.admin-new-theme #main-nav-bg
{
    border-right: 1px solid var(--adm-border);
}

html[data-adm-theme="light"] body.admin-new-theme .navbar-inverse #dashboard-link a,
html[data-adm-theme="light"] body.admin-new-theme .navbar-inverse #dashboard-link a i,
html[data-adm-theme="light"] body.admin-new-theme .navbar-inverse #dashboard-link a span
{
    color: var(--adm-brand);
}

/* The current page inside an open submenu, readable on every theme */

body.admin-new-theme #main-nav .navigation > .nav > li .nav > li > a.selected,
body.admin-new-theme #main-nav .dropdown.open .dropdown-menu li a.selected
{
    background: var(--adm-menu-active);
    box-shadow: inset 3px 0 0 var(--adm-menu-accent);
    color: var(--adm-chrome-strong);
    font-weight: 600;
}

body.admin-new-theme #main-nav .dropdown-menu > li > a,
body.admin-new-theme #main-nav .dropdown-menu > li > a:visited
{
    background: transparent;
    color: var(--adm-menu-text);
}

body.admin-new-theme #main-nav .dropdown.open .dropdown-menu li a:hover
{
    background: var(--adm-menu-hover);
    color: var(--adm-chrome-strong);
}

body.admin-new-theme #main-nav .dropdown.open > a
{
    background-color: transparent;
}

/* Density */

html[data-adm-density="compact"] body.admin-new-theme .table > thead > tr > th,
html[data-adm-density="compact"] body.admin-new-theme .table > tbody > tr > td,
html[data-adm-density="compact"] body.admin-new-theme .table > tfoot > tr > td
{
    padding-top: 4px;
    padding-bottom: 4px;
}

html[data-adm-density="compact"] body.admin-new-theme .form-control:not(textarea)
{
    height: 30px;
    padding-top: 4px;
    padding-bottom: 4px;
}

html[data-adm-density="compact"] body.admin-new-theme .panel-body
{
    padding: 10px;
}

html[data-adm-density="compact"] body.admin-new-theme .form-group
{
    margin-bottom: 8px;
}

html[data-adm-density="spacious"] body.admin-new-theme .table > thead > tr > th,
html[data-adm-density="spacious"] body.admin-new-theme .table > tbody > tr > td,
html[data-adm-density="spacious"] body.admin-new-theme .table > tfoot > tr > td
{
    padding-top: 13px;
    padding-bottom: 13px;
}

html[data-adm-density="spacious"] body.admin-new-theme .form-control:not(textarea)
{
    height: 40px;
}

html[data-adm-density="spacious"] body.admin-new-theme .panel-body
{
    padding: 20px;
}

html[data-adm-density="spacious"] body.admin-new-theme .form-group
{
    margin-bottom: 20px;
}

/* Text size */

html[data-adm-text="small"] body.admin-new-theme #content
{
    zoom: .92;
}

html[data-adm-text="large"] body.admin-new-theme #content
{
    zoom: 1.1;
}

/* Animations */

html[data-adm-motion="off"] *,
html[data-adm-motion="off"] *::before,
html[data-adm-motion="off"] *::after
{
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

/* The settings block at the bottom of the side menu */

body.admin-new-theme #main-nav .adm-ui-settings
{
    padding: 8px 10px 0;
    border-top: 1px solid rgba(var(--adm-chrome-overlay), .08);
}

body.admin-new-theme.main-nav-closed #main-nav .adm-ui-settings
{
    display: none;
}

body.admin-new-theme #main-nav .adm-ui-settings-toggle
{
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 8px;
    border: 0;
    border-radius: var(--adm-radius-sm);
    background: transparent;
    color: var(--adm-menu-text);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    transition: background-color var(--adm-transition), color var(--adm-transition);
}

body.admin-new-theme #main-nav .adm-ui-settings-toggle:hover,
body.admin-new-theme #main-nav .adm-ui-settings-toggle[aria-expanded="true"]
{
    background: var(--adm-menu-hover);
    color: var(--adm-chrome-strong);
}

body.admin-new-theme #main-nav .adm-ui-settings-toggle i
{
    width: 18px;
    color: var(--adm-menu-muted);
    text-align: center;
}

body.admin-new-theme #main-nav .adm-ui-settings-panel
{
    display: grid;
    gap: 12px;
    margin: 6px 0 4px;
    padding: 12px 10px;
    border-radius: var(--adm-radius);
    background: var(--adm-menu-sub);
}

body.admin-new-theme #main-nav .adm-ui-settings-panel[hidden]
{
    display: none;
}

body.admin-new-theme #main-nav .adm-ui-setting
{
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

body.admin-new-theme #main-nav .adm-ui-setting legend
{
    margin: 0 0 6px;
    padding: 0;
    border: 0;
    color: var(--adm-menu-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

body.admin-new-theme #main-nav .adm-ui-choices
{
    display: flex;
    gap: 2px;
    padding: 2px;
    border-radius: var(--adm-radius-sm);
    background: rgba(var(--adm-chrome-overlay), .06);
}

body.admin-new-theme #main-nav .adm-ui-choice
{
    flex: 1 1 0;
    margin: 0;
    font-weight: 500;
}

body.admin-new-theme #main-nav .adm-ui-choice input,
body.admin-new-theme #main-nav .adm-ui-swatch input
{
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

body.admin-new-theme #main-nav .adm-ui-choice span
{
    display: block;
    padding: 4px 2px;
    border-radius: 6px;
    color: var(--adm-menu-text);
    font-size: 11.5px;
    text-align: center;
    cursor: pointer;
    transition: background-color var(--adm-transition), color var(--adm-transition);
}

body.admin-new-theme #main-nav .adm-ui-choice span:hover
{
    color: var(--adm-chrome-strong);
}

body.admin-new-theme #main-nav .adm-ui-choice input:checked + span
{
    background: var(--adm-menu-active);
    color: var(--adm-chrome-strong);
    font-weight: 600;
}

body.admin-new-theme #main-nav .adm-ui-choice input:focus-visible + span,
body.admin-new-theme #main-nav .adm-ui-swatch input:focus-visible + span
{
    outline: 2px solid var(--adm-menu-accent);
    outline-offset: 1px;
}

body.admin-new-theme #main-nav .adm-ui-swatches
{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

body.admin-new-theme #main-nav .adm-ui-swatch
{
    margin: 0;
    font-weight: 500;
}

body.admin-new-theme #main-nav .adm-ui-swatch span
{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 2px 5px;
    border: 1px solid transparent;
    border-radius: var(--adm-radius-sm);
    color: var(--adm-menu-text);
    font-size: 11px;
    cursor: pointer;
    transition: border-color var(--adm-transition), background-color var(--adm-transition);
}

body.admin-new-theme #main-nav .adm-ui-swatch span::before
{
    content: "";
    width: 30px;
    height: 20px;
    border-radius: 5px;
    box-shadow: inset 0 0 0 1px rgba(var(--adm-chrome-overlay), .25);
}

body.admin-new-theme #main-nav .adm-ui-swatch span:hover
{
    background: var(--adm-menu-hover);
}

body.admin-new-theme #main-nav .adm-ui-swatch input:checked + span
{
    border-color: var(--adm-menu-accent);
    background: var(--adm-menu-active);
    color: var(--adm-chrome-strong);
    font-weight: 600;
}

body.admin-new-theme #main-nav .adm-ui-swatch--night span::before
{
    background: linear-gradient(90deg, #1d1733 40%, #ffffff 40%);
}

body.admin-new-theme #main-nav .adm-ui-swatch--purple span::before
{
    background: linear-gradient(90deg, #3a1290 40%, #ffffff 40%);
}

body.admin-new-theme #main-nav .adm-ui-swatch--graphite span::before
{
    background: linear-gradient(90deg, #1f2329 40%, #ffffff 40%);
}

body.admin-new-theme #main-nav .adm-ui-swatch--ocean span::before
{
    background: linear-gradient(90deg, #0f2742 40%, #ffffff 40%);
}

body.admin-new-theme #main-nav .adm-ui-swatch--forest span::before
{
    background: linear-gradient(90deg, #12302a 40%, #ffffff 40%);
}

body.admin-new-theme #main-nav .adm-ui-swatch--light span::before
{
    background: linear-gradient(90deg, #f4f3f9 40%, #ffffff 40%);
}

body.admin-new-theme #main-nav .adm-ui-settings-reset
{
    justify-self: start;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--adm-menu-muted);
    font-size: 11.5px;
    text-decoration: underline;
}

body.admin-new-theme #main-nav .adm-ui-settings-reset:hover
{
    color: var(--adm-chrome-strong);
}

/* More menu and header themes */

html[data-adm-theme="wine"] body.admin-new-theme
{
    --adm-header-start: #3a1020;
    --adm-header-end: #3a1020;
    --adm-menu: #3a1020;
    --adm-menu-sub: #2f0c19;
    --adm-menu-text: #eed6dd;
    --adm-menu-muted: #c39aa6;
    --adm-menu-accent: #ff8fab;
}

html[data-adm-theme="teal"] body.admin-new-theme
{
    --adm-header-start: #0e3533;
    --adm-header-end: #0e3533;
    --adm-menu: #0e3533;
    --adm-menu-sub: #0a2a28;
    --adm-menu-text: #cfe6e3;
    --adm-menu-muted: #8db8b2;
    --adm-menu-accent: #5eead4;
}

html[data-adm-theme="indigo"] body.admin-new-theme
{
    --adm-header-start: #1e1b4b;
    --adm-header-end: #1e1b4b;
    --adm-menu: #1e1b4b;
    --adm-menu-sub: #18153d;
    --adm-menu-text: #d9d7f5;
    --adm-menu-muted: #a5a2d6;
    --adm-menu-accent: #a5b4fc;
}

html[data-adm-theme="charcoal"] body.admin-new-theme
{
    --adm-header-start: #121212;
    --adm-header-end: #121212;
    --adm-menu: #121212;
    --adm-menu-sub: #0b0b0b;
    --adm-menu-text: #e4e4e4;
    --adm-menu-muted: #a3a3a3;
    --adm-menu-accent: #fbbf24;
}

body.admin-new-theme #main-nav .adm-ui-swatch--wine span::before
{
    background: linear-gradient(90deg, #3a1020 40%, #ffffff 40%);
}

body.admin-new-theme #main-nav .adm-ui-swatch--teal span::before
{
    background: linear-gradient(90deg, #0e3533 40%, #ffffff 40%);
}

body.admin-new-theme #main-nav .adm-ui-swatch--indigo span::before
{
    background: linear-gradient(90deg, #1e1b4b 40%, #ffffff 40%);
}

body.admin-new-theme #main-nav .adm-ui-swatch--charcoal span::before
{
    background: linear-gradient(90deg, #121212 40%, #ffffff 40%);
}

/* High contrast: darker borders and secondary text, a clear focus outline */

html[data-adm-contrast="high"] body.admin-new-theme
{
    --adm-text: #0b0d12;
    --adm-text-soft: #1d2433;
    --adm-muted: #39414f;
    --adm-border: rgba(16, 24, 40, .16);
    --adm-input-border: #c3c9d3;
    --adm-separator: #4b5563;
    --adm-surface-head: #eef0f4;
}

html[data-adm-contrast="high"]:not([data-adm-theme="light"]):not([data-adm-theme="easter"]):not([data-adm-theme="focus"]) body.admin-new-theme
{
    --adm-menu-text: #ffffff;
    --adm-menu-muted: #d5d9e0;
}

html[data-adm-contrast="high"] body.admin-new-theme .form-control,
html[data-adm-contrast="high"] body.admin-new-theme .btn-default,
html[data-adm-contrast="high"] body.admin-new-theme .bootstrap-select > .dropdown-toggle,
html[data-adm-contrast="high"] body.admin-new-theme .select2-container .select2-choice,
html[data-adm-contrast="high"] body.admin-new-theme .select2-container .select2-selection
{
    border-color: var(--adm-input-border);
}

html[data-adm-contrast="high"] body.admin-new-theme .form-control::placeholder
{
    color: #4b5563;
}

html[data-adm-contrast="high"] body.admin-new-theme a:focus-visible,
html[data-adm-contrast="high"] body.admin-new-theme button:focus-visible,
html[data-adm-contrast="high"] body.admin-new-theme input:focus-visible,
html[data-adm-contrast="high"] body.admin-new-theme select:focus-visible,
html[data-adm-contrast="high"] body.admin-new-theme textarea:focus-visible,
html[data-adm-contrast="high"] body.admin-new-theme [tabindex]:focus-visible
{
    outline: 3px solid var(--adm-brand-soft);
    outline-offset: 2px;
}

html[data-adm-contrast="high"] body.admin-new-theme #content a:not([class]):hover,
html[data-adm-contrast="high"] body.admin-new-theme #content a:not([class]):focus-visible
{
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Festive and mode themes */

html[data-adm-theme="easter"] body.admin-new-theme
{
    --adm-header-start: #fdf2c4;
    --adm-header-end: #fce7f3;
    --adm-header-text: #5b4b2a;
    --adm-menu: #f3f8ec;
    --adm-menu-sub: #e7f1dc;
    --adm-menu-text: #2f3a24;
    --adm-menu-muted: #5f6b4f;
    --adm-menu-accent: #c0266d;
    --adm-chrome-strong: #1f2616;
    --adm-chrome-overlay: 47, 58, 36;
}

html[data-adm-theme="christmas"] body.admin-new-theme
{
    --adm-header-start: #8c1d24;
    --adm-header-end: #b3262f;
    --adm-menu: #0f3d2e;
    --adm-menu-sub: #0b3025;
    --adm-menu-text: #e3f1ea;
    --adm-menu-muted: #a8c9b8;
    --adm-menu-accent: #f5c451;
}

html[data-adm-theme="halloween"] body.admin-new-theme
{
    --adm-header-start: #1a120b;
    --adm-header-end: #2b1608;
    --adm-menu: #16110c;
    --adm-menu-sub: #100c08;
    --adm-menu-text: #f1e3d3;
    --adm-menu-muted: #b9a38c;
    --adm-menu-accent: #fb8a1e;
}

html[data-adm-theme="gaming"] body.admin-new-theme
{
    --adm-header-start: #0a0e17;
    --adm-header-end: #2a0d4a;
    --adm-menu: #0a0e17;
    --adm-menu-sub: #070a11;
    --adm-menu-text: #d6e4ff;
    --adm-menu-muted: #8193b8;
    --adm-menu-accent: #22e5ff;
}

html[data-adm-theme="gaming"] body.admin-new-theme #main-nav .navigation > .nav > li.active
{
    box-shadow: inset 3px 0 0 var(--adm-menu-accent), 0 0 14px -4px rgba(34, 229, 255, .55);
}

html[data-adm-theme="focus"] body.admin-new-theme
{
    --adm-header-start: #f5f5f4;
    --adm-header-end: #f5f5f4;
    --adm-header-text: #57534e;
    --adm-menu: #f5f5f4;
    --adm-menu-sub: #ecebe9;
    --adm-menu-text: #3a3633;
    --adm-menu-muted: #6b6560;
    --adm-menu-accent: #44403c;
    --adm-chrome-strong: #1c1917;
    --adm-chrome-overlay: 68, 64, 60;
}

html[data-adm-theme="easter"] body.admin-new-theme .navbar.navbar-inverse,
html[data-adm-theme="focus"] body.admin-new-theme .navbar.navbar-inverse
{
    border-bottom: 1px solid var(--adm-border);
}

html[data-adm-theme="easter"] body.admin-new-theme #main-nav-bg,
html[data-adm-theme="focus"] body.admin-new-theme #main-nav-bg
{
    border-right: 1px solid var(--adm-border);
}

html[data-adm-theme="focus"] *,
html[data-adm-theme="focus"] *::before,
html[data-adm-theme="focus"] *::after
{
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
}

body.admin-new-theme #main-nav .adm-ui-swatch--easter span::before
{
    background: linear-gradient(90deg, #f3f8ec 40%, #fce7f3 40%);
}

body.admin-new-theme #main-nav .adm-ui-swatch--christmas span::before
{
    background: linear-gradient(90deg, #0f3d2e 40%, #b3262f 40%);
}

body.admin-new-theme #main-nav .adm-ui-swatch--halloween span::before
{
    background: linear-gradient(90deg, #16110c 40%, #fb8a1e 40%);
}

body.admin-new-theme #main-nav .adm-ui-swatch--gaming span::before
{
    background: linear-gradient(90deg, #0a0e17 40%, #22e5ff 40%);
}

body.admin-new-theme #main-nav .adm-ui-swatch--focus span::before
{
    background: linear-gradient(90deg, #f5f5f4 40%, #ffffff 40%);
}
