body {
    background-color: #1c1b1e;
    color: #fff;
    font-family: 'Roboto', 'open sans', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
    margin: 0;
}

#outer-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

#outer-container > header {
    flex: 0 0 auto;
    background-color: #2e2e2e;
    padding: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    text-align: center;
    z-index: 500;
    overflow: hidden;
}

#header-title {
    font-size: 2.2em;
    font-weight: 300;
    margin: 0;
    padding: 5px 40px;
    border-bottom: 1px solid #ccc;
    font-weight: bold;
    max-width: 90%;
}

#outer-container > #main {
    flex: 1 0 auto;
    padding: 5px;
    width: 95%;
    max-width: 1550px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 20px;
    text-align: center;
    position: relative;
}

#title {
    font-size: 3.5em;
    font-weight: 300;
    margin: 0;
    padding-top: 23vh;
}

.card {
    border-radius: 5px;
    background-color: #3e3e3e;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    padding: 10px;
    margin-bottom: 10px;
}

header #first-line {
    display:flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: start;
}
header #first-line > :not(#header-title) {
    flex: 1;
}
header #first-line :last-child {
    text-align: right;
}
header #right-upper-menu {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

#menu {
    list-style: none;
    padding: 3px;
    display: flex;
    width: 100%;
    justify-content: center;
    flex-direction: row;
}

#menu > li {
    display: inline-block;
    padding-right: 10px;
    padding-left: 10px;
}
#menu > li.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
#menu > li:not(:last-child) {
    border-right: 1px solid #ccc;
}
#menu > li:not(:first-child) {
    border-left: 1px solid #ccc;
}

#menu > li > a {
    color: #ccc;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 300;
}
#menu > li:hover {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    background-color: #3e3e3e;
}
#menu > li.active > a {
    color: #f90;
}
@media only screen and (max-width: 600px) {
    #menu {
        flex-direction: column;
    }
    #menu > li  {
        border: 0 !important;
    }
    header #first-line {
        flex-direction: column;
        align-items: center;
    }
    header #first-line #right-upper-menu {
        margin-top: 10px;
        justify-content: center;
    }
}

a {
    color: #fff;
    text-decoration: none;
}

#refreshbutton {
    padding: 5px 10px;
    color: #fff;
    font-size: 1.6em;
    font-weight: 200;
    cursor: pointer;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

#table-releases {
    /* table-layout: fixed; */
    /*display: grid;
    grid-template-columns: calc(181px + (13px * 2) - 20px) 1fr calc(150px + (13px * 2) - 20px) calc((32px * 4) + (13px * 2) - 20px);*/
    width: 100%;
    border-radius: 5px;
    display: grid;
    gap: 4px;
    grid-template-columns: minmax(100px, max-content) minmax(150px, max-content) minmax(100px, max-content) 1fr minmax(100px, max-content) min-content;
    position: relative;
}

#table-releases :is(#table-releases-head, #releases-body, release) {
    display: contents;
}

#table-releases #table-releases-headerbg {
    grid-column: 1 / span 6;
    grid-row: 1;
    background-color: #1c1b1e;
    position: sticky;
    top: 0;
    /** over dropdowns */
    z-index: 1001;
    box-shadow: 0px 12px 10px 0px rgb(0 0 0 / 50%);
}

#table-releases > #table-releases-head > .table-releases-headcolumn:nth-child(1) {
    grid-column: 1;
}
#table-releases > #table-releases-head > .table-releases-headcolumn:nth-child(2) {
    grid-column: 2;
}
#table-releases > #table-releases-head > .table-releases-headcolumn:nth-child(3) {
    grid-column: 3;
}
#table-releases > #table-releases-head > .table-releases-headcolumn:nth-child(4) {
    grid-column: 4;
}
#table-releases > #table-releases-head > .table-releases-headcolumn:nth-child(5) {
    grid-column: 5;
}
#table-releases > #table-releases-head > .table-releases-headcolumn:nth-child(6) {
    grid-column: 6;
}
#table-releases > #table-releases-head > .table-releases-headcolumn {
    grid-row: 1;
    position: sticky;
    top: 0;
    background-color: #313131;
    display: flex;
    padding: 13px;
    font-size: 1.2em;
    font-weight: 300;
    text-align: left;
    border-radius: 4px;
    /** over dropdowns and header bg */
    z-index: 1002;
    /*box-shadow: 0px -20px 0px 0px #1c1b1e;/*, 0px 12px 10px 0px rgb(0 0 0 / 50%); /* in before 0px 12px 10px 0px rgb(0 0 0 / 50%) */
    vertical-align: bottom;
    margin-top: 5px;
}
#table-releases > #releases-body > release[aria-hidden='true'] {
    display: none;
}
#table-releases > #releases-body > release > td:nth-child(3) > a > span {
    overflow: hidden;
    text-overflow: ellipsis;
}
#table-releases > #releases-body > release > a {
    display: contents;
}
#table-releases > #releases-body > release > a > td:nth-child(1) {
    grid-column: 1;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}
