* {
    --svhs-gold: #fcb529;
    --svhs-gold-secondary: darkgoldenrod;
    --svhs-green: #122508;
    --svhs-green-secondary: #0a1403;
    --svhs-green-tertiary: #1a2e05;
    --table-green: #274e13;
    --table-red: #350d09;
    --white-secondary: #dcdcdc;

    --border-width: 3px;
    --border-radius: 7px;
}

html {
    scroll-snap-type: none;
}

body {
    text-align: -webkit-center;
    background-color: var(--svhs-green-secondary);
    overflow-x: hidden;
}

/* ----------------- top bar ----------------- */

#topNav {
    height: min-content;
    display: block;
    align-content: center;
    background: linear-gradient(
        0.26turn,
        var(--svhs-green),
        #042618 12.5%,
        #0f1f06 31.4%,
        #2340089e 57.5%,
        #8f9d002b 85.3%,
        var(--svhs-green) 106%,
        var(--svhs-green)
    );
    border-bottom: var(--border-width) solid var(--svhs-gold);
    font-weight: 350;
    color: var(--svhs-gold);
    text-align: center;
    font-size: 1.98em;
    text-wrap: auto;
    line-height: 1.09em;
    padding-inline: 0.8em;
    padding-bottom: 0.27em;
    padding-top: 0.12em;
}

.mainNav {
    height: 48px;
    position: sticky;
    align-content: end;
    transform: rotate(180deg);
    z-index: 5;
}

.mainNavWithin {
    display: flex;
    width: 100vw;
    height: -webkit-fill-available;
    overflow-x: auto;
    overflow-y: hidden;
    background: transparent;
    border: none;
    transform: rotate(180deg);
}

nav {
    top: 0px;
    box-sizing: border-box;
    padding: 0px;
    font-family: 'Oswald', sans-serif;
    text-wrap: nowrap;
    scroll-snap-align: start;
}

nav * {
    border: var(--border-width) solid var(--white-secondary);
    height: auto;
    flex-shrink: 1;
    flex-basis: 200px;
    background-color: rgb(230,230,230);
    align-content: center;
    font-family: 'Oswald', sans-serif;
    color: var(--svhs-gold);
    text-wrap: nowrap;
}

#currentPage {
    border-color: var(--svhs-gold);
    z-index: 2;
    &:hover {
        z-index: 3;
    }
}

#currentPage div {
    background: var(--svhs-green);
    color: var(--white-secondary);
    font-weight: 450;
}

.mainNavWithin a {
    display: flex;
    flex-wrap: wrap;
    margin: calc(var(--border-width) - 4px);
    margin-top: -1rem;
    height: 3rem;
    width: 144px;
    flex-basis: 144px;
    padding: 0.2rem;
    padding-inline: 0.3rem;
    text-align: center;
    text-wrap: wrap;
    background-color: white;
    font: 17px 'Oswald', sans-serif;
    font-weight: 400;
    color: #000000;
    background: transparent;
    backdrop-filter: blur(5px) brightness(0.6);
    border-width: calc(var(--border-width) - 0px);
    padding-block-start: 0rem;
    border-block-start-width: 0rem;
    border-color: var(--svhs-gold-secondary);
    transition-duration: 0.15s;
}

.mainNavWithin a:first-of-type {
    border-bottom-left-radius: var(--border-radius);
    margin-left: auto;
}

.mainNavWithin a:last-of-type {
    border-bottom-right-radius: var(--border-radius);
    margin-right: auto;
}

.mainNavWithin a:hover, nav a:focus {
    animation: 600ms cubic-bezier(0.445, 0.05, 0.55, 0.95) 0s infinite alternate both running navButton;
    animation-composition: add;
    text-decoration-line: none;
    font-weight: 450;
    border-color: var(--svhs-gold);
    z-index: 3;
}

.mainNavWithin a:hover div, .mainNavWithin a:focus div {
    background: var(--svhs-green-tertiary);
    color: var(--white-secondary);
}

.mainNavWithin div:first-child {
    height: calc(1rem + 1px);
    padding: 0%;
    margin-block-end: -1px;
}

.mainNavWithin div {
    width: -webkit-fill-available;
    height: min-content;
    color: black;
    background: var(--white-secondary);
    padding-inline: 0.3rem;
    padding-block-end: 0.15rem;
    border: none;
}

