/*Generic styles */
:root {
    --prim-color: #607D8B;
    --sec-color: #FFC107;
    --sec-light: #FFEB3B;
    --sec-faint: #FFC10740;
    --prim-faint: #607D8B26;
    --disabled: #F2DCE4;
    --sec-dark: #804E17;
    --toggle-off: slategray;
    --toggle-off-hover: yellowgreen;
    --toggle-on: slateblue;
    --toggle-on-hover: palevioletred;
}
@font-face {
    font-family: foxrun;
    src: url("./foxrun.woff2");
}
body{
    width: 100%;
    height: 100%;
    margin: 0;
    background: url("./back_dots.svg");
    font-family: foxrun;
    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*/
nav{
    text-align: left;
}
input[popovertarget]{
    border: none;
    background: none;
    color: white;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    outline: none;
    padding: 0.5em 1em;
    border-radius: 0.5em;
    width: 100%;
}
input[popovertarget]:hover{
    color: black;
    background-color: var(--sec-color);
}
input[popovertarget='mnu0']{ anchor-name: --ank0; }
input[popovertarget='mnu1']{ anchor-name: --ank1; }
input[popovertarget='mnu2']{ anchor-name: --ank2; }
input[popovertarget='mnu3']{ anchor-name: --ank3; }
input[popovertarget='mnu4']{ anchor-name: --ank4; }
input[popovertarget='mnu5']{ anchor-name: --ank5; }
#mnu0{ left: calc(anchor(--ank0 left) - 0.35em); }
#mnu1{ left: calc(anchor(--ank1 left) - 0.35em); }
#mnu2{ left: calc(anchor(--ank2 left) - 0.35em); }
#mnu3{ left: calc(anchor(--ank3 left) - 0.35em); }
#mnu4{ left: calc(anchor(--ank4 left) - 0.35em); }
#mnu5{ left: calc(anchor(--ank5 left) - 0.35em); }
#mnubtn{
    width: 2em;
    height: 2em;
    margin: 0.5em;
    background-size: cover;
    background-image: url('/static/media/logo.svg');
    background-color: transparent;
}
#mnubtn:hover{
    filter: invert(1);
}
:popover-open{
    inset: unset;
    position: absolute;
    top: 3.7em;
    background-color: var(--prim-color);
    border-radius: 1rem;
    border: 1px solid var(--sec-color);
    filter: drop-shadow(0.2em 0.2em 5px grey);
}
#mnulst:popover-open{
    list-style: none;
    display: flex;
    top: 0.2em;
    left: 3em;
}
#mnulst{
    a{
        color: white;
        user-select: none;
        display: block;
        padding: 0.8em 1em;
        border-radius: 0.5em;
    }
    a:hover{
        color: black;
        background-color: var(--sec-color);
    }
}
@media (min-resolution: 250dpi) {
    input[popovertarget] {
        padding: 0.5em 1em;
    }
    #mnulst:popover-open{
        flex-direction: column;
    }
    #mnu0{ left: 0.2em; }
    #mnu1{ left: 0.2em; }
    #mnu2{ left: 0.2em; }
    #mnu3{ left: 0.2em; }
    #mnu4{ left: 0.2em; }
    #mnu5{ left: 0.2em; }
}

/*Input elements*/
select{
    text-align-last: center;
}
.inputElem{
    width: 100%;
    overflow-y: auto;
    color: grey;
    background-color: var(--prim-faint);
    border-radius: 0.5em;
    border-style: dotted;
    border-color: var(--sec-dark);
    border-width: thin;
    font-family: foxrun;
    font-size: 100%;
    text-align: center;
}
.inputSmall{
    width: 5em;
    overflow-y: auto;
    color: grey;
    background-color: var(--prim-faint);
    border-radius: 0.5em;
    border-style: dotted;
    border-color: var(--sec-dark);
    border-width: thin;
    font-family: foxrun;
    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: foxrun;
    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{
    width: calc(100% - 3em);
    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-faint);
}

/*Checkbox style*/
label{
    display: inline-block;
    text-align: center;
}
input[type=checkbox]{
    display:none;
}
input[type=checkbox] + span{
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-left: 0.3em;
	margin-right: 0.3em;
	background-image: url("./checkbox.svg");
	background-size: cover;
	cursor: pointer;
	font-size: inherit;
}
input[type=checkbox]:hover + span{
	filter: invert(1);
}
input[type=checkbox]:checked:hover + span{
	filter: invert(1);
}
input[type=checkbox]:checked + span{
	background-image: url("./checkbox_checked.svg");
}
input[type=checkbox]:disabled + span{
    background-color: var(--disabled);
	cursor: default;
}


/*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:after {
  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'] {
  display : 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:after {
  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;
}

/*News Card containing link text and image*/
.news {
    display: grid;
    grid-template-columns: auto auto auto;
    gap: 4em 2em;
    padding: 1em;
    position: relative;
    a{
        display: flex;
        align-items: center;
        text-align: left;
        user-select: none;
        border-radius: 1em;
        transition: 1s;
    }
    a: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;
    }
}