#table-releases > #releases-body > release > a > td:nth-child(2) {
    grid-column: 2;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}
#table-releases > #releases-body > release > a > td:nth-child(3) {
    grid-column: 3;
}
#table-releases > #releases-body > release > a > td:nth-child(4) {
    grid-column: 4;
    text-align: left;
}
#table-releases > #releases-body > release > a > td:nth-child(5) {
    grid-column: 5;
}
#table-releases > #releases-body > release > a > td:nth-child(6) {
    grid-column: 6;
    overflow: visible;
}
#table-releases > #releases-body > release {
    cursor: pointer;
    position: relative;
}
#table-releases > #releases-body > release > a > * {
    grid-row: var(--row-index);
}
#table-releases > #releases-body > release > a > a {
    grid-column: 1 / -1;
}
#table-releases > #releases-body > release > a > td {
    /*display: flex;*/
    padding: 13px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    border-radius: 4px;
    user-select: all;
    vertical-align: baseline;
    background-color: #313131;
    align-items: center;
}
#table-releases > #releases-body > release:hover > a > td {
    background-color: #4e4e4e;
}
#table-releases > #releases-body > release[data-highlight] > a > td {
    /* light blue highlight */
    background-color: #3e4a5c;
}
#table-releases > #releases-body > release[data-highlight='new'] > a > td {
    /* light green highlight */
    background-color: #52653d;
}
#table-releases > #releases-body > release.open > a > td {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
@media only screen and (max-width: 600px) {
    #table-releases > #releases-body > release:hover > a > td {
        background-color: inherit;
    }
    #table-releases {
        grid-template-columns: 1fr;
    }
    #table-releases > #table-releases-headerbg {
        display: none;
    }
    #table-releases > #releases-body > release {
        position: relative;
        display: grid;
        border-radius: 10px;
        margin-bottom: 8px;
        background-color: #313131;
        grid-template: 
            "a f"
            "b f"
            "c f"
            "d f"
            "e f";
        grid-template-columns: 1fr min-content;
        padding: 13px;
    }
    #table-releases > #releases-body > release > a > a {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        grid-column: 1 / -1;
        grid-row: 1 / -1;
    }
    #table-releases > #releases-body > release > a > td:is(:nth-child(1), :nth-child(2), :nth-child(3)) {
        display: flex;
        flex-direction: row;
        align-items: start;
        justify-content: flex-start;
        flex-wrap: wrap;
        padding: 0;
    }
    #table-releases > #releases-body > release > a > td:nth-child(1) {
        grid-area: a;
    }
    #table-releases > #releases-body > release > a > td:nth-child(2) {
        grid-area: b;
    }
    #table-releases > #releases-body > release > a > td:nth-child(3) {
        grid-area: c;
    }
    #table-releases > #releases-body > release > a > td:nth-child(4) {
        grid-area: d;
    }
    #table-releases > #releases-body > release > a > td:nth-child(5) {
        grid-area: e;
    }
    #table-releases > #releases-body > release > a > td:nth-child(6) {
        grid-area: f;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-start;
    }
    #table-releases > #releases-body > release > a > td {
        padding: 5px;
        white-space: normal;
        overflow: visible;
        text-align: left;
        line-break: anywhere;
        background: 0;
        border-radius: 0;
    }
    #table-releases > #table-releases-head {
        border-bottom-left-radius: 5px;
        border-bottom-right-radius: 5px;
        background-color: #313131;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: sticky;
        box-shadow: 0px -20px 0px 0px #1c1b1e, 0px 12px 10px 0px rgb(0 0 0 / 50%);
        z-index: 5;
        margin-top: 5px;;
    }
    #table-releases > #table-releases-head > .table-releases-headcolumn.no-sort {
        display: none;
    }
    #table-releases > #table-releases-head > .table-releases-headcolumn {
        box-shadow: none;
        width: auto !important;
        padding: 4px;
        position: relative;
        top: 0 !important;
    }
}

