:root {
    color-scheme: light dark;
}

/* Tags */

img[src=""] {
    display: none;
}

body {
    margin: 0em;
    height: 100vh;
    /*min-height: 100%;*/
    display: flex;
    flex-direction: column;
    overflow-y: auto
}

h1 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

a {
    color: inherit;
}

button, select {
    padding-left: 0.5em;
    padding-right: 0.5em;
    border: 1px solid;
    height: 2rem;
}

button, select {
    cursor: pointer;
}

canvas {
    width: 50em;
    height: 25em;
    /*margin: auto;*/
}

input:not([type="file"]) {
    padding: 0.5em;
    border: 1px solid;
    background-color: transparent;
}

a.button {
    text-decoration: none;
}


/* Navigation */

#menu-icon {
    padding: 0.5em;
}

#menu-icon:hover {
    cursor: pointer;
}

.banner {
    display: flex;
    flex-direction: row;
    background-color: black;
    justify-content: space-between;
    color: white;
}

.banner a {
    text-decoration: none;
}

.navigation {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 1em;
}

.node {
    margin-left: 8px;
    margin-right: 8px;
}

.account {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row-reverse;
    align-items: center;
    margin-top: 8px;
    margin-bottom: 8px;
}


/* Main */

.content {
    /*margin-right: 8px;*/
    /*margin-bottom: 8px;*/
    flex: 1;
    display: flex;
    flex-direction: column;
    /*align-items: center;*/
    width: 100%;
    margin: 1em;
}


/* Static */

.page {
    display: flex;
    flex: 1;
    height: 100%;
    max-width: 67em;
    margin: auto;
}

#lateral {
    padding: 1em;
    width: 15em;
    overflow-y: auto;
}

header > div {
    flex: 1;
    overflow-wrap: anywhere;
}

header.static-page {
    /*margin: auto;*/
    max-width: 50em;
    max-width: 100%;
/*    display: flex;
    column-gap: 1em;
    align-items: flex-start;*/
}

header.static-page > img {
    height: 64px;
    margin-top: 1rem;
    margin-right: 1em;
    float: left;
}

header.dynamic-page {
    /*margin: auto;*/
    max-width: 65em;
    /*    display: flex;
    column-gap: 1em;
    align-items: flex-start;
    flex-direction: row-reverse;*/
}

header.dynamic-page > img {
    float: right;
/*    position:absolute;
    text-align:right;*/
    height: 10em;
    /*margin-top: 1.5rem;*/
}

.header-info {
    position: relative;
    float: right;
    margin-left: 0.5em;
    margin-bottom: 2px;
    height: 32px;
}

.header-info > div {
    position: absolute;
    transform: translate(-100%, 50%);
    /* transform: translate(-100%); */
    left: -0.5em;
    top: -1em;
    z-index: 500;
    /* height: 100%; */
    display: flex;
    align-items: center;
    /* color: white; */
    display: none;
    border: 1px solid;
    /*margin-right: 0.5em;*/
    padding: 0.5em;
    width: max-content;
    font-size: x-small;
    height: 50%;
}

.header-info:hover > div {
    display: flex;
}

/* Commands */

.commands {
    display: flex;
    text-align: center;
    width: 100%;
    overflow-x: auto;
    column-gap: 1em;
    grid-row-gap: 2px;
    /*flex-wrap: wrap;*/
}

.command_group {
    padding: 0.5em 1em;
    /*flex-grow: 1;*/
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    display: grid;
    align-content: center;
    /*border-bottom: 1px solid rgba(242, 83, 34, 1);*/
    /*border-radius: 0.5em 0.5em 0 0;*/
    white-space: nowrap;
}

.command {
    padding: 2px 0em;
    /* flex-grow: 1; */
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    display: grid;
    align-content: center;
    /* border-bottom: 1px solid rgba(242, 83, 34, 1); */
    /* border-radius: 0.5em 0.5em 0 0; */
    white-space: nowrap;
    text-decoration: none;
    opacity: 0.5;
    border-bottom: 4px solid transparent
}


