/*Generic styles */
:root {
    --prim-color: #8cb2b4;
    --prim-light: #deeff7;
    --prim-faint: #f3f9fc;
    --sec-faint: #cecfba70;
    --sec-light: #e6e7dc;
    --sec-color: #cecfba;
    --sec-dark: #3a3a03;
    --accent: beige;
    --disabled: #F2DCE4;
    --toggle-off: slategray;
    --toggle-off-hover: yellowgreen;
    --toggle-on: slateblue;
    --toggle-on-hover: palevioletred;
}
@font-face {
    font-family: novaround;
    src: url("./NovaRound.woff2");
}
body{
    width: 100%;
    height: 100%;
    margin: 0;
    font-family: novaround;
    font-size: 1.5em;
    text-align: center;
}


/*Flex Containers*/
.flexCont{
    text-align: right;
    padding: 2%;
    display: flex;
    flex-flow: row wrap;
    align-items: center;
}
.flexBox{
    flex-basis: 45%;
    margin: 0.5em 2%;
}
.flexBoxSmall{
    flex-basis: 25%;
    margin: 0.5em 2%;
}
.flexBoxLarge{
    flex-basis: 65%;
    margin: 0.5em 2%;
}
@media (min-resolution: 250dpi) {
    .flexCont{
        text-align: left;
		padding: 1%;
        display: flex;
        flex-flow: row wrap;
        align-items: center;
    }
    .flexBox, .flexBoxSmall, .flexBoxLarge{
		flex-basis: 100%;
        margin: 0.5em 2%;
	}
}


/*Navigation Menu Styles*/
#mnubtn{
    width: 3rem;
    height: 3rem;
    margin: 0.5rem;
    background-size: cover;
    background-image: url('/static/media/logo.svg');
    background-color: transparent;
    filter: blur(1px);
    border: none;
    cursor: pointer;
    outline: none;
}
#mnubtn:hover{
    filter: blur(1px) invert(1);
}
:popover-open{
    inset: unset;
    position: absolute;
    left: calc(50% - 5em);
    top: 4em;
}
#mnulst{
    background-color: var(--prim-color);
    border-radius: 1rem;
    border: 1px dashed var(--sec-light);
    filter: drop-shadow(0.2em 0.2em 5px grey);
    user-select: none;
    min-width: 9em;
    a{
        display: block;
        color: white;
        text-decoration: none;
        transition: color .3s linear;
        border-radius: 1em;
        padding: 1em;
    }
    a:hover{
        color: black;
        background-color: var(--sec-color);
        box-shadow: inset 0px -2px 25px 20px var(--prim-color);
    }
    li{
        position: relative;
        list-style: none;
        > ul{
            display: none;
            padding: 0.5em;
            border-radius: 0.5em;
            border: 0.1em dashed var(--accent);
        }
    }
    li:hover{
        > ul{
            display: block;
        }
    }
}


/*Input elements*/
select{
    text-align-last: center;
}
.inputElem{
    width: 100%;
    overflow-y: auto;
    color: grey;
    background-color: var(--prim-light);
    border-radius: 0.5em;
    border-style: dotted;
    border-color: var(--sec-dark);
    border-width: thin;
    font-family: novaround;
    font-size: 100%;
    text-align: center;
}
.inputSmall{
    width: 5em;
    overflow-y: auto;
    color: grey;
    background-color: var(--prim-light);
    border-radius: 0.5em;
    border-style: dotted;
    border-color: var(--sec-dark);
    border-width: thin;
    font-family: novaround;
    font-size: 100%;
    overflow: hidden;
    text-align: center;
    margin: 0.5em;
}
.normalButton {
    color: #FFFFFF;
    background-color: var(--prim-color);
    font-size: 100%;
    border: none;
    transition-duration: 0.5s;
    border-radius: 0.5em;
    font-family: novaround;
    cursor: pointer;
    border-style: dotted;
    border-width: thin;
    margin: 0.5em 1em;
}
.normalButton:hover {
    color: #000000;
    background-color: var(--sec-color);
}
.normalButton:disabled {
    background-color: #ccc;
}
button{
    border: none;
    color: #5c78ab;
    cursor: pointer;
    background: none;
}

/*Flash messages*/
.flash{    
    text-align: center;
    box-shadow: 5px 5px 5px lightgrey;
    border-radius: 1em;
    margin: 1em;
    padding: 0.5em;
    background-color: var(--sec-light);
}
.flash-X{
    text-decoration: none;
    color: firebrick;
    margin-right: 1em;
    float: right;
}