/* table#table-releases > thead > tr > th:nth-child(1) {
    width: calc((42px * 2) + (148px) + (13px * 2) - 20px);
}
table#table-releases > thead > tr > th:nth-child(2) {
    width: calc(185px + (13px * 2) - 20px);
}
table#table-releases > thead > tr > th:nth-child(4) {
    width: calc(150px + (13px * 2) - 20px);
}
table#table-releases > thead > tr > th:nth-child(5) {
    width: calc((32px * 4) + (13px * 2) - 20px);
} */
#table-releases > #table-releases-head > tr > th:first-child {
    border-top-left-radius: 15px;
    border-bottom-left-radius: 8px;
}
#table-releases > #table-releases-head > tr > th:last-child {
    border-top-right-radius: 15px;
    border-bottom-right-radius: 8px;
}
#table-releases > #releases-body > release:first-child > a > td:first-child {
    border-top-left-radius: 8px;
}
#table-releases > #releases-body > release:first-child > a > td:last-child {
    border-top-right-radius: 8px;
}
#table-releases > #releases-body > release:last-child > a > td:first-child {
    border-bottom-left-radius: 15px;
}
#table-releases > #releases-body > release:last-child > a > td:last-child {
    border-bottom-right-radius: 15px;
}

.actionbtn {
    margin: 2px;
    padding: 5px;
    width: auto;
    background-color: #8bc34a;
    border-radius: 5px;
    overflow: visible;
    cursor: pointer;
    text-align: center;
    width: 18px;
    height: 18px;
}
.actionbtn:hover {
    background-color: #9ece75;
}
.actionbtn-red {
    background-color: #f44336;
}
.actionbtn-red:hover {
    background-color: #f77a6e;
}
.actionbtn-gray {
    background-color: #9e9e9e;
}
.actionbtn-gray:hover {
    background-color: #cfcfcf;
}
.actionbtn-blue {
    background-color: #2196f3;
}
.actionbtn-blue:hover {
    background-color: #6db6f9;
}

.chip {
    border-radius: 200px;
    padding: 5px 10px;
    background-color: #8bc34a;
    margin: 2px;
}

.chip-DOKU {
    background-color: #8bc34a;
}
.chip-MOVIE {
    background-color: #f44336;
}
.chip-BLURAY {
    background-color: #2196f3;
}
.chip-TV {
    background-color: #ff9800;
}

.chip-hasnfo {
    background-color: #4caf50;
    cursor: pointer;
}
.chip-nonfo {
    background-color: #e91e63;
}
.chip-completed {
    background-color: #4caf50;
}
.chip-incomplete {
    background-color: #9e9e9e;
}
.chip-hasimdb {
    background-color: #ffeb3b;
    color: #000;
    font-size: 13px;
    cursor: pointer;
}
.chip-noimdb {
    background-color: #ff9800;
    font-size: 13px;
}
.chip-imdbrating {
    background-color: #ffeb3b;
    color: #000;
    font-size: 13px;
    cursor: pointer;
}

release[aria-hidden='true'] {
    display: none;
}
release .xrel-date {
    display: none;
}

release.open .xrel-date {
    display: block;
}

#new-releases-search {
    background-color: #626262;
    outline: 0;
    border: 0;
    border-radius: 5px;
    padding: 5px 10px;
    padding-left: 30px;
    color: #fff;
    width: 100%;
}

.search-container {
    position: relative;
}
#new-releases-search-container {
    float: left;
    width: 100%;
    max-width: 400px;
}
.search-container:before {
    content: '\f002';
    font-family: "Font Awesome 6 Pro";
    font-weight: 900;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    z-index: 10;
    font-size: 14px;
}

#new-releases-bar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    padding: 5px;
    border-radius: 5px;
    background-color: #313131;
    /** over dropdowns */
    z-index: 1001;
}

#new-releases-bar-row2 {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 5px;
}

#new-releases-bar-row1 {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 5px;
}
#new-releases-bar hr {
    border: 0;
    /** divider line on #313131 background */
    border-top: 1px solid #626262;
    align-self: stretch;
    width: 98%;
}
@media only screen and (max-width: 600px) {
    #new-releases-bar-row1 {
        flex-direction: column;
    }
    #new-releases-bar {
        box-shadow: 0px 12px 10px 0px rgb(0 0 0 / 50%);
    }

}

#new-releases-bar #new-releases-bar-left-container, #new-releases-bar #new-releases-bar-right-container {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
}
#new-releases-bar #new-releases-bar-left-container  {
    justify-content: flex-start;
}

#new-releases-bar #new-releases-bar-right-container {
    justify-content: flex-end;
}

@media only screen and (max-width: 600px) {
    #new-releases-bar #new-releases-bar-left-container, #new-releases-bar #new-releases-bar-right-container {
        justify-content: center;
    }
}

#new-releases-loading-more {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    color: #aaa;
}

button {
    background-color: #626262;
    border: none;
    color: #fff;
    padding: 5px 10px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    border-radius: 5px;
}