.top-group {
    /*margin-top: 1em;*/
    /*margin-bottom: 1em;*/
}

.groups {
    display: flex;
    flex-direction: column;
    row-gap: 0.5em;
    width: 100%;
}

.subcommands {
    display: none;
}

    .subcommands > .commands {
        flex-direction: column;
    }

.command_group {
    position: relative;
}

    .command_group:hover > .subcommands, .command_group:focus-within > .subcommands {
        display: block;
    }

    .command_group > .subcommands {
        /*flex-direction: column;*/
        position: absolute;
        top: 100%;
        /*left: 50%;*/
        /*transform: translate(-50%);*/
        z-index: 200;
        flex-direction: column;
        /*width: fit-content;*/
        text-align: left
    }

#groups:empty {
    display: none;
}

.commands2 {
    display: flex;
    flex-direction: column;
    row-gap: 1em;
    column-gap: 1em;
    flex-wrap: nowrap;
}

.command_group2 {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    row-gap: 0.5em;
    column-gap: 0.5em;
}

.command_group3 {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    row-gap: 4px;
    margin-top: 0.5em
}

@media only screen and (max-width: 832px) {
    #lateral {
        display: none;
        /*position: absolute;*/
        z-index: 10000;
    }
}

.command2 {
    padding: 1em;
    display: flex;
    flex-direction: row;
    align-items: center;
    column-gap: 1em;
    text-decoration: none;
    width: min(30em, 100%);
}

.command3 {
    padding-left: 1em;
    padding-right: 1em;
    display: flex;
    flex-direction: row;
    align-items: center;
    column-gap: 1em;
    text-decoration: none;
    width: 13em;
    height: 2em;
}

    .command2 > div > img {
        width: 4em
    }

    .command2 > div > h3 {
        margin-top: 0.5em;
        margin-bottom: 0.5em;
    }

    .command2 > div > p {
        margin-top: 0.5em;
        margin-bottom: 1em;
    }


/* Components */

        .components {
    display: flex;
    flex-direction: column;
    row-gap: 1em;
    align-items: flex-start;
}

/* Fields */

.fields {
    /*display: flex;*/
    flex-wrap: wrap;
    width: 50em;
    max-width: 100%;
    column-gap: 2em;
}

/* Table */

.table-container {
    display: flex;
    flex-direction: column;
    row-gap: 0.5em;
    align-items: flex-start;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
    white-space: nowrap;
}

th, td {
    padding: 0.5em 0.5em;
    text-align: center;
}

td:has(.emoji) {
    padding: 0em;
}

thead > tr {
}

thead > tr > th {
    position: sticky;
    top: 0;
    z-index: 2;
}

thead > tr > th:last-child {
    /*border-right: 1px solid #333335;*/
}

tbody > tr > th {
    border: 1px solid #43423c;
}


tfoot > tr {
}

tfoot > tr > th {
    position: sticky;
    bottom: 0;
    z-index: 1;
}

tfoot > tr > th:last-child {
}


.filterable:hover {
    /*cursor: pointer;*/
}

.sortable:hover {
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}


.item:nth-of-type(odd) {
}


.item {
    /*border-bottom: 1px solid #333335;*/
    /*border-left: 1px solid #333335;
    border-right: 1px solid #333335;*/
    -webkit-user-select: none;
    user-select: none;
}

.clickable {
    cursor: pointer;
}

.item > td:last-child {
    /*border-right: 1px solid #333335;*/
}

.item > td {
    /*border-left: 1px solid #333335;*/
}

.item:hover {
}

thead > tr > th {
    -webkit-user-select: none;
    user-select: none;
}

.filterable {
    /*position: relative*/
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
}

.header-menu {
    text-align: center;
    flex-wrap: nowrap;
    max-width: 800px;
    flex-direction: column;
    position: fixed;
    transform: translate(-50%);
    z-index: 100;
    border: 1px solid;
    /*width: 10em;*/
    /*padding: 1em;*/
}

