/* 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);
}