button:hover {
    background-color: #7d7d7d;
}
table.sortable > thead > tr > th:not(.no-sort),
#table-releases > #table-releases-head > .table-releases-headcolumn:not(.no-sort),
.tablelike.sortable > .thead > .theadcolumn:not(.no-sort) {
    cursor: pointer;
}
table.sortable > thead > tr > th:not(.no-sort)::after,
#table-releases > #table-releases-head > .table-releases-headcolumn:not(.no-sort)::after,
.tablelike.sortable > .thead > .theadcolumn:not(.no-sort)::after {
    font-family: "Font Awesome 6 Pro";
    font-weight: 900;
    content: "\f0dc";
    color: #888;
    /*margin-left: 5px;*/
    float: right;
}

/* table.sortable > thead > tr > th:not(.no-sort):hover::after {
    content: "\f0dd";
} */
table.sortable > thead > tr > th:not(.no-sort)[aria-sort="desc"]::after,
#table-releases > #table-releases-head > .table-releases-headcolumn:not(.no-sort)[aria-sort="desc"]::after,
.tablelike.sortable > .thead > .theadcolumn:not(.no-sort)[aria-sort="desc"]::after {
    content: "\f0dd";
    color: #fff;
}
/* table.sortable > thead > tr > th:not(.no-sort)[aria-sort="desc"]:hover::after {
    content: "\f0de";
    color: #888;
} */
table.sortable > thead > tr > th:not(.no-sort)[aria-sort="asc"]::after,
#table-releases > #table-releases-head > .table-releases-headcolumn:not(.no-sort)[aria-sort="asc"]::after,
.tablelike.sortable > .thead > .theadcolumn:not(.no-sort)[aria-sort="asc"]::after {
    content: "\f0de";
    color: #fff;
}
/* table.sortable > thead > tr > th:not(.no-sort)[aria-sort="asc"]:hover::after {
    content: "\f0dd";
    color: #888;
} */

.full-width {
    width: 100%;
}

#browser-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    color: #aaa;
    position: sticky;
    top: 0;
    background-color: #1c1b1e;
    z-index: 10;
    box-shadow: 0 3px 3px 0px rgb(0 0 0 / 50%);
    margin-bottom: 15px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}
#browser-bar ::-webkit-scrollbar {
    height: 5px;
}
#discs-overview {
    margin-left: 10px;
}
#updated-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: #aaa;
    font-size: 0.8em;
    /* space between */
    padding: 5px 10px;
    margin-left: auto;
}
#updated-bar > #updated-date {
    margin: 0 4px;
    white-space: nowrap;
}

#the-path-display {
    padding: 5px 10px;
}
.path-display {
    text-align: left;
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    overflow-x: scroll;
    white-space: nowrap;
    margin-right: auto;
    margin-bottom: -5px; /* to hide the scrollbar */
}
.path-btn {
    border-radius: 5px;
    background-color: #2e2e2e;
    padding: 4px;
    margin: 2px;
    cursor: pointer;
}
.path-btn:hover {
    background-color: #3e3e3e;
}

#browser-table {
    white-space: nowrap;
    width: 100%;
    display: grid;
    gap: 3px;
    grid-template-columns: min-content auto min-content min-content min-content;
}
#browser-table :is(tbody,thead,tr) {
    cursor: pointer;
    display: contents;
}
#browser-table tbody tr:hover > td {
    background-color: #3e3e3e;
}
#browser-table tbody tr.keyboard-selected > td, *:has(#browser-search-bar input[type="search"]:valid) > #browser-table #browser-tablebody:not(:has(.keyboard-selected)) :nth-child(1 of :not([data-ghost])) > td {
    outline: 1px solid #bbb;
    box-sizing: border-box;
}
#browser-table tbody tr.keyboard-selected > td:nth-child(2), *:has(#browser-search-bar input[type="search"]:valid) > #browser-table #browser-tablebody:not(:has(.keyboard-selected)) :nth-child(1 of :not([data-ghost])) > td:nth-child(2) {
    text-decoration: underline;
}
#browser-table tr :is(th, td) {
    display: flex;
    align-items: center;
}
#browser-table tr th {
    column-gap: 5px;
    flex-direction: row-reverse;
    justify-content: center;
}
#browser-table tr td {
    flex-direction: row;
    justify-content: start;
}
#browser-table tr :is(th, td):nth-child(2) {
    overflow: hidden;
}
#browser-table tr :is(th, td):nth-child(2) .highlight {
    background-color: #8bc34a;
}
#browser-table tr :is(th, td):nth-child(2) .name-start {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.browser-entry-icon {
    aspect-ratio: 1;
    padding: 0;
    border-radius: 5px;
    margin: 0;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #8bc34a;
    font-size: 20px;
}