.menu-button {
    position: absolute;
    top: 0;
    right: 0;
    opacity: 0.75;
    display: none;
}

th:hover > .menu-button {
    display: block;
}

.menu-button:hover {
    cursor: pointer;
    opacity: 1;
}

.menu-button > img {
    vertical-align: middle;
}

th:has(* > .header-menu) {
    z-index: 100000;
}

.header-menu > button {
    background-color: transparent;
    margin: 0em 1em 1em;
    font-size: small;
    padding: 2px;
    height: initial;
}

.header-menu-filters {
    border: 1px solid #43423c;
    margin: 1em;
    font-size: small;
    display: flex;
    flex-direction: column;
    /*row-gap: 2px;*/
    max-height: 30em;
    overflow-y: auto;
}

.header-menu-filters > div {
    align-items: center;
}

th:has(.open) {
    z-index: 1000000
}

.header-menu-filters > .filter {
    padding: 2px 2px;
    flex-grow: 1;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    display: flex;
    align-content: center;
    flex-direction: row;
    /* border-bottom: 1px solid #43423c; */
    flex-wrap: nowrap;
    justify-content: space-between;
    column-gap: 0.5em;
}

.searchable > div {
    display: none;
    flex-direction: row;
    text-align: center;
    flex-wrap: nowrap;
    max-width: 800px;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%);
    width: 100%;
    /*border-top: 1px solid #43423c;
    border-left: 1px solid #43423c;
    border-right: 1px solid #43423c;*/
    z-index: 100;
}

.searchable > div > input {
    margin: 4px;
    text-align: center;
}

.searchable:hover > div {
    display: flex;
}

.searchable > div:has(input:focus) {
    display: flex;
}

th > input {
    border: none;
    text-align: center;
}

td.thumbnail, th.thumbnail {
    padding-top: 0px;
    padding-bottom: 0px;
}

td.thumbnail > img, th.thumbnail > img {
    max-height: 32px;
    vertical-align: middle;
}

td.text, th.text {
    text-align: left;
}

td.numeric, th.numeric {
    text-align: right;
}

.emoji {
    height: 1.5em;
    vertical-align: middle;
}

.header-menu-filters > .filter > img {
    margin: auto;
}

.header-menu > input {
    background-color: transparent;
    margin: 1em 1em 0em;
    font-size: small;
    padding: 2px;
}

.pagination {
    display: flex;
    justify-content: space-between;
    column-gap: 1em;
    align-items: center;
    overflow-x: auto;
    max-width: 100%;
}

.pagination > * button, .pagination > div > div {
    background-color: transparent;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0px;
}

.pagination > * button:not(:disabled) {
    cursor: pointer;
}

.pagination > * button:disabled {
    cursor: default;
    opacity: 0.5
}


.pagination > div {
    display: flex;
    column-gap: 0.5rem;
}



.dynamic {
    display: flex;
    flex-direction: column;
    /*min-height: 100vh;*/
    /*width: 50em;*/
    max-width: 100%;
    row-gap: 1em;
    align-items: flex-start;
    flex: 1;
}

.command-div {
    display: flex;
    flex-direction: column;
    /* min-height: 100vh; */
    /* width: 50em; */
    max-width: 100%;
    row-gap: 1em;
    align-items: flex-start;
}

.embeds {
    display: flex;
    overflow-y: auto;
    /* height: 100%; */
    /* margin: auto; */
    /*flex-wrap: wrap;*/
    align-items: flex-start; 
    /* justify-content: space-around; */
    max-width: 100%;
    overflow-x: auto;
    column-gap: 1em;
    row-gap: 1em;
    flex: 1;
    flex-direction: column;
}

.loading {
    background-image: url('https://ace-tanker.net/icons/loading.webp');
    background-position: center;
    background-size: 4em;
    background-repeat: no-repeat;
    background-position-y: 3em;
    min-height: 7em;
}

