/* MAIN */
nav.navbar {
    --bs-navbar-padding-x: 1em;
    --bs-navbar-padding-y: 0;
}

#navbarCollapse {
    overflow-y: auto !important;
    max-height: 75vh !important;
    padding-left: 5px;
    padding-right: 5px;
}
@media (orientation: portrait){
    #navbarCollapse {
        padding-left: 10px;

    }
}
@media (orientation: landscape) {
    nav.navbar {
        /*--bs-navbar-padding-x: 3em;*/
    }
    #navbarCollapse {
        padding-left: 10px;
    }
}

/* JAVASCRIPT */
@media (scripting: enabled) {
    .NO-JS {
    display: none;
    }
}
@media (scripting: none) {
    .JS {
        display: none;
    }
}

/* HTML: <div class="loader"></div> */ 
#loaderbg {
    display: none;
    height: 100vh;
    width: 100vw;
    background-color: darkslategrey;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1;
}
#loader {
    height: 4px;
    width: 130px;
    --c:no-repeat linear-gradient(#6100ee 0 0);
    background: var(--c),var(--c),#d7b8fc;
    background-size: 60% 100%;
    animation: l16 3s infinite;

    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
}
@keyframes l16 {
    0%   {background-position:-150% 0,-150% 0}
    66%  {background-position: 250% 0,-150% 0}
    100% {background-position: 250% 0, 250% 0}
}
html {
    height: -webkit-fill-available;
}
body {
    height: -webkit-fill-available;
    margin-top: 55px;
    margin-bottom: 5px;
}
main {
    text-align: center;
    height: 100%;
    width: 100%;
}
header {
    /*margin-bottom: 55px;*/
}
#container {
    padding-bottom: 1vh;
}


/* ONLINE / OFFLINE */
:root {
    --online: unset;
    --offline: none; 
}
.OnLine {
    display: var(--online, revert);
}
.OffLine {
    display: var(--offline, revert);
}

a[href^="https://"],
a[href^="/ajax/"] {
    pointer-events: var(--online, revert);
    cursor: var(--online, revert);
    text-decoration: var(--online, revert);
}

/* LOGIN */
.logon-container {
    max-width: 400px;
    margin: auto;
}

.logon-formcontrol {
    display: block;
}

ul.AgreementList li {
    margin-bottom: 15px;
}
form {
    margin-block-end: 0;
}

/*
* {
  box-sizing: border-box;
}
*/

/* SPACER ROWS */
table.FixHead {
    overflow: auto;
    height: 100px;

    thead th {
        position: sticky;
        top: 0;
        z-index: 1;        
    }
    tbody th {
        position: sticky;
        left: 0;
        z-index: 2;
    }

    border-collapse: collapse;
    box-shadow: inset 1px -1px #000;
    td {
        box-shadow: inset 1px -1px #000;
    }
    th {
        box-shadow: inset 1px 1px #000, 0 1px #000;
    }

}

table tr.StickyOnTop {
    top: 40px;
    position: sticky;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.4);
    background-color: #36454F !important;
    z-index: 27;
    white-space: nowrap;
}

table tr.SpacerRow {
    border-bottom: solid;
    border-bottom-width: 30px;
    border-bottom-style: solid;
}

table tr.SpacerRow2 {
    border-bottom: solid;
    border-bottom-width: 30px;
    border-bottom-style: double;
}

/* DARK THEME */
@media screen and (prefers-color-scheme: dark) {
    .table {
        --bs-table-bg: darkgrey;
    }

    body,
    #Table,
    input,
    select {
        /*
        background-color: #36454F;
        color: #4682B4;
        */
        opacity: .86;
        background-color: grey;
    }

    .navbar,
    .navbar-dark,
    .navbar-brand {
        color: #4682B4;
    }

    /*
    img {
        opacity: .75;
        transition: opacity .5s ease-in-out;
    }

    img:hover {
        opacity: 1;
    }

    html {
        --text-color-normal: black;
        --text-color-light: dimgrey;
    }


    html[data-theme='dark'] {
        --text-color-normal: hsl(210, 10%, 62%);
        --text-color-light: hsl(210, 15%, 35%);
        --text-color-richer: hsl(210, 50%, 72%);
        --text-color-highlight: hsl(25, 70%, 45%);
    }
    */
}

/* Loader */
.loader {
    position: fixed;
    left: 50%;
    top: 50%;
    z-index: 1;

    width: 120px;
    height: 120px;

    margin: -76px 0 0 -76px;

    border: 16px solid #f3f3f3;
    /* Light grey */
    border-top: 16px solid blue;
    border-right: 16px solid green;
    border-bottom: 16px solid red;
    border-left: 16px solid pink;
    border-radius: 50%;

    -webkit-animation: spin 2s linear infinite;
    animation: spin 2s linear infinite;

    background-color: mediumaquamarine;
}
@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
    }

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

    100% {
        transform: rotate(360deg);
    }
}