#browser-search-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 3px 2px rgb(0 0 0 / 50%);
    margin-bottom: 15px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    padding: 10px;
    margin-top: 20px;
    background-color: #1c1b1e;
    z-index: 100;
    bottom: 0;
}

#browser-search-container {
    width: 100%;
}
#browser-search-bar:has(input[type="search"]:is(:valid,:focus)) { /* non empty or focused */
    position: sticky;
}
@media only screen and (max-width: 600px) {
    #browser-search-bar { /* non empty or focused */
        position: sticky;
    }
}


#browser-search-bar input[type="search"] {
    background-color: #2e2e2e;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    padding-left: 30px;
    color: #fff;
    width: 100%;
    margin-right: 10px;
}

#browser-dropzone-wrapper {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.5);
}
#browser-dropzone {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #2e2e2e;
    opacity: 0.9;
    border-radius: 5px;
    border: 2px dashed #8bc34a;
    margin: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#browser-dropzone .dropzone-icon {
    font-size: 100px;
}
#browser-dropzone .dropzone-text {
    font-size: 20px;
    margin-top: 20px;
}
#browser-dropzone-wrapper.visible {
    display: block;
}

@media only screen and (max-width: 600px) {
    .browser-entry-icon {
        width: 40px;
        font-size: 25px;
    }
    #browser-table tbody tr:hover > td {
        background-color: inherit;
    }
    #browser-table th {
        display: none;
    }
    #browser-table {
        grid-template-columns: auto;
    }
    #browser-table tbody {
        display: contents;
    }
    #browser-table tbody tr {
        display: grid;
        gap: 5px;
        background-color: #2e2e2e;
        border-radius: 5px;
        padding: 4px;
        grid-template:
            "a b b e"
            "a c d e";
        grid-template-columns: min-content 1fr 1fr min-content;
    }
    #browser-table tbody tr td:nth-child(1) {
        grid-area: a;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    #browser-table tbody tr td:nth-child(2) {
        grid-area: b;
    }
    #browser-table tbody tr td:nth-child(3) {
        grid-area: c;
        color: #bbb;
    }
    #browser-table tbody tr td:nth-child(4) {
        grid-area: d;
        color: #bbb;
    }
    #browser-table tbody tr td:nth-child(5) {
        grid-area: e;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
}

.progress-indicator {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    border-right: 3px solid transparent;
    border-top: 6px solid #3498db;
    -webkit-animation: spin 1s linear infinite; /* Safari */
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

.cool-dialog {
    z-index: 100;
    background-color: #1c1b1e;
    color: #fff;
    border-radius: 15px;
    border: 0;
    box-shadow: 0 0px 7px 0px rgb(0 0 0 / 50%);
    max-height: 90%;
    max-width: 95%;
    width: 800px;
    min-height: 300px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
}

.cool-dialog:not([open]) {
    display: none;
}

.cool-dialog form {
    margin: 0;
    display: contents;
}

.cool-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #313131;
    border-bottom: 1px solid #888;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

.cool-dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
}
.cool-dialog-header > .cool-dialog-title {
    padding: 10px 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-wrap: nowrap;
}
.cool-dialog-header > .closebtn {
    /* a bit lighter than the background mixed with red */
    background-color: #5e2e2e;
    padding: 10px 15px;
    font-size: 20px;
    border-radius: 0;
    outline: 0;
    margin: 0;
    height: 100%;
    z-index: 500;
}
.cool-dialog-content-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 10px;
    /* padding: 0; */
    margin: 0;
    overflow: auto;
    text-align: left;
}
.cool-dialog-content-wrapper :is(pre, textarea) {
    padding: 0;
    text-align: left;
    border: none;
    background: none;
    margin: 0;
    font-family: "Roboto Mono", Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.34;
    overflow: visible;
    /* margin: auto; */
    flex-grow: 1;
    color: #fff;
}
.cool-dialog-content-wrapper img {
    width: 100%;
}
.cool-dialog-content-wrapper textarea {
    display: block;
    white-space: pre;
    width: 100%;
    outline: 0;
    resize: none;
    padding: 5px;
}
.cool-dialog-content-wrapper .nowrap-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cool-dialog-content-wrapper .progress-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
}
.cool-dialog-content-wrapper .cool-dialog-buttonbar {
    width: 100%;
    display: flex;
    flex-direction: row;
    margin-top: auto;
    padding-top: 10px;
    gap: 10px;
}
.cool-dialog-content-wrapper .cool-dialog-buttonbar > * {
    flex: 1;
}
.cool-dialog-content-wrapper :is(select, input:is([type="text"],[type="password"],[type="date"],[type="time"],[type="datetime-local"],[type="month"],[type="week"],[type="number"],[type="email"],[type="url"],[type="search"],[type="tel"],[type="color"])) {
    width: 100%;
    background-color: #2e2e2e;
    border: none;
    border-radius: 5px;
    padding: 10px;
    color: #fff;
    margin-bottom: 10px;
}
.cool-dialog-content-wrapper :is(select, input:is([type="text"],[type="password"],[type="date"],[type="time"],[type="datetime-local"],[type="month"],[type="week"],[type="number"],[type="email"],[type="url"],[type="search"],[type="tel"],[type="color"])):focus {
    outline: 1px solid #888;
}
.cool-dialog-content-wrapper :is(select, input:is([type="text"],[type="password"],[type="date"],[type="time"],[type="datetime-local"],[type="month"],[type="week"],[type="number"],[type="email"],[type="url"],[type="search"],[type="tel"],[type="color"])):disabled {
    color: #888;
    opacity: 0.5;
    background-color: #2e2e2e;
}
.cool-dialog-content-wrapper input[type="checkbox"] {
    margin-right: 10px;
}

