:root {
    --primary-color: #42b9ec;
    --secondary-color: #000000;
    --tertiary-color: #909090;
    --hover-color: #3eaddd;
    --header-color: #aaaaaa;
    --link-size: 10px;
    --border-radius: 5px;
    --main-font-size: 21px;
    --button-font-size: 22px;
    --button-height: 45.6px;
    --module-gap: 15px;
    --header-height: 68px;
    --sidebar-width: 12em;
    --sidebar-start: calc(var(--header-height) - 2px);
    --animation-time: 0.3s;
    --button-min-width: 75px;
}

input::-ms-reveal, input::-ms-clear {
    display: none;
}

html {
    overflow-y:scroll;
}

/* Adjustments to elements for the main site */
body {
    font-family: Helvetica, sans-serif;
    font-size: var(--main-font-size);
    margin: 0;
    min-height: 100vh;
    width: 100%;
    position: relative;
    box-sizing: border-box;
    display:flex;
    flex-direction: column;
}

textArea {
    font-family: Helvetica, sans-serif;
}


h1, h2, h3, h4, h5, h6 {
    line-height: 1.5em;
    margin: 0;
}

h1 {
    margin-bottom: 30px;
    font-size: 1.75em;
    text-align: center;
}

h2 {
    margin-bottom: 10px;
    font-size: 1.3em;
}

h3 {
    font-size: 1.2em;
}

p, li {
    line-height: 1.75em;
}

li {
    margin-bottom: 10px;
    margin-right: 25px;
}

button {
    font-family: Helvetica, sans-serif;
    height: var(--button-height);
    border-radius: var(--border-radius);
    background-color: var(--primary-color);
    color: var(--secondary-color);
    cursor: pointer;
    border: 1px solid #000000;
    white-space: nowrap;
}

button:hover {
    background-color: var(--hover-color);
}

button:active {
    background-color: var(--primary-color);
}


/* id styles */
#prev, #prev-module {
    position: absolute;
    left: 0;
}

#next, #next-module {
    position: absolute;
    right: 0;
}

#buttons {
    position: relative;
    bottom: 0;
    height: 40px;
    width: 95%;
    margin: 0 auto;
    margin-top: 20px;
    margin-bottom: 20px;
}

#submit-quiz {
    position: relative;
    margin: 0 auto;
    display: block;
    padding-left: 20px;
    padding-right: 20px;
}

#main-page {
    display: grid;
    grid-template-columns: var(--sidebar-width) auto calc(var(--sidebar-width) / 2);
    grid-column-gap: 40px;
    justify-items: center;
    height: 100%;
    margin: 0 auto;
}

#main-admin-content {
    width: 100%;
}

#sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    justify-content: space-between;
    left: 0;
    top: var(--sidebar-start);
    background-color: var(--tertiary-color);
    height: calc(100% - var(--sidebar-start));
    width: var(--sidebar-width);
    overflow-y: auto;
    transition: top var(--animation-time), height var(--animation-time);
    gap: calc(var(--module-gap) * 2);
    z-index: 998;
}

#sidebar-top {
    position: fixed;
    height: var(--header-height);
    width: var(--sidebar-width);
    background-color: var(--tertiary-color);
    z-index: 99;
    top: 0;
    left: 0;
    transition: top var(--animation-time), height var(--animation-time);
}

#sidebar .link {
    width: calc(100% - var(--link-size) * 2);
    text-align: center;
    padding: 10px;
    margin: 0;
}

#modules {
    display: flex;
    flex-direction: column;
    padding-top: calc(var(--module-gap));
    gap: var(--module-gap);
    align-items: center;
}

#other-links {
    display: flex;
    flex-direction: column;
    padding-bottom: calc(var(--module-gap) * 2);
    gap: var(--module-gap);
}

#module-menu {
    display: none;
}

#result {
    text-align: center;
}

#module-menu-side {
    display: none;
}

#status {
    text-align: center;
}

#manager-login {
    display: flex;
    justify-content: center;
    width: calc(100% - var(--sidebar-width));
    padding-left: var(--sidebar-width);
    padding-top: 20px;
    padding-bottom: 20px;
    background-color: var(--header-color);
    margin-top: auto;
}

#admin-login {
    display: flex;
    justify-content: center;
    width: 100%;
    padding-top: 20px;
    padding-bottom: 20px;
    background-color: var(--header-color);
    margin-top: auto;
}

#link-div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 100%;
}