.embeds > div {
    overflow-x: auto;
    overflow-y: auto;
    max-width: 100%;
    /*max-height: 80vh;*/
    /*min-height: 100%;
    width: fit-content;*/
}

footer {
    /*text-align: center;
    vertical-align: middle;
    width: 100%;*/
    text-align: center;
    margin: 8px;
}



.components:empty {
    display: none
    /*margin-top: 1em;*/
}

.options-div:empty {
    display: none
    /*margin-top: 1em;*/
}

.pagination:empty {
    display: none
    /*margin-top: 1em;*/
}

.components > * button {
    /*margin-right: 1em;*/
    /*padding: 0.5em;*/
}






.options-div {
    display: flex;
    flex-direction: column;
    row-gap: 0.5em;
}

    .options-div > * label, #components > * label {
        margin-left: 1em;
    }


/* Charts */

.charts {
    /*max-width: 50em;*/
    /*max-height: 30em*/
}

.chart-div {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    column-gap: 1em;
    row-gap: 1em;
}

.chart-config {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 1em;
    row-gap: 1em;
}

.chart-axis {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 0.5em;
    row-gap: 0.5em;
}

.chart-calculation {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 0.5em;
    row-gap: 0.5em;
}

.chart-filters {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    column-gap: 0.5em;
    row-gap: 0.5em;
}

.chart-filters > button {
    background-color: transparent;
}

/* Export */

.available-formats {
    /*margin-top: 1em;*/
    display: flex;
    column-gap: 1em;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 0.5em;
    /*justify-content: center;*/
    display: none;
}

    .available-formats > a, .available-formats > div {
        padding: 0.5em;
        /*border: 1px solid rgb(67, 66, 60);*/
        cursor: pointer;
        text-decoration: none;
    }