/* Safari */
@-webkit-keyframes spin {
    0% { -webkit-transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/** Scrollbar */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}
/* Track */
::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-button {
    display: none;
}
  
/* Handle */
::-webkit-scrollbar-thumb {
    background: #888;
}
  
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

::-webkit-scrollbar-corner {
    background: transparent;
}


/** Toasts */

.toast {
    position: fixed;
    background-color: #2e2e2e;
    padding: 10px;
    display: grid;
    color: #fff;
    box-shadow: 0 0px 10px 1px rgb(0 0 0);
    z-index: 999999;
    border-radius: 5px;
    grid-template:
        "i a c"
        "i b c";
    gap: 5px;
    max-width: 350px;
    transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
    opacity: 0;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.toast.show {
    opacity: 1;
}
.toast[data-position="right"] {
    right: 15px;
}
.toast[data-position="left"] {
    left: 15px;
}
.toast[data-gravity="top"] {
    top: -150px;
}
.toast[data-gravity="bottom"] {
    bottom: -150px;
}

@media only screen and (max-width: 400px) {
    .toast {
        margin-left: auto;
        margin-right: auto;
        left: 15px !important;
        right: 15px !important;
        max-width: fit-content;
    }
}

.toast .toast-icon {
    grid-area: i;
    display: flex;
    align-items: center;
    justify-content: center;
}
.toast .toast-title {
    font-size: 20px;
    font-weight: 500;
    grid-area: a;
}
.toast .toast-subtitle {
    font-size: 14px;
    color: #bbb;
    grid-area: b;
}
.toast .toast-close {
    grid-area: c;
    display: flex;
    align-items: start;
    justify-content: center;
}
.toast .toast-close button {
    background: transparent;
}
.toast .toast-close button:hover {
    background: #555;
}
.toast .toast-progress-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5px;
    background-color: #ccc;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    overflow: hidden;
}
.toast .toast-progress {
    height: 100%;
    /** animate color */
    animation: toastprogresscolor 1s alternate infinite;
    transition: width 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
}

/** toast-progress color animation */
@keyframes toastprogresscolor {
    0% {
        background-color: #f1ee11;
    }
    100% {
        background-color: #348300;
    }
}

.toast[data-type="success"] {
    background-color: #316d2d;
}
.toast[data-type="waiting"] {
    background-color: #01579b;
}
.toast[data-type="error"] {
    background-color: #6d2d2d;
}



/** Dropdowns **/
.menu-button-wrapper {
    transition: all 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.menu-button {
    --circle-size: 0.3em;
    --gap-size: 0.2em;
    transition: all 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--gap-size);
    transform-origin: 50% 50%;
    transform-box: fill-box;
    width: calc(calc(var(--circle-size) * 3) + calc(var(--gap-size) * 4));
    height: calc(calc(var(--circle-size) * 3) + calc(var(--gap-size) * 4));
    padding: 0 calc(var(--gap-size) + var(--circle-size));
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    cursor: pointer;
    font-size: inherit;
    box-sizing: border-box;
}
.menu-button .circle {
    aspect-ratio: 1;
    background: #fff;
    border-radius: 50%;
    width: var(--circle-size);
    height: var(--circle-size);
    display: block;
}
.menu-button-wrapper:is(:hover, :focus) {
    transform: scale(1.2);
}
.menu-button:is(:hover, :focus) {
    background: transparent;
}
.menu-button:focus {
    outline: none;
}
.open .menu-button {
    transform: rotate(45deg);
}
/* .open .menu-button:hover {
    transform: rotate(45deg) scale(1.2);
} */
.open .menu-button .circle:is(:nth-child(4), :nth-child(5)) {
    opacity: 1;
}

.menu-button .circle:is(:nth-child(4), :nth-child(5)) {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    margin-left: calc(var(--margin-left-factor) * calc(var(--circle-size) + var(--gap-size)));
}
.menu-button .circle:nth-child(4) {
    --margin-left-factor: -1;
}
.menu-button .circle:nth-child(5) {
    --margin-left-factor: 1;
}


.dropdown {
    position: relative;
    display: inline-block;
    user-select: none;
}
.dropdown-content {
    z-index: 1000;
    position: absolute;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-15px);
    transition: all 200ms cubic-bezier(0.33, 1, 0.68, 1);
}
.dropdown-content-inner {
    transition: all 200ms ease;
    background-color: #2e2e2e;
    border-radius: 10px;
    box-shadow: #808080 0px 0px 0px 1px, /* outline */
        rgba(0, 0, 0, 0.85) 0px 16px 32px; /* shadow */
    padding: 8px 0px;

    min-width: 90px;
    max-width: 300px;
    width: max-content;
    position: absolute;
}
.dropdown-content.left, .dropdown-content.left .dropdown-content-inner {
    left: 0;
}
.dropdown-content.right, .dropdown-content.right .dropdown-content-inner {
    right: 0;
}
.dropdown.open > .dropdown-content {
    visibility: visible;
    transform: translateY(0);
    opacity: 1;
}