/* Table Cell Gradient */
/* START CELL GRADIENT STYLES
    gradient-start: bottom
    gradient-end: right
    gradient-from (color1)
    gradient-to (color2)
*/
table td[style~='--gradient-from'][style~='--gradient-to'] {
    background: linear-gradient(to var(--gradient-start, bottom) var(--gradient-end, right), var(--gradient-from) 49.5%, var(--gradient-to) 50.5%);
}


/* START TOOLTIP STYLES */
[tooltip]:not([tooltip=""]) {
    position: relative;
    /* opinion 1 */
    cursor: help;

}

/* Applies to all tooltips */
[tooltip]::before,
[tooltip]::after {
    text-transform: none;
    /* opinion 2 */
    font-size: .9em;
    /* opinion 3 */
    line-height: 1.1;
    user-select: none;
    pointer-events: none;
    position: absolute;
    display: none;
    opacity: 0;
}

[tooltip]::before {
    content: '';
    border: 5px solid transparent;
    /* opinion 4 */
    z-index: 2001;
    /* absurdity 1 */
}

[tooltip]:not([tooltip=""])::after {
    content: attr(tooltip);
    /* magic! */

    /* most of the rest of this is opinion */
    font-family: Helvetica, sans-serif;
    text-align: center;

    /*
Let the content set the size of the tooltips
but this will also keep them from being obnoxious
*/
    min-width: 3em;
    max-width: 27em;
    white-space: pre;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 1ch 1.5ch;
    border-radius: .3ch;
    box-shadow: 0 1em 2em -.5em rgba(0, 0, 0, 0.35);
    background: #333;
    color: #fff;
    z-index: 2000;
    /* absurdity 2 */
}

/* Make the tooltips respond to hover */
[tooltip]:hover::before,
[tooltip]:hover::after {
    display: block;
}

/* don't show empty tooltips */
[tooltip='']::before,
[tooltip='']::after {
    display: none !important;
}

/* FLOW: UP */
[tooltip]:not([flow])::before,
[tooltip][flow^="up"]::before {
    bottom: 100%;
    border-bottom-width: 0;
    border-top-color: #333;
}

[tooltip]:not([flow])::after,
[tooltip][flow^="up"]::after {
    bottom: calc(100% + 5px);
}

[tooltip]:not([flow])::before,
[tooltip]:not([flow])::after,
[tooltip][flow^="up"]::before,
[tooltip][flow^="up"]::after {
    left: 50%;
    transform: translate(-50%, -.5em);
}

/* FLOW: DOWN */
[tooltip][flow^="down"]::before {
    top: 100%;
    border-top-width: 0;
    border-bottom-color: #333;
}

[tooltip][flow^="down"]::after {
    top: calc(100% + 5px);
}

[tooltip][flow^="down"]::before,
[tooltip][flow^="down"]::after {
    left: 50%;
    transform: translate(-50%, .5em);
}

/* FLOW: LEFT */
[tooltip][flow^="left"]::before {
    top: 50%;
    border-right-width: 0;
    border-left-color: #333;
    left: calc(0em - 5px);
    transform: translate(-.5em, -50%);
}

[tooltip][flow^="left"]::after {
    top: 50%;
    right: calc(100% + 5px);
    transform: translate(-.5em, -50%);
}

/* FLOW: RIGHT */
[tooltip][flow^="right"]::before {
    top: 50%;
    border-left-width: 0;
    border-right-color: #333;
    right: calc(0em - 5px);
    transform: translate(.5em, -50%);
}

[tooltip][flow^="right"]::after {
    top: 50%;
    left: calc(100% + 5px);
    transform: translate(.5em, -50%);
}

/* TEXTFLOW: */
[tooltip][textflow="left"]::after {
    text-align: left;
}

/* KEYFRAMES */
@keyframes tooltips-vert {
    to {
        opacity: .9;
        transform: translate(-50%, 0);
    }
}

@keyframes tooltips-horz {
    to {
        opacity: .9;
        transform: translate(0, -50%);
    }
}

/* FX All The Things */
[tooltip]:not([flow]):hover::before,
[tooltip]:not([flow]):hover::after,
[tooltip][flow^="up"]:hover::before,
[tooltip][flow^="up"]:hover::after,
[tooltip][flow^="down"]:hover::before,
[tooltip][flow^="down"]:hover::after {
    animation: tooltips-vert 150ms ease-out forwards;
}

[tooltip][flow^="left"]:hover::before,
[tooltip][flow^="left"]:hover::after,
[tooltip][flow^="right"]:hover::before,
[tooltip][flow^="right"]:hover::after {
    animation: tooltips-horz 150ms ease-out forwards;
}