@media (prefers-color-scheme: light) {
    @media only screen and (max-width: 832px) {
        #lateral {
            background-color: white;
            border-right: 1px solid black;
            border-bottom: 1px solid black;
        }
    }

    body {
        /*background-color: rgba(0,0,0,0.10);*/
        /*background-image: url(https://ace-tanker.net/icons/sparkles.png);*/
        font-family: Helvetica, Arial, sans-serif;
    }

    .command_group {
        background-color: rgba(0,0,0,0.10);
    }

    .command {
        /*background-color: rgba(0,0,0,0.10);*/
    }

    .target {
        /* background-color: rgba(242, 83, 34, 1); */
        /* border-bottom-color: rgba(242, 83, 34, 1); */
        border-bottom: 4px solid rgba(242, 83, 34, 1);
        border-radius: 4px;
        opacity: 1;
    }

    .command_group:has(* > .target) {
        background-color: rgba(242, 83, 34, 1);
    }

        .command_group:has(* > .target):hover {
            background-color: rgba(242, 83, 34, 1);
        }

    .command:hover {
        opacity: 1;
    }

    .command_group:hover {
        background-color: #A09C8B;
    }

    .command2 {
        background-color: rgba(0,0,0,0.05);
        /*background-image: linear-gradient(to right,rgba(255,210,0,.5) 0%,rgba(255,210,0,0) 100%),url(https://ace-tanker.net/icons/sparks-hof.png);*/
        background-repeat: no-repeat;
        transition: background-color .15s ease-out;
        box-shadow: inset 3px 0 0 0 #eecc85;
    }

    .command3 {
        background-color: rgba(0,0,0,0.10);
        /*background-image: linear-gradient(to right,rgba(255,210,0,.5) 0%,rgba(255,210,0,0) 100%),url(https://ace-tanker.net/icons/sparks-hof.png);*/
        background-repeat: no-repeat;
        /*transition: background-color .15s ease-out;*/
        box-shadow: inset 3px 0 0 0 #eecc85;
        background-color: rgba(0, 0, 0, 0.05);
    }

    .command3:hover {
        background-color: rgba(0, 0, 0, 0.1);
    }

    .command2:hover {
        background-color: rgba(0, 0, 0, 0.1);
    }

    .target:hover {
        /*background-color: rgba(242, 83, 34, 1);*/
    }

    table {
        /*background-color: rgba(0,0,0,0.10);*/
        /*border: solid 1px #302f2d;*/
    }

    thead > tr {
        /*background-color: rgba(0,0,0,0.20);*/
        /*color: white;*/
    }

    tbody > tr > th {
        /*        border: 1px solid #43423c;*/
        /*background-color: rgba(0,0,0,0.20);*/
    }


    tfoot > tr {
        /*background-color: rgba(0,0,0,0.20);*/
        /*color: white;*/
    }

    .filterable:hover {
        background-color: rgba(0,0,0,0.10);
    }

    .filterable:has(* > span[data-state="checked"]) {
        background-color: rgba(0,0,0,0.15);
    }

    .searchable:has(* > .input-value) {
        background-color: rgba(242, 83, 34, 1);
    }

    .sortable:hover {
        background-color: rgba(0,0,0,0.10);
    }

    .item:nth-of-type(odd) {
        background-color: rgba(0,0,0,0.10);
    }

    tfoot > tr:nth-of-type(even) {
        background-color: rgba(0,0,0,0.10);
    }

    tfoot > tr > th:hover {
        background-color: rgba(0,0,0,0.15);
    }

    .item:hover {
        background-color: rgba(0,0,0,0.15)
    }

    .header-menu {
        background-color: rgba(255,255,255,0.95);
    }

    .header-menu-filters > .filter:hover {
        background-color: rgba(0,0,0,0.10);
    }

    .header-menu-filters > .filter[data-state=checked] {
        background-color: rgba(0,0,0,0.15);
    }

    .header-menu > button:hover {
        background-color: rgba(0,0,0,0.10);
    }

    .header-info > div {
        background-color: white;
    }

    .searchable > div {
        /*background-color: #302f2d;*/
    }

    .available-formats > a, .available-formats > div {
        /*background-color: rgba(0,0,0,0.10);*/
    }

        .available-formats > a:hover {
            /*background-color: rgb(38,38,38);*/
        }

        .available-formats > div[data-checked="checked"] {
            background-color: rgba(242, 83, 34, 1);
        }

    .components > * button {
        /*background-color: rgba(0,0,0,0.10);*/
        /*border: 1px solid rgb(67, 66, 60);*/
    }

    button, select {
        /*background-color: rgba(0,0,0,0.10);*/
        /*border-color: rgb(67, 66, 60);*/
    }

        button:not(:disabled):hover, select:hover {
            /*background-color: rgb(38, 38, 38);*/
        }

    .chart-filters > button[data-checked="checked"] {
        background-color: rgba(0, 0, 0, 0.1);
    }
}