#link-display {
    max-width: 375px;
    font-size: 16px;
    overflow-x: auto;
    background-color: #eaeaea;
    border-radius: var(--border-radius);
}

#success-message-div {
    height: 40px;
}

#item-info {
    background-color: #d4d4d4;
    border: solid 1px #000000;
    border-radius: var(--border-radius);
    padding: 10px;
    margin-top: 20px;
}


/* Class styles */
.content {
    height: 100%;
    width: 100%;
}

.container {
    position: relative;
    width: 65%;
    height: 95%;
    margin: 0 auto;
    box-sizing: border-box;
}

.centered-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
}

.horizontal-center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.select-menu {
    font-size: calc(var(--main-font-size) - 4px);
    width: 50%;
    height: 30px;
}

.module-list-title {
    font-size: calc(var(--main-font-size) * (4/3));
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 5px;
    border-radius: var(--border-radius);
}


/* Header class */
.header {
    display: grid;
    position: fixed;
    top: 0;
    z-index: 999;
    width: 100%;
    grid-template-columns: 1fr auto 1fr;
    grid-column-gap: 10px;
    justify-items: center;
    align-items: center;
    margin-bottom: 10px;
    background-color: var(--header-color);
    transition: top var(--animation-time);
}

.big-header {
    font-size: 2em;
}

.page-margin-top {
    padding-top: calc(var(--header-height) + 10px);
}


/* Button styles */
.button {
    border-radius: var(--border-radius);
    background-color: var(--primary-color);
    color: var(--secondary-color);
    font-size: var(--button-font-size);
    border: none;
    padding: 10px;
    cursor: pointer;
    vertical-align: middle;
    text-align: center;
    min-width: var(--button-min-width);
}

.button:hover {
    background-color: var(--hover-color);
}

.button:active {
    background-color: var(--primary-color);
}

.button:disabled {
    background-color: #bdbdbd;
    cursor: default;
}


/* Link styles */
.link {
    color: var(--secondary-color);
    background-color: var(--primary-color);
    text-decoration: none;
    display: inline-block;
    position: relative;
    z-index: 1;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: var(--button-font-size);
    padding: var(--link-size);
    vertical-align: middle;
    text-align: center;
    min-width: var(--button-min-width);
}

.link:hover {
    background-color: var(--hover-color);
}

.link:active {
    background-color: var(--primary-color);
}

.link.inverted {
    color: var(--primary-color);
    background-color: var(--secondary-color);
    text-decoration: none;
    position: relative;
    z-index: 1;
    padding: var(--link-size);
    margin: calc(var(--link-size) * -1);
}


/* Search bar stylings */
.features {
    display: flex;
    position: relative;
    justify-content: space-around;
    align-items: center;
    width: 90%;
    margin: 0 auto;
}

.search-section {
    width: 60%;
    position: relative;
}

.search-bar {
    font-size: calc(var(--main-font-size) - 3px);
    width: 100%;
    box-sizing: border-box;
    border: 2px solid;
    border-radius: var(--border-radius);
    padding: 7px;
}

.search-results {
    position: absolute;
    display: none;
    flex-direction: column;
    background-color: #f4f4f4;
    width: 100%;
    border-radius: var(--border-radius);
    border: 1px solid #000000;
}

.search-result {
    padding-left: 10px;
    padding-top: 5px;
    padding-bottom: 5px;
}

.search-result:hover {
    background-color: #c4c4c4;
    cursor: pointer;
    border-radius: var(--border-radius);
}

.search-result:active {
    background-color: #a4a4a4;
}

.search-icon {
    font-size: 26px;
    position: absolute;
    right: 5px;
    top: 15%;
    color: #76787d;
}

.no-hover:hover {
    background-color: #f4f4f4;
    cursor: default;
}


/* Email form styls */
.email-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}

.email-form input {
    box-sizing: border-box;
    border: 2px solid;
    border-radius: var(--border-radius);
    padding: 5px;
    font-size: 1em;
    margin-bottom: 5px;
}

.email-form .error-message {
    margin-bottom: 10px;
}


/* Modal and admin styles */
.modal {
    display: flex;
    flex-direction: column;
    justify-content: center; 
    position: fixed;
    padding: 10px;
    width: 350px;
    z-index: 9999;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    background-color: #d4d4d4;
    border-radius: var(--border-radius);
    border: 2px solid #000000;
}

