#preferences-modal {
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s ease-in-out;
    position: absolute;
    width: 100vw;
    height: 100vh;
    backdrop-filter: blur(4px);
    z-index: 70;
    display: flex;
    justify-content: center;
    align-items: center;
}

#preferences-modal.visible {
    visibility: visible;
    opacity: 1;
}

#preferences-wrapper {
    display: flex;
    flex-direction: row;;
    background-color: var(--background-color);
    width: 90vw;
    height: 80vh;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

#preferences-sidebar {
    width: 200px;
    height: 100%;
    background-color: var(--background-color-dark);
}

#preferences-body {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 16px;
    overflow: auto;
}

.preferences-sidebar-button {
    transition: all 0.2s ease-in-out;
    padding: 16px;
    cursor: pointer;
    text-align: end;
}

.preferences-sidebar-button:hover {
    background-color: var(--background-color);
    box-shadow: var(--box-shadow);
}

.preferences-section {
    width: 100%;
}

.preferences-section-heading {
    border-bottom: 1px solid var(--line-color);
    font-weight: bold;
}

.preferences-entry {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin: 8px;
    padding: 8px;
    border: 1px solid var(--line-color);
    border-radius: var(--border-radius);
}

.preferences-entry:not(.no-select):hover {
    background-color: var(--background-color-dark);
    cursor: pointer;
    user-select: none;
}

.preferences-checkbox {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--line-color);
    aspect-ratio: 1/1;
    border-radius: var(--border-radius);
    height: 24px;
    content-visibility: hidden;
}

.preferences-checkbox.checked {
    content-visibility: visible;
}

.preferences-panel {
    overflow: hidden;
    transition: transform 0.2s;
    transform-origin: top;
    transform: scaleY(1);
}

.preferences-panel:not(.visible) {
    transform: scaleY(0);
    height: 0px;
}

#preferences-manage-users {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.preferences-grid {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 8px;
    max-height: 500px;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

.preferences-grid-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 8px;
    border-radius: var(--border-radius);
    width: 100%;
}

.preferences-grid-row:not(:first-child) {
    border-top: 1px solid var(--primary-color);
}

.action-sliders {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
}

.reset-password-slider {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 7px;
    top: 0;
    height: calc(50% - 6px);
    right: 8px;
    transition: width 0.2s;
    z-index: 71;
    background-color: var(--yellow);
    cursor: pointer;
    margin-top: 3px;
    margin-bottom: 3px;
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
    overflow: hidden;
    color: white;
}

.reset-password-slider div {
    opacity: 0;
    transition: opacity 0.2s;
}

.reset-password-slider:hover div {
    opacity: 1;
}

.reset-password-slider:hover {
    width: 42px;
}

.reset-password-slider.commit .fa-check {
    display: block;
}

.reset-password-slider .fa-check {
    display: none;
}

.reset-password-slider.commit .fa-key {
    display: none;
}

.delete-slider {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 7px;
    top: 50%;
    height: calc(50% - 6px);
    right: 8px;
    transition: width 0.2s;
    z-index: 71;
    background-color: var(--red);
    cursor: pointer;
    margin-top: 3px;
    margin-bottom: 3px;
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
    overflow: hidden;
    color: white;
}

.delete-slider div {
    opacity: 0;
    transition: opacity 0.2s;
}

.delete-slider:hover div {
    opacity: 1;
}

.delete-slider:hover {
    width: 42px;
}

.delete-slider.commit .fa-check {
    display: block;
}

.delete-slider .fa-check {
    display: none;
}

.delete-slider.commit .fa-trash {
    display: none;
}

.preferences-tm-data {
    display: flex;
    flex-direction: column;
}

.preferences-tm-data input:first-child {
    margin-bottom: 8px;
}

.preferences-grid-entry {
    display: flex;
    align-items: center;
    border-radius: var(--border-radius);
    padding: 2px;
}

#preferences-users-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#preferences-get-admin {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

#preferences-admin {
    display: none;
}

#preferences-modal.is-admin #preferences-admin {
    display: block;
}