.mainNavWithin a:first-of-type div:last-of-type {
    border-bottom-left-radius: calc(var(--border-radius) - 6px);
}

.mainNavWithin a:last-of-type div:last-of-type {
    border-bottom-right-radius: calc(var(--border-radius) - 6px);
}

@keyframes navButton {
    from {
    }
    to {
        transform: translate(0px, 8px);
    }
}

nav form {
    display: inline-flex;
    flex-shrink: 0.5;
    flex-basis: 400px;
    align-items: stretch;
    margin-left: auto;
    border-bottom-left-radius: 10px;
}

nav form:hover {
    animation: 600ms ease-in-out 0s 1 alternate both running navSearch;
}

@keyframes navSearch {
    from {
    }
    to {
        transform-origin: top right;
        transform: scale(1.2);
    }
}

nav form input[type="search"] {
    flex: 8 0.4 280px;
    margin-top: 2px;
}

/* end of top bar */
/* ----------------- body layers ----------------- */

main {
    margin-top: 10px;
    overflow-x: hidden;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

main.todaysSchedule {
    display: block;
}

main * {
    flex: auto;
}

/* end of body layers */
/* ----------------- tables ----------------- */

table {
    position: relative;
    width: max-content;
    border: var(--border-width) solid var(--svhs-gold-secondary);
    border-radius: var(--border-radius);
    padding: 10px;
    font:
        32px Trebuchet MS,
        sans-serif;
    font-weight: bold;
    color: #ffffff;
    backdrop-filter: blur(5px) brightness(0.6);
}

table * {
    padding: 2px;
}

table.scheduleTable p.tableTitle, table.calendarTable p.tableTitle, table.timerTable p.tableTitle {
    font-family: 'Oswald';
    font-size: 35px;
    letter-spacing: 1px;
    margin-block-start: 0px;
    margin-block-end: 4px;
    white-space: pre-line;
}

div.todaysSchedule {
    width: auto;
}

tr {
    /* background-color: rgb(160 160 160); */
    background-color: rgb(200 200 200);
}

th {
    border: 1px solid rgb(160 160 160);
    text-align: center;
}

td {
    border: 1px solid rgb(160 160 160);
    font-size: 16px;
    color: #000000;
}

/* end of tables */
/* ----------------- schedule ----------------- */

.tableWrapper {
    overflow-x: auto;
    overflow-y: visible;
    margin: 15px;
}

.scheduleTableWrapper {
    width: 472px;
}

table.scheduleTable {
    color: #ffffff;
}

table.scheduleTable td {
    align-items: start;
}

table.scheduleTable td:nth-child(-n+2) {
    padding: 4px;
}

table.scheduleTable thead > tr {
    background-color: var(--table-green);
}
table.scheduleTable tfoot > tr {
    background-color: var(--table-green);
}

.progressCell {
    width: 158px;
}

table.scheduleTable progress {
    border-radius: 0;
    color: rgb(0,0,0);
    background-color: var(--table-green);
    color: #ffffff;
    height: 20px;
}

table.scheduleTable p.flavorContainer {
    margin-top: 0px;
    margin-bottom: 5px;
    font-size: 16px;
}

table.scheduleTable p.scheduleDayDescription {
    width: 22em;
    margin-inline: auto;
    font-style: italic;
    text-wrap: auto;
}

div.countdownUnitContainer {
    display: flex;
    align-content: center;
}

div.countdownUnitContainer span {
    word-break: keep-all;
}

div.countdownUnitTimeContainer {
    flex-shrink: 10;
    flex-grow: 1;
    display: flex;
    width: fit-content;
    min-width: min-content;
}

div.countdownUnit {
    display: flex;
    flex-wrap: wrap;
    padding-inline: 0.2rem;
}

div.countdownUnit span {
    text-align: center;
    flex-wrap: wrap;
    flex-basis: 100%;
    align-items: center;
    &:nth-child(2) {
        font-size: 16px;
    }
}

/* end of main schedule */
/* ----------------- calendar ----------------- */

.calendarTableWrapper {
    width: auto;
}

table.calendarTable thead > tr {
    background-color: var(--table-red);
}

table.calendarTable tbody th {
    font-size: 16px;
    color: #000000;
}

table.calendarTable tbody tr:first-child {
    background-color: #e3e3e3;
}

table.calendarTable td {
    width: 100px;
    height: 100px;
    padding: 4px;
    text-align: left;
    align-content: start;
    text-overflow: ellipsis;
}

table.calendarTable td:hover, table.calendarTable td:focus {
    transition-duration: 0.1s;
    cursor: pointer;
    background-color: var(--svhs-gold) !important;
    border-width: var(--border-width);
    padding-top: calc(4px - var(--border-width));
    padding-left: calc(3px - var(--border-width));
    border-color: var(--svhs-gold-secondary);
    /* border-radius: var(--border-radius); */
}

table.calendarTable td:nth-child(6n+1) {
    background-color: var(--white-secondary);
}

table.calendarTable tBody p {
    margin: 0px;
    font-weight: normal;
    font-size: 15px;
}

table.calendarTable td > br {
    display: block;
    content: "";
}

table.calendarTable p.dayDescription {
    font-size: 13px;
    font-style: italic;
}

table.calendarTable tBody p.dayNum {
    font-size: 16px;
    font-weight: bold;
}

table.calendarTable p.dayPopupHint {
    position: relative;
    height: 6px;
    top: -0.4em;
    padding-block-start: 0px;
    text-align: end;
    font-size: 0.8em;
    font-style: italic;
    font-weight: bold;
    color: var(--svhs-green-secondary);
}

table.calendarTable div.dayPopup {
    position: absolute;
    color: var(--white-secondary);
    font-weight: normal;
    background-color: var(--svhs-green-tertiary);
    /* filter: drop-shadow(0 0 0.25rem #fcb529) drop-shadow(0 0 1.5rem #a6790680) drop-shadow(0 0 9.75rem #634a0940); */
    /* backdrop-filter: blur(0.5px) brightness(0.6) drop-shadow(2px 4px 6px black); */
    filter: drop-shadow(0 0 0.25rem #000000) drop-shadow(0 0 1.5rem #00000080) drop-shadow(0 0 5rem #000000);
    border-width: 3px;
    border-radius: var(--border-radius);
    border-color: var(--svhs-gold-secondary);
    border-collapse: separate;
    border-style: solid;
    padding-block: 0.3em;
    padding-inline: 0.5em;
    z-index: 1;
}

table.calendarTable div.dayPopup hr {
    background-color: var(--svhs-gold-secondary);
    overflow: hidden;
    height: 2px;
    border: none;
    padding: 0px;
    margin-bottom: 3px;
}

button.monthButton, select#monthSelect {
    width: 7.5rem;
    transition-duration: 0.1s;
    transition-timing-function: ease-out;
    font: 13px Trebuchet MS, sans-serif;
    font-weight: bold;
    background: var(--white-secondary);
    border-width: var(--border-width);
    border-radius: calc(var(--border-radius) - 3px);
    border-color: var(--svhs-gold-secondary);
}

select#monthSelect {
    width: 5.5rem;
    padding: 0;
}