.modal input:not([type="checkbox"]) {
    font-size: calc(var(--main-font-size) - 5px);
    width: 100%;
    box-sizing: border-box;
    border: 2px solid;
    border-radius: var(--border-radius);
    padding: 5px;
}

.modal #company-select {
    font-size: calc(var(--main-font-size) - 5px);
    width: 100%;
    box-sizing: border-box;
    border: 2px solid;
    border-radius: var(--border-radius);
    margin: 0;
}

.disable {
    pointer-events: none;
    overflow: hidden;
}

.blur {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    backdrop-filter: blur(2px);
    z-index: 9999;
}

.module-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    overflow-y: auto;
    max-height: 80vh;
}

.module-list .module {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-radius: var(--border-radius);
    background-color: #ffffff;
    gap: 20px;
}

.modal .toggle-password {
    font-size: 20px;
    position: absolute;
    right: 10px;
    cursor: pointer;
}

.inline {
    display: flex;
    position: relative;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
}

.table-div {
    overflow-x: auto;
    margin-top: 20px;
    margin-bottom: 20px;
}

.table-div button {
    margin-bottom: 20px;
}

.table-div .search-section {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    width: 100%;
}

.search-section .search-input {
    width: auto;
}

.search-section .admin-button {
    margin: 0;
    height: 35px;
}

.table-content {
    width: 100%;
    padding: 10px;
    background-color: #d4d4d4;
    border: solid 1px #000000;
    border-radius: var(--border-radius);
    font-size: 16px;
    border-spacing: 0px;
}

.table-content tr {
    padding: 10px;
    text-align: center;
}

.table-content tr:nth-child(even) {
    background-color: #f4f4f4;
}

.table-content thead {
    background-color: #aaaaaa;
    font-size: 18px;
}

.table-content td {
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 5px;
    padding-bottom: 5px;
    text-align: center;
    white-space: nowrap;
}

.table-body button {
    width: 4em;
    min-width: auto;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 1px solid #000000;
    border-radius: var(--border-radius);
    cursor: pointer;
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.question-label {
    vertical-align: top;
    font-size: 16px;
}

.form-option {
    width: 75%;
    resize: none;
    border: 1px solid #000000;
    border-radius: var(--border-radius);
    padding: 5px;
}

.form-option.longer {
    width: calc(75% + 18px);
}

.number-option {
    border: 1px solid #000000;
    border-radius: var(--border-radius);
    padding: 5px;
}

.actions-cell {
    display: flex;
    justify-content: center;
    gap: 3px;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    justify-items: start;
}

.color-select {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    justify-items: start;
}

.color-select label {
    white-space: nowrap;
}

.color-select .picker-hex {
    display: flex;
    gap: 10px;
}

.section-div {
    width: 90%;
    border: 1px solid #000000;
    border-radius: var(--border-radius);
    padding: 10px;
    margin: 0 auto;
    background-color: #ededed;
}

.section-div .inline {
    margin-bottom: 10px;
}

.right-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.button-right {
    display: block;
    margin-left: auto;
    margin-right: 0;
}

.admin-button {
    min-width: 75px;
}

.admin-select {
    width: 50%;
    height: 30px;
    font-size: 16px;
    margin-bottom: 20px;
}


/* Alert/popup stylings */
.popup {
    text-align: center;    
}

.alert-success {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 20px;
    background-color: #54cc54;
    font-size: 20px;
    padding: 10px;
    margin: 0 auto;
    border-radius: var(--border-radius);
}

.close-button {
    font-size: 26px;
    cursor: pointer;
}

/* Basic catch all stylings */
.centered-text {
    text-align: center;
}

.incorrect {
    color: #ff4646;
}

.correct {
    color: #2ec62e;
}

.second-column {
    grid-column-start: 2;
}

.disabled-text {
    color: #6a6a6b;
}

.no-margin {
    margin: 0;
}

.top-left {
    position: absolute;
    top: 11px;
    left: 20px;
}

.normal-text {
    font-size: 16px;
    font-weight: normal;
}

.header-left {
    text-align: left;
}

.error {
    border-color: rgb(215, 66, 66) !important;
    box-shadow: 0 0 0 0.25rem rgba(215, 66, 66, 0.25);
}

.error:focus {
    border-color: rgb(215, 66, 66) !important;
}

.error-message {
    color: #ff4646;
    font-size: 12px;
    height: 10px;
}

.message-div {
    color: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 16px;
    height: 45px;
    padding: 10px;
    border-radius: var(--border-radius);
    font-size: 14px;
}

.error-color {
    background-color: #ff8282;
}

.success-color {
    background-color: #54cc54;
}

.completed {
    padding-right: 2px;
}

.show {
    display: flex !important; 
}

.hide {
    top: calc(var(--header-height) * -1 ) !important;
}

.hidden {
    display: none !important;
}

.sidebar-up {
    top: 0 !important;
    height: 100% !important;
}

.flex-grouped {
    display: flex;
    gap: 10px;
}


/* Styles for any needed shapes */
.trapezoid {
	border-top: 68px solid var(--primary-color);
	border-left: 5vw solid transparent;
	border-right: 5vw solid transparent;
	width: 50vw;
    height: 0;
}

.check {
    color: #78b13f;
    font-size: calc(var(--button-font-size) + 2px);
}

.error-symbol {
    color: #ff4646;
    font-size: 60px;
    margin-bottom: 30px;
}

.icon-align {
    vertical-align: -20%;
    font-size: var(--button-font-size);
}

.small-text {
    font-size: 13px;
}


/* Styles for the login page */
.outer-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 90vh;
    gap: 20px;
}