@media (prefers-color-scheme: dark) {
    @media only screen and (max-width: 832px) {
        #lateral {
            background-color: black;
            border-right: 1px solid white;
            border-bottom: 1px solid white;
        }
    }

    body {
        /*background-color: #1c1c1e;*/
        /*background-image: url(https://ace-tanker.net/icons/sparkles.png);*/
        font-family: Roboto Condensed,Arial Narrow,Arial,sans-serif;
    }

    table {
        /*background-color: #1c1c1e;*/
    }

    .command_group {
        background-color: rgb(37,37,41);
    }

    .command {
        /*background-color: rgb(37,37,41);*/
    }

    .target {
        /* background-color: rgba(242, 83, 34, 1); */
        /* border-bottom-color: rgba(242, 83, 34, 1); */
        border-bottom: 4px solid rgba(242, 83, 34, 1);
        border-radius: 4px;
        opacity: 1;
    }

    .command_group:has(* > .target) {
        background-color: rgba(242, 83, 34, 1);
    }

        .command_group:has(* > .target):hover {
            background-color: rgba(242, 83, 34, 1);
        }

    .command:hover {
        opacity: 1;
    }

    .command_group:hover {
        /*background-color: rgba(255, 255, 255, 0.2);*/
        background-color: rgb(82,42,31);
    }

    .command2 {
        background-color: rgba(40,40,40,.5);
        background-image: linear-gradient(to right,rgba(255,210,0,.1) 0%,rgba(255,210,0,0) 50%),url(https://ace-tanker.net/icons/sparks-hof.png);
        background-repeat: no-repeat;
        transition: background-color .15s ease-out;
        box-shadow: inset 3px 0 0 0 #eecc85;
    }

    .command2:hover {
        background-color: rgba(255,251,237,.05);
    }

    .command3 {
        background-color: #dcd9cd;
        /*background-image: linear-gradient(to right,rgba(255,210,0,.5) 0%,rgba(255,210,0,0) 100%),url(https://ace-tanker.net/icons/sparks-hof.png);*/
        background-repeat: no-repeat;
        /*transition: background-color .15s ease-out;*/
        box-shadow: inset 3px 0 0 0 #eecc85;
        background-color: rgba(255, 255, 255, 0.05);
    }

        .command3:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }

    .target:hover {
        /*background-color: rgba(242, 83, 34, 1);*/
    }

    table {
        /*background-color: #1c1c1e;*/
    }

    thead > tr {
        background-color: #302f2d;
    }

        thead > tr > th {
            background-color: #302f2d;
        }

            thead > tr > th:last-child {
            }

    tbody > tr > th {
        /*        border: 1px solid #43423c;*/
        background-color: #302f2d;
    }


    tfoot > tr {
        background-color: #302f2d;
    }

        tfoot > tr > th {
            background-color: #302f2d;
        }

            tfoot > tr > th:last-child {
            }

        tfoot > tr:nth-of-type(even) {
            background-color: rgba(39,39,43,.50);
        }

        tfoot > tr > th:hover {
            background-color: rgba(39,39,43,.90);
        }


    .filterable:hover {
        background-color: rgb(38,38,38);
    }

    .filterable:has(* > span[data-state="checked"]) {
        background-color: rgba(242, 83, 34, 1);
    }

    .searchable:has(* > .input-value) {
        background-color: rgba(242, 83, 34, 1);
    }

    .sortable:hover {
        background-color: rgb(38,38,38);
    }


    .item:nth-of-type(odd) {
        background-color: rgba(39,39,43,.50);
    }

    .item:hover {
        background-color: rgba(39,39,43,.90)
    }

    .header-menu {
        background-color: #302f2d;
    }

    .header-menu-filters > .filter:hover {
        background-color: rgb(38,38,38);
    }

    .header-menu-filters > .filter[data-state=checked] {
        background-color: #5a9445;
    }

    .header-menu > input {
        border: 1px solid #43423c;
    }

    .header-menu > button:hover {
        background-color: rgba(255,255,255,0.10);
    }

    .header-info > div {
        background-color: black;
    }

    .searchable > div {
        background-color: #302f2d;
    }

    .available-formats > a, .available-formats > div {
        background-color: rgb(48, 47, 45);
    }

        .available-formats > a:hover {
            background-color: rgb(38,38,38);
        }

        .available-formats > div[data-checked="checked"] {
            background-color: rgba(242, 83, 34, 1);
        }

    .components > * button {
        /*background-color: rgb(48, 47, 45);*/
        /*border: 1px solid rgb(67, 66, 60);*/
    }

    button, select {
        /*background-color: rgb(48, 47, 45);*/
        border-color: rgb(67, 66, 60);
    }

    input:not([type="file"]) {
        border-color: rgb(67, 66, 60);
    }

    button:not(:disabled):hover, select:hover {
        /*background-color: rgb(38, 38, 38);*/
    }

    .chart-filters > button[data-checked="checked"] {
        background-color: rgba(255, 255, 255, 0.2);
    }

}
