:root {
    --button-color: rgba(0, 0, 0, 0.8);
    --button-border: 1px solid var(--light-neon);
    --button-primary-color: #FFF;
    --dolphin-bg: #87aade;
    --neon: #8AD;
    --light-neon: #9BD;
    --very-light-neon: #CDE;
    --ultra-light-neon: #DEE;
    /*--neon-bg: background-color: rgba( 155, 255, 255, 0.7 );*/
    --neon-bg: #88AADDAA;

    /*--menu-active-background-color: rgba( 155, 255, 255, 0.7 );*/
    --menu-active-background-color: var(--neon-bg);

    --menu-image-gap: 8px;
    --menu-image-size: 32px;

    --menu-width: 150px;

    --header-image-size: 48px;
    --submenu-image-size: 32px;

    --upload-background: #c7ddef;
    --upload-background-hover: #d7edff;

    --success-background-color: rgba( 28, 184,  65, 0.5);
    --warning-background-color: rgba(223, 117,  20, 0.5);
    --danger-background-color:  rgba(202,  60,  60, 0.5);

    --image-stack-width: 32px;
}

body {
    color: #777;
}

a, a:visited {
    color: #777;
}

.pure-img-responsive {
    max-width: 100%;
    height: auto;
}

.pure-button,
a.pure-button:visited {
    color: var(--button-color);
    border-radius: 7px;
    border: var(--button-border);
}

.pure-button-primary,
.pure-button-selected,
a.pure-button-primary,
a.pure-button-selected {
    color: var(--button-primary-color);
}

/*
Add transition to containers so they can push in and out.
*/
/*
 * disabled by fiz
#layout,
#menu,
.menu-link {
    -webkit-transition: all 0.2s ease-out;
    -moz-transition: all 0.2s ease-out;
    -ms-transition: all 0.2s ease-out;
    -o-transition: all 0.2s ease-out;
    transition: all 0.2s ease-out;
}
*/

/*
This is the parent `<div>` that contains the menu and the content area.
*/
#layout {
    position: relative;
    left: 0;
    padding-left: 0;
    transition: left 0.2s ease-out;
}
#layout.active #menu {
    left: var(--menu-width);
    width: var(--menu-width);
}

#layout.active .menu-link {
    left: var(--menu-width);
    transition: left 0.2s ease-out;
}
/*
The content `<div>` is where all your content goes.
*/
.content {
    margin: 0 auto;
    padding: 0 2em;
    /*max-width: 800px;*/
    margin-bottom: 50px;
    line-height: 1.6em;
}

.header {
     margin: 0;
     color: #333;
     text-align: center;
     padding: 2.5em 2em 0;
     border-bottom: 1px solid #eee;
 }
    .header h1 {
        margin: 0.2em 0;
        font-size: 3em;
        font-weight: 300;
    }
    .header img.list-image {
        position: relative;
        top: 5px;
        height: var(--header-image-size);
    }
    .header .list-image {
        --image-stack-width: var(--header-image-size);
    }
    .header h2 {
        font-weight: 300;
        color: #ccc;
        padding: 0;
        margin-top: 0;
    }

.submenus {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
    margin-bottom: 1em;

    /* TODO: allow wrap in edit mode */
}
.submenu img.list-image {
    display: block;
    margin-inline: auto;
    margin-bottom: 0.3em;
    min-height: var(--submenu-image-size);
}
.submenu .image-stack.list-image {
    display: grid;
    margin-inline: auto;
    margin-bottom: 0.3em;
    min-height: var(--submenu-image-size);
}

.content-subhead {
    margin: 50px 0 20px 0;
    font-weight: 300;
    color: #888;
}



/*
The `#menu` `<div>` is the parent `<div>` that contains the `.pure-menu` that
appears on the left side of the page.
*/