@media screen and (max-width: 400px) {
    .dropdown-content-inner {
        width: max-content;
    }
}

.dropdown-content-inner > ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.dropdown-content-inner > ul > li {
    margin: 0 8px;
    padding: 6px 14px;
    cursor: pointer;
    border-radius: 5px;
    text-align: left;
    user-select: none;
    position: relative;
    color: #fff;
}
.dropdown-content-inner > ul > li:has(.dropdown-content)::after {
    content: '\f0da';
    font-family: "Font Awesome 6 Pro";
    font-weight: 900;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    z-index: 10;
    font-size: 14px;
}
.dropdown-content-inner ul li.disabled {
    color: #555;
    cursor: default;
}
.dropdown-content-inner > ul > li.iconspace {
    padding-left: calc(8px + 1.6em);
}
.dropdown-content-inner > ul > li > .icon {
    position: absolute;
    left: calc(8px + 0.65em);
    top: 50%;
    transform: translate(-50%, -50%);
}
.dropdown-content-inner > ul > li:hover:not(.disabled) {
    background-color: #3e3e3e;
}
.dropdown-content-inner > ul > li.divider {
    height: 1px;
    background-color: #555;
    margin: 6px 0;
    padding: 0 !important;
    cursor: default;
}

/** Login **/
#login-form {
    width: auto;
    max-width: 400px;
    margin: 0 auto;
    padding: 10px;
    text-align: start;
}

#login-form label {
    font-weight: bold;
}

#login-form input:is([type="text"], [type="password"]) {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    box-sizing: border-box;
    display: inline-block;
    border: 1px solid #ccc;
    outline: none;
    background-color: #333;
    border-radius: 5px;
}

#login-form button[type="submit"] {
    background-color: #4CAF50;
    color: #fff;
    padding: 10px 15px;
    margin: 5px 0;
    border: none;
    cursor: pointer;
    width: 100%;
    border-radius: 5px;
}

#login-form .error {
    color: #ff0000;
    width: 100%;
    text-align: center;
}




/* Google Material Symbols */
.ms {
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-variant: normal;
    font-variation-settings:
        'FILL' 0,
        'wght' 200,
        'GRAD' 0,
        'opsz' 24;
    
}
.ms-regex::before {
    content: '\f750';
}
.ms-match-case::before {
    content: '\f6f1';
}
.ms-match-word::before {
    content: '\f6f0';
}
.ms-navigate-next::before {
    content: '\e409';
}
.ms-navigate-before::before {
    content: '\e408';
}
.ms-close::before {
    content: '\e5cd';
}
.ms-search::before {
    content: '\e8b6';
}
.ms-content-copy::before {
    content: '\e14d';
}
.ms-content-paste::before {
    content: '\e14f';
}


.checkbox-list {
    text-align: left;
}

@property --check-color {
    syntax: '<color>';
    initial-value: #4CAF50;
    inherits: true;
}
@property --check-background {
    syntax: '<color>';
    initial-value: #333;
    inherits: true;
}
.checkbox-list ul {
    list-style: none;
    padding-left: 1.7em;
    margin-top: 10px;
}