.inner-box {
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 25px;
    font-size: 16px;
    width: 20em;
}

.inner-box h1 {
    margin: 0;
    line-height: 1em;
}

.inner-box label {
    white-space: nowrap;
}

.inner-form {
    width: 100%;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5em;
}

.inner-form label {
    display: inline;
}

.inner-form .text-box {
    width: 100%;
    border: 2px solid;
    box-sizing: border-box;
    border-radius: var(--border-radius);
    font-size: 16px;
    padding: 10px;
}

.inner-form .text-box:focus {
    outline: none;
    border-color: rgb(49, 121, 227);
    box-shadow: 0 0 0 0.25rem rgba(49, 73, 227, 0.25);
}

.inner-form .page-change {
    text-decoration: none;
    color: var(--primary-color);
}

.inner-form .page-change:hover {
    cursor: pointer;
    text-decoration: underline;
}

.inner-form .toggle-password {
    font-size: 24px;
    position: absolute;
    right: 10px;
}

.inner-form .toggle-password:hover {
    cursor: pointer;
}

@media screen and (max-width: 1060px) {
    #main-page {
        width: 90%;
        display: block;
    }

    #sidebar {
        display: none;
    }

    #sidebar-top {
        display: none;
    }

    #module-menu-side {
        display: block;
    }

    #manager-login {
        width: 100%;
        padding-left: 0;
    }

    .not-animated {
        transition: none !important;
    }

    .trapezoid {
        border-top: 50px solid var(--primary-color);
        border-left: 50px solid transparent;
        border-right: 50px solid transparent;
        width: 50vw;
        height: 0;
        grid-column-start: span 3;
        grid-row-start: 1;
    }

    .header {
        grid-row-gap: 10px;
        padding-bottom: 10px;
    }

    #module-menu {
        grid-row-start: 2;
        display: block;
    }

    #login-logout {
        grid-column-start: 3;
    }

    #home {
        grid-row-start: 2;
    }

    .container {
        width: 95%;
    }

    .email-form input {
        font-size: initial;
    }

}

@media screen and (max-width: 440px) {
    :root {
        --main-font-size: 16px;
        --button-font-size: 15px;
        --button-height: 38.4px;
    }
    
    .trapezoid {
        border-top: 25px solid var(--primary-color);
        border-left: 25px solid transparent;
        border-right: 25px solid transparent;
        width: 50vw;
        height: 0;
        grid-column-start: span 3;
    }

    .inline-symbol {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-column-gap: 5px;   
    }
    
    .menu-symbol {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-auto-rows: 1fr;
        grid-row-gap: 1px;
    }
    
    .menu-bar {
        width: 20px;
        height: 2px;
        grid-column-start: 1;
        background-color: #ffffff;
    }

    .inner-box {
        width: 90%;
        padding: 0px;
        border: none;
        margin-top: 40px;
    }

    .admin-select {
        width: 85%;
    }

    .features {
        display: grid;
        position: relative;
        justify-items: center;
        grid-template-columns: 1fr;
        width: 90%;
        margin: 0 auto;
        gap: 20px;
    }

    .features #company-div {
        grid-row-start: 2;
        width: 100%;
    }

    #module-menu {
        grid-row-start: 3;
        grid-column-start: span 3;
        display: block;
    }

    #login-logout {
        grid-row-start: 2;
        grid-column-start: span 3;
    }
}