/*Link styles*/
a{
    text-align: center;
	transition-property: color;
    transition-duration: 0.5s;
	text-decoration: none;
    color: #5c78ab;
    cursor: pointer;
}
a:hover{
    color: #a9a973;
}

/*Table style*/
table{
    width: 100%
}
tbody{
    overflow-wrap: anywhere;
}
th{
    background-color: var(--sec-faint);
}
tr:nth-child(even) {
    background-color: var(--prim-light);
}
tr:hover{
    background: var(--accent);
}

/*Checkbox style*/
.chkbox{
    input[type="checkbox"] {
        appearance: none;
        font: inherit;
        width: 1.15em;
        height: 1.15em;
        border: 0.15em solid currentColor;
        border-radius: 0.3em;
        display: inline-grid;
        place-content: center;
    }
    input[type="checkbox"]::before {
        content: "";
        width: 0.65em;
        height: 0.65em;
        transform: scale(0);
        transition: 200ms transform ease-in-out;
        box-shadow: inset 1em 1em var(--toggle-on);
    }
    input[type="checkbox"]:checked::before {
        transform: scale(1);
    }
    input[type="checkbox"]:disabled {
        background-color: var(--disabled);
    }
}

/*Toggle Button Switch*/
.toggle {
    cursor: pointer;
    position : relative ;
    display : inline-block;
    width : 2.55em;
    height : 1.4em;
    background-color: var(--toggle-off);
    border-radius: 1em;
    margin: 0.5em 2%;
}
.toggle:hover{
    background-color: var(--toggle-off-hover);
}
.toggle:before {
    content: 'OFF';
    position: absolute;
    width: 1.8em;
    height: 1.8em;
    border-radius: 50%;
    background-color: white;
    top: 0.1em;
    left: 0.15em;
    transition:  all 0.5s;
    text-align: center;
    line-height: 1.8em;
    font-size: 0.7em;
}
input[type='checkbox']{
    appearance: none;
}
input[type='checkbox']:checked + .toggle {
    background-color: var(--toggle-on);
}
input[type='checkbox']:checked + .toggle:hover {
    background-color: var(--toggle-on-hover);
}
input[type='checkbox']:checked + .toggle:before {
    left : 1.7em;
    content: 'ON';
}


/*HTMX Inactive button during AJAX Request*/
.htmx-request{
    z-index:-1;
    background-color:gray;
}


/*Session Timeout popup*/
.seshPopup{
    display: none;
    justify-items: center;
}
.seshPopup > form{
    padding: 1%;
    margin: 1%;
    width: fit-content;
    background: var(--sec-light);
    border-radius: 1em;
}


/*Tab view*/
.tabview{
    position: relative;
    min-height: 5em;
    background: var(--sec-light);
    z-index: 0;
}
.tabview > div > a{
    text-decoration: none;
    float: left;
    padding: 0.5em;
    background: var(--prim-color);
    color: white;
}
.tabview > div > a:hover{
    color: black;
}
.tabview > div > div{
    position: absolute;
    top: 2.5em;
    left: 0;
    bottom: 0;
    right: 0;
    padding: 0.1em 1em;
    background: var(--prim-faint);
    z-index: -2;
    overflow: auto;
}
.tabview > div:not(:target) > a{
    background: var(--sec-color);
}
.tabview > div:target > div{
    z-index: 0;
}
.tabview > hr{
    margin: 0;
    height: 5px;
    border: none;
    background: var(--sec-faint);
    cursor: row-resize;
}
.tabview > hr:hover{
    background: var(--disabled);
}

/*Plain List Menu made up of individual input buttons*/
.listMenu{
    font-family: novaround;
    text-align-last: left;
    input {
        width: 100%;
        color: var(--sec-dark);
        background-color: var(--prim-faint);
        font-size: 100%;
        border: none;
        transition-duration: 0.5s;
        cursor: pointer;
        padding: 0.5em 1em;
    }
    input:hover {
        color: var(--prim-color);
        background-color: var(--accent);
    }
    input:disabled{
        background-color: var(--disabled);
    }
}

/*News Card containing text and image*/
.news {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 4em 2em;
    padding: 1em;
    position: relative;
    div{
        display: flex;
        align-items: center;
        text-align: left;
        user-select: none;
        border-radius: 1em;
        transition: 1s;
    }
    div:hover{
        color: white;
        background: var(--prim-color);
        filter: sepia(1) drop-shadow(4px 4px 6px var(--sec-dark));
        img{
            filter: none;
        }
    }
    img{
        width: 10em;
        float:left;
        border-radius: 1em;
        filter: sepia(1) drop-shadow(4px 4px 6px var(--sec-dark));
        margin-right: 1em;
        transition: 0.5s;
    }
}
