.ats-menu__btn {
    width: 24px;
    height: 24px;
    display: block;

    background-color: transparent;
    border: none;
    outline: none;

    padding: 0;
    margin: 0;

    cursor: pointer;
    color: white;
    transition: all 0.2s linear;
}

.ats-menu {
    z-index: 1000;
}

.ats-menu__btn:hover {
    color: var(--accent);
}

.ats-menu__icon {
    width: 100%;
    height: 100%;
    display: block;
}

.ats-menu {
    position: relative;
}

.ats-menu__dropdown {
    width: 200px;
    left: 0;
    position: absolute;
    top: auto;
    bottom: -10px;
    transform: translateY(100%);

    box-shadow: 3px 7px 20px 0px rgb(0 0 0 / 16%);
    background: var(--darkened-bg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

.ats-menu__dropdown .module {
    background: var(--darkened-bg);
}

.ats-menu__dropdown .actionlist li {
    min-height: 30px;
    display: flex;
    align-items: center;
}

.ats-menu__dropdown .actionlist li:not(:last-child) {
    border-bottom: 1px solid var(--hairline-color);
}

.ats-menu__dropdown .actionlist li:nth-child(even) {
    background-color: var(--darkened-bg)!important;
}

.ats-menu__dropdown .actionlist,
.ats-menu__dropdown .module {
    margin-bottom: 0;
}

.ats-menu__dropdown .actionlist {
    padding: 0;
    margin-top: 0;
}

.ats-menu a:link,
.ats-menu a:visited {
    color: var(--link-fg)!important;
}

.ats-menu-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 30px;
}

.ats-menu__checkbox {
    position: absolute;
    height: 0;
    width: 0;
    padding: 0;
    margin: 0;
    opacity: 0;
}

.ats-menu__checkbox:checked + .ats-menu__dropdown {
    bottom: -12px;
    opacity: 1;
    visibility: visible;
}

#header {
    display: grid;
    grid-template-columns: max-content max-content 1fr;
    grid-gap: 10px;
}

#ats-menu {
    order: 1;
}

#user-tools {
    order: 3;
}

#branding {
    order: 1;
}

.ats-menu__btn:has(+ .ats-menu__checkbox:checked) {
    color: #adad00;
    background-color: #e8e8e8;
}

[data-theme="dark"] .ats-menu__btn:has(+ .ats-menu__checkbox:checked) {
    color: #adad00;
    background-color: var(--hairline-color);
}

.ats-menu__btn {
    padding: 0 4px;
    border-radius: 4px;
}

.ats-menu__option {
    padding-left: 36px!important;
    display: flex!important;
    align-items: center;
    height: 35px;
    text-decoration: none;
    outline: none;
    transition: all 0.2s linear;
}

.ats-menu__dropdown {
    border: 1px solid #c9c9c9;
}

[data-theme="dark"] .ats-menu__dropdown {
    border: 1px solid #757575;
}

#ats-menu .ats-menu__option:hover {
    transition: all 0.2s linear;
    background-color: #e8e8e8 !important;
    cursor: pointer;
}

#ats-menu .ats-menu__option:hover {
    color: black!important;
    text-decoration: none!important;
}

@media (max-width: 1024px) {
    #user-tools {
        text-align: right;
    }

    #site-name {
        margin-bottom: 0;
    }
}

@media (max-width: 840px) {
    #user-tools {
        max-width: 270px;
        margin-left: auto;
        margin-right: 0;
    }
}

@media (max-width: 650px) {
    #header {
        grid-template-columns: 32px max-content;
    }

    #user-tools {
        max-width: none;
        width: 100%;
        grid-column: span  2;
        text-align: left;
    }
}

@media (max-width: 400px) {
    #site-name a {
        font-size: 1.3rem;
    }

    #user-tools {
    }
}