button.monthButton:hover, button.monthButton:focus, select#monthSelect:hover, select#monthSelect:focus {
    transition-duration: 0.1s;
    font-weight: bolder;
    background: var(--svhs-green-tertiary);
    border-radius: 0px;
    color: var(--white-secondary);
    cursor: pointer;
    border-radius: calc(var(--border-radius) - 3px);
    border-width: var(--border-width);
    border-color: var(--svhs-gold);
}

button.monthButton:active, select#monthSelect:active {
    transition-duration: 0.1s;
    font-weight: bolder;
    background: var(--svhs-green);
    border-radius: 0px;
    color: var(--white-secondary);
    cursor: pointer;
    border-radius: calc(var(--border-radius) - 3px);
    border-width: var(--border-width);
    border-color: var(--svhs-gold);
}

select#monthSelect option:checked {
    background-color: var(--svhs-gold);
    color: var(--svhs-green-secondary);
    font-weight: bold;
}

/* end of calendar */
/* ----------------- sources ----------------- */

div.sourceBox {
    margin: 1.6rem;
    font: 1em 'Open Sans', sans-serif;
    font-weight: bold;
    text-align: left;
    position: relative;
    /* width: min-content; */
    width: 40%;
    border: var(--border-width) solid var(--svhs-gold-secondary);
    border-radius: var(--border-radius);
    padding: 10px;
    font:
        32px Trebuchet MS,
        sans-serif;
    font-weight: bold;
    color: black;
    backdrop-filter: blur(5px) brightness(0.6);
}