#menu {
    margin-left: calc( var(--menu-width) * -1 ); /* "#menu" width */
    width: var(--menu-width);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000; /* so the menu or its navicon stays above all content */
    background: #191818;
    overflow-y: auto;
}
    /*
    All anchors inside the menu should be styled like this.
    */
    #menu a {
        color: #BBB;
        border: none;
        padding: 0.6em 0 0.6em 0.6em;
    }

    /*#menu a img {*/
        /*width: 32px;*/
    /*}*/
    #menu a:has( .image-stack ) {
        display: grid;
        grid-template-columns: var(--menu-image-size) 1fr;
        gap: var(--menu-image-gap);
    }
    #menu span {
        display: block;
        line-height: var(--menu-image-size);
    }
    #menu .image-stack {
        line-height: var(--menu-image-size);
    }
    #menu a:has( .image-stack ) .image-stack {
        width: var(--menu-image-size);
        height: var(--menu-image-size);
        object-fit: contain;
        filter: drop-shadow(0 0 4px #FFF);
    }

    /*
    Remove all background/borders, since we are applying them to #menu.
    */
     #menu .pure-menu,
     #menu .pure-menu ul {
        border: none;
        background: transparent;
    }

    /*
    Add that light border to separate items into groups.
    */
    #menu .pure-menu ul,
    #menu .pure-menu .menu-item-divided {
        border-top: 1px solid #777;
    }
        /*
        Change color of the anchor links on hover/focus.
        */
        #menu .pure-menu li a:hover,
        #menu .pure-menu li a:focus {
            background: #333;

        background-color: rgba( 155, 255, 255, 0.2 );
        box-shadow: 0 0 1em var(--neon);
        }

    /*
    This styles the selected menu item `<li>`.
    */
    #menu .pure-menu-selected,
    #menu .pure-menu-heading {
        background: #1f8dd6;

        background-color: var(--menu-active-background-color);
        outline: 3px solid var(--neon);
        box-shadow: 0 0 1em var(--neon);
    }
        /*
        This styles a link within a selected menu item `<li>`.
        */
        #menu .pure-menu-selected a {
            color: #fff;
        }

    /*
    This styles the menu heading.
    */
    #menu .pure-menu-heading {
        font-size: 110%;
        color: #fff;
        margin: 0;
    }

/* -- Dynamic Button For Responsive Menu -------------------------------------*/

/*
The button to open/close the Menu is custom-made and not part of Pure. Here's
how it works:
*/

/*
`.menu-link` represents the responsive menu toggle that shows/hides on
small screens.
*/
.menu-link {
    position: fixed;
    display: block; /* show this only on small screens */
    top: 0;
    left: 0; /* "#menu width" */
    background: #000;
    background: rgba(0,0,0,0.7);
    font-size: 10px; /* change this value to increase/decrease button size */
    z-index: 10;
    width: 2em;
    height: auto;
    padding: 2.1em 1.6em;
}

    .menu-link:hover,
    .menu-link:focus {
        background: #000;
    }

    .menu-link span {
        position: relative;
        display: block;
    }

    .menu-link span,
    .menu-link span:before,
    .menu-link span:after {
        background-color: #fff;
        pointer-events: none;
        width: 100%;
        height: 0.2em;
    }

        .menu-link span:before,
        .menu-link span:after {
            position: absolute;
            margin-top: -0.6em;
            content: " ";
        }

        .menu-link span:after {
            margin-top: 0.6em;
        }


/* -- Responsive Styles (Media Queries) ------------------------------------- */

/*
Hides the menu at `48em`, but modify this based on your app's needs.
*/
@media (min-width: 48em) {

    .header,
    .content {
        padding-left: 2em;
        padding-right: 2em;
    }

    #layout {
        padding-left: var(--menu-width); /* left col width "#menu" */
        left: 0;
    }
    #menu {
        left: var(--menu-width);
    }

    .menu-link {
        position: fixed;
        left: var(--menu-width);
        display: none;
    }

    #layout.active .menu-link {
        left: var(--menu-width);
    }
}