.checkbox-list li {
    margin-top: 10px;
    list-style: none;
}


.custom-checkbox {
    position: relative;
    cursor: pointer;
    display: inline-block;
    padding-left: 1.5em;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 1.2em;
    width: 1.2em;
    background-color: var(--check-background);
    border-radius: 3px;
}

.custom-checkbox:hover input[type="checkbox"] ~ .checkmark {
    background-color: color-mix(in srgb, var(--check-background), var(--check-color) 20%);
}

.custom-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
    left: 0.38em;
    top: 0.1em;
    width: 0.3em;
    height: 0.6em;
    border: solid var(--check-color);
    border-width: 0 0.15em 0.15em 0;
    transform: rotate(45deg);
}
.custom-checkbox input:indeterminate ~ .checkmark:after {
    display: block;
    background-color: var(--check-color);
    width: 0.7em;
    height: 0.1em;
    border-radius: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


@property --switch-color {
    syntax: '<color>'; /* light red */
    initial-value: #f44336;
    inherits: true;
}
@property --switch-color-checked {
    syntax: '<color>';
    initial-value: #3b90cb;
    inherits: true;
}
@property --switch-background {
    syntax: '<color>';
    initial-value: #333;
    inherits: true;
}
@property --switch-padding {
    syntax: '<length>';
    initial-value: 3px;
    inherits: true;
}
@property --switch-min-width {
    syntax: '<length>';
    initial-value: 48px;
    inherits: true;
}
@property --switch-max-width {
    syntax: '<length>';
    initial-value: 300px;
    inherits: true;
}
@property --switch-min-height {
    syntax: '<length>';
    initial-value: 24px;
    inherits: true;
}
@property --switch-border-radius {
    syntax: '<length>';
    initial-value: 32px;
    inherits: true;
}
.toggle-switch-container {
    display: grid;
    gap: 0.2em;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    min-height: var(--switch-min-height);
    /* background: var(--switch-background), linear-gradient(to left, var(--switch-color-checked), var(--switch-color)); */
    background: linear-gradient(to right, color-mix(in srgb, var(--switch-background), var(--switch-color) 20%), color-mix(in srgb, var(--switch-background), var(--switch-color-checked) 30%));
    border-radius: var(--switch-border-radius);
    cursor: pointer;
    position: relative;
    align-items: center;
    width: max-content;
    min-width: var(--switch-min-width);
    max-width: var(--switch-max-width);
    box-shadow: 0 2px 4px 1px rgba(0, 0, 0, 0.5);
}
/* .toggle-switch-container::before {
    content: "";
    position: absolute;
    top: var(--switch-padding);
    left: var(--switch-padding);
    width: calc(100% - calc(var(--switch-padding) * 2));
    height: calc(100% - calc(var(--switch-padding) * 2));
    border-radius: var(--switch-border-radius);
    z-index: 0;
    box-sizing: border-box;
    box-shadow: inset 0 0 4px 0px #000000cc;
} */

.toggle-switch-container input[type="checkbox"] {
    display: none;
    width: 0;
    height: 0;
}

.toggle-switch-container .toggle-switch {
    display: block;
    height: calc(100% - calc(var(--switch-padding) * 2));
    margin: var(--switch-padding);
    border-radius: calc(var(--switch-border-radius) - var(--switch-padding));
    background: var(--switch-color);
    position: absolute;
    transition: all 0.3s cubic-bezier(0.18, 0.89, 0.29, 1);
}
.toggle-switch-container .toggle-switch-label-left {
    justify-self: left;
}
.toggle-switch-container .toggle-switch-label-right {
    justify-self: right;
}
.toggle-switch-container .toggle-switch-label-left, .toggle-switch-container .toggle-switch-label-right {
    flex: 1 1 0px;
    padding: calc(var(--switch-padding) * 2);
    z-index: 1;
    shape-outside: radial-gradient(circle, transparent 50%, #000 50%);
}

.toggle-switch-container input:not(:checked) + .toggle-switch {
    left: 0;
    background-color: var(--switch-color);
}

/* Positioning for checked state */
.toggle-switch-container input:checked + .toggle-switch {
    transform: translateX(-100%);
    left: calc(100% - calc(var(--switch-padding) * 2));
    background: var(--switch-color-checked);
}
.toggle-switch {
    width: 50%;
    width: calc(50% - calc(calc(calc(var(--switch-min-width) - var(--switch-padding)) / 2) - calc(var(--switch-min-height) - calc(var(--switch-padding) * 2))));
}