div.sourceBox * {
    text-align: left;
    word-break: break-word;
}

div.sourceBoxInner {
    display: flex;
    flex-wrap: wrap;
    padding: 10px;
    background-color: var(--white-secondary);
    border-width: 1px;
    border-style: solid;
    border-color: rgb(160 160 160);
}

div.sourceBoxText {
    font-family: 'Oswald';
    font-weight: normal;
    display: flex;
    flex-wrap: wrap;
    flex-basis: 100%;
    align-items: center;
    justify-content: center;
    text-align: center;
}
  
div.sourceBoxText * {
    margin-top: 0;
    margin-bottom: 0.5rem;
}
  
div.sourceBoxText .sourceBoxImg {
    max-width: fit-content;
    min-width: 0%;
    max-height: 4rem;
    align-self: center;
    margin-right: 0.8rem;
}
  
div.sourceBox a.sourceBoxTitle {
    background-color: unset;
    width: fit-content;
    height: unset;
    padding-block: 0px;
    margin-bottom: 0.5rem;
    color: rgb(5, 39, 96);
    font-family: 'Oswald';
    font-size: 3rem;
    font-weight: 400;
    line-height: 3rem;
    text-decoration: underline dashed;
    &:hover {
        text-decoration: unset;
        text-decoration: underline dotted;
        color: #15c;
    }
}

div.sourceBox.countdownBox .sourceBoxTitle {
    margin-top: -0.4rem;
}

div.sourceBox p, div.sourceBox a {
    width: fit-content;
    white-space: pre-line;
    color: var(--svhs-green-secondary);
    font-weight: normal;
}

.sourceBoxDescription {
    flex-basis: 100%;
    margin: 0;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}
  
div.sourceBox a.sourceBoxLink {
    color: rgb(5, 39, 96);
    cursor: pointer;
    text-decoration: underline dashed;
    font-size: 1.125rem;
    display: block;
    &:hover {
        text-decoration: unset;
        text-decoration: underline dotted;
        color: #15c;
    }
}

div.sourceBoxRight {
    display: contents;
}

/* end of sources */
/* ----------------- timer ----------------- */

table.timerTable tr:first-of-type {
    background: rgb(1,23,49);
    background: linear-gradient(45deg, rgb(1,23,49) 20%, rgb(21,53,103) 100%);
}

table.timerTable svg {
    padding: 0px;
}

table.timerTable h2 {
    margin: 0px;
    position: relative;
    top: -120px;
    left: 20%;
}

/* end of timer */
/* ----------------- etc ----------------- */

noscript {
    display: block;
    width: 100%;
    color: #ffffff;
    font-family: 'Trebuchet MS', sans-serif;
    font-size: 1.5em;
    line-height: 1.2em;
    background-color: crimson;
    padding-block: 0.5em;
}

h1 {
    color: white;
    background-color: saddlebrown;
    padding-block: 20px;
    font-size: 50px;
}

.spacer {
    visibility: hidden;
}

/* end of etc */
/* ----------------- footer ----------------- */

footer {
    display: inline-flex;
    height: 25px;
    background-color: var(--svhs-green);
    align-items: center;
    padding-inline: 10px;
    justify-content: space-between;
    width: calc(100% - 20px);
    position: fixed;
    transform: translateX(-50%);
    bottom: 0px;
    border-bottom: var(--border-width) solid var(--svhs-gold);
    color: var(--white-secondary);
    z-index: 10;
}

footer p {
    font-family: 'Trebuchet MS', sans-serif;
    text-wrap: nowrap;
    flex: none;
}

.qr-button {
    border-radius: 0px;
    border-width: 0px;
    background-color: var(--svhs-green) !important;
    color: #ffffff;
    /* background-color: rgba(0, 0, 0, 0); */
    bottom: 0px;
}

.qr-button:hover .qr-button:focus {
    border-width: 10px;
    outline-width: 10px;
    background-color: red;
}

.qr-button::selection {
    background: greenyellow;
    fill: plum;
}

.popup .popuptext {
    visibility: hidden;
    width: 160px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px 0;
    position: absolute;
    z-index: 2;
    bottom: 125%;
    left: 50%;
    margin-left: -80px;
}