/* lock */
body.login {
    min-height: 100vh;
    background-image: url(/images/is-dolphin.svg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;

    text-align: center;
}
body.login #layout {
    margin-left: 0;
    padding-left: 0;
}
body.login #main {
    --w: 20em;
    --r: 30px;
    --color: #FFF;

    position: fixed;
    bottom: 20%;
    left: calc(50% - (var(--w)*2/3));
    width: var(--w);

    padding: 4em 3em;

    background-color: var(--neon-bg);
    border-radius: var(--r);
    border: 3px solid var(--neon);

    box-shadow: 0 0 1em var(--neon);
}
body.login h1 {
    margin: 0;
    margin-bottom: 1em;
    color: var(--color);
}
body.login h2.error {
    --color: #a94442;
    --background-color: #FAA;

    margin: 0;
    margin-bottom: 1em;
    padding: 0.2em 1em 0.2em 2em;
    color: var(--color);
    background-color: var(--background-color);

    background-image: url("/images/error.png");
    background-size: contain;
    background-repeat: no-repeat;

    border: 1px solid var(--color);
    border-radius: 5px;
}
body.login label {
    text-align: left;
    color: var(--color);
    margin: 1em 0 0.3em 0;
}
body.login input,
body.login button
{
    border-radius: 5px;
    border: 1px solid var(--neon);
    padding: 0.3em;
}
body.login button {
    color: #FFF;
    font-weight: bold;
    margin-top: 1em;
    padding: 0.4em 1em;
    background-color: var(--neon);
}

@media (max-width: 48em) {
    /* Only apply this when the window is small. Otherwise, the following
    case results in extra padding on the left:
        * Make the window small.
        * Tap the menu to trigger the active state.
        * Make the window large again.
    */
    #layout.active {
        position: relative;
        left: var(--menu-width);
    }
}

.text-success {
    color: rgb(28, 184, 65);
}
.text-warning {
    color: rgb(223, 117, 20);
}
.text-danger {
    color: rgb(202, 60, 60);
}
.text-bold {
    font-weight: bold;
}
.pure-menu-heading {
    text-transform: none;
    font-weight: 600;
}
.menu-header {
    padding: 0.6em 0.6em 0.3em 0.6em;
    font-weight: 700;
}

/* table magic */
table td.num {
    text-align: right;
}
table td.hide-id {
    font-family: monospace;
    text-align: center;
}

table.autoTable {
    border-collapse: collapse;
    min-width: 100%;
}
table.autoTable td {
    padding: 0.5em 1em;
}
table.autoTable td.empty-row {
    text-align: center;
    background-color: #EEE;
}
table.autoTable tr:hover {
    --r: 7px;
}
table.autoTable tr:hover td:first-child {
    border-top-left-radius: var(--r);
    border-bottom-left-radius: var(--r);
}
table.autoTable tr:hover td:last-child {
    border-top-right-radius: var(--r);
    border-bottom-right-radius: var(--r);
}
table.autoTable tr:hover td {
    background: rgba(50, 255, 255, 0.3);
}

table td.groupSeparator {
    text-align: center;
}
table tr:hover td.groupSeparator,
table td.groupSeparator {
    background-color: #EEE;
}

table td.pre {
    white-space: pre;
    font-family: monospace;
}

@media (max-width: 48em) {
    /* everything as block, hide head */
    table.autoTable,
    table.autoTable tbody,
    table.autoTable tr,
    table.autoTable td {
        display: block;
    }
    table.autoTable thead {
        display: none;
    }
    /* zebra */
    table.autoTable tr {
        background-color: #EEE;
    }
    table.autoTable tr:nth-of-type(odd) {
        background-color: #FFF;
    }
    table.autoTable td {
        position: relative;
        padding-left: 50%;
    }
    table.autoTable td::before {
        position: absolute;
        top: 0px;
        left: 0px;
        width: calc(45% - 10px);
        padding-right: 10px;
        white-space: nowrap;
        content: " ";

        text-align: left;
    }
}

ul.companies-list {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-content: flex-start;
    gap: 1em;
}
ul.companies-list li {
    text-align: center;
}
ul.companies-list li span {
    display: block;
    margin: 0.3em;
}
ul.companies-list li span:first-child {
    font-weight: bold;
    margin-bottom: 0.3em;
}
ul.companies-list a {
    display: block;
    text-decoration: none;

    color: #333;
    background-color: var(--ultra-light-neon);

    border: 1px solid var(--light-neon);
    border-radius: 7px;
}
@keyframes mighty-hover {
    from { background-position: 0% 0%; }
    to   { background-position: 90% 10%; }
}
ul.companies-list a:hover {
    background: linear-gradient(20deg, var(--ultra-light-neon), var(--light-neon), #F0F);
    background-size: 200% 200%;
    animation: mighty-hover 1s ease 1;
    animation-fill-mode: forwards;
    animation-direction: alternate;
}

/* autoEdit */
fieldset {
    border: none;
}
.input-group {
    margin-bottom: 0.5em;
}
.input-group label {
    display: block;
    font-weight: bold;
}
.input-group input,
.input-group textarea,
.input-group select {
    display: block;
    width: 100%;

    color: #333;
    background-color: #FFF;

    border-radius: 3px;
    border: 1px solid #BBB;
    padding: 0.3em 0.5em;
}
.input-group textarea {
    min-height: 8em;
}
.input-group input[disabled],
.input-group textarea[disabled],
.input-group select[disabled] {
    color: #777;
    cursor: not-allowed !important;
}

code {
    display: block;
    white-space: pre-wrap;
    border: 1px solid #CCC;
    background-color: #F7FCFC;
    padding: 0.3em 0.7em;
    border-radius: 7px;
    margin: 1em;
}

.alert {
    --color: #333;
    --back-color: #EEE;
    --border-color: #AAA;

    margin: 1em;
    padding: 0.5em 1em;

    color: var(--color);
    background-color: var(--back-color);
    border: 1px solid var(--border-color);
    border-radius: 7px;
}
.alert-success {
    --color: #373;
    --back-color: #EFE;
    --border-color: #AFA;
}

.autoFilters {
    padding: 1em 1em 0 0;
    border-radius: 7px;
    margin-block: 1em;
    transition: box-shadow 0.5s;
}

.autoFilters legend {
    font-size: 150%;
}
.autoFilters legend::after {
    font-size: 60%;
    font-style: italic;
    line-height: 90%;
}
.autoFilters.armed legend::after {
    content: " Eingabe...";
}
.autoFilters.fetching legend::after {
    content: " Suche...";
}
.autoFilters.armed {
    box-shadow: inset 0 0 10px var(--neon);
    transition: box-shadow 0.5s;
}
.autoFilters.fetching {
    box-shadow: inset 0 0 10px #F00;
    transition: box-shadow 0.5s;
}

ul.images {
    padding-left: 0;
    list-style: none;

    display: grid;
    grid-template-columns: repeat( auto-fill, 135px );
}
ul.images li {
    padding-bottom: 1em;
}
ul.images a,
ul.images a:hover,
ul.images a:visited {
    color: var(--color);
    text-decoration: none;
}
ul.images img {
    width: 128px;
    height: 128px;
    background-color: #EEE;
}
ul.images span {
    text-align: center;
    display: block;
    word-wrap: break-word;
}

.file-upload {
    background-color: var(--upload-background);
    outline: 2px dashed #888;
    outline-offset: -10px;

    border-radius: 3px;

    padding: 50px 20px;

    text-align: center;

    display: block;
}

.file-upload input {
    margin: 0 auto;
}

.file-upload .status {
    display: none;
}

.file-upload img {
    display: block;
    margin-inline: auto;
    margin-bottom: 10px;
}

.file-upload .choose {
    cursor: pointer;
}

.file-upload .drag-n-drop {
    display: none;
    font-weight: normal;
}

.file-upload.drag-n-drop .drag-n-drop {
    display: inline;
}

.file-upload.drag-n-drop.is-dragover {
    background-color: var(--upload-background-hover);
}

.file-upload.drag-n-drop input,
.file-upload.drag-n-drop button {
    display: none;
}

.file-upload.is-uploading div.file-input {
    visibility: none;
}
.file-upload.is-uploading .status.uploading {
    display: block;
}

.file-upload.is-success {
    background-color: var(--success-background-color);
}
.file-upload.is-success .status.success {
    display: block;
}

.file-upload.is-error {
    background-color: var(--danger-background-color);
}
.file-upload.is-error .status.error {
    display: block;
}

.image-list > li {
    clear: both;
}
.image-list .image-stack {
    float: right;
    margin-bottom: 1rem;
    border: 1px solid #CCF;
}
.image-list .image-stack {
    width: 128px;
}
.image-stack {
    user-select: none;

    display: inline-grid;
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 1fr 1fr;

    width: var(--image-stack-width);
    height: var(--image-stack-width);
    aspect-ratio: 1;
}
.image-stack, .image-stack .item {
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    aspect-ratio: 1;
}

