* {
    margin: 0;
    padding: 0;
    font-family: 'NouvelR';
    color: rgb(66, 66, 66);
}

@font-face {
    font-family: "NouvelR";
    src: url(../fonts/NouvelR-Regular.ttf) format("truetype");
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: "NouvelR";
    src: url(../fonts/NouvelR-Light.ttf) format("truetype");
    font-weight: lighter;
    font-style: normal;
}
@font-face {
    font-family: "NouvelR";
    src: url(../fonts/NouvelR-Bold.ttf) format("truetype");
    font-weight: bold;
    font-style: normal;
}


:root {
    --w-pad: max(20px, env(safe-area-inset-left));
    --h-pad: max(20px, env(safe-area-inset-bottom));
}

body {
    background-color: #FFFFFF;
    overflow-x: hidden;
}

a {
    text-decoration: underline;
    cursor: pointer;
}

input[type="text"], input[type="email"], input[type="password"], input[type="submit"] {
    -webkit-appearance: none;
    outline: none;
    border: 1px solid black;
    border-radius: 3px;
}

input[type="submit"] {
    cursor: pointer;
}

#title-bar {
    width: 100vw;
    height: 75px;
    background-color: #000000;
    /* margin-bottom: var(--h-pad); */
    overflow: hidden;
    position: relative;
}

#title-bar img {
    max-height: 100%;
}

h1 {
    position: absolute;
    text-align: right;
    top: calc(75px / 2);
    transform: translate(0, -50%);
    right: 20px;
    font-size: 26px;
    color: white;
    max-width: calc(100vw - 90px);
}

input:required {
    box-shadow: none;
}

.block20px {
    display: block;
    height: 20px;
    width: 20px;
    opacity: 0;
}

.bi-trash, .bi-check-circle, .bi-x-circle {
    height: 100%;
    width: 100%;
}

.bi-check-circle {
    fill: green;
}

#content-grid {
    --column-gap: 0px;
    grid-template-columns: calc(70% - var(--column-gap)) var(--column-gap) 30%;
    grid-template-rows: calc((((100vw - 40px) * 0.7) - var(--column-gap)) / 16 * 9);
    overflow: hidden;
    margin: 75px 20px var(--h-pad) 20px;
    position: relative;
    display: grid;
}

#admin-grid {
    margin: 75px 20px var(--h-pad) 20px;
    grid-template-rows: auto;
    grid-template-columns: calc(50% - 10px) 20px calc(50% - 10px);
    position: relative;
    display: grid;
}

#presenter-grid {
    margin: 20px;
    grid-template-columns: 100%;
    grid-template-rows: calc(100% - 20px) 20px;
    position: relative;
    display: grid;
    height: max(800px, calc(100vh - 115px));
}

#create-users-content {
    grid-area: 1 / 1 / 2 / 2;
    padding: 0 20px 20px 20px;
    background-color: white;
    /* padding: 0 20px 2em 20px; */
}

#create-users-content form {
    display: grid;
    grid-template-rows: 2rem 1rem 2rem 1rem 2rem 1rem 2rem 0.5rem 1rem 0.5rem 2rem;
    grid-template-columns: calc(50% - 10px) 20px calc(50% - 10px);
    margin-top: 20px;
}

#create-users-content form input {
    padding: 0 10px 0 10px;
    box-sizing: border-box;
}

#create-users-content input:nth-of-type(1) {
    grid-area: 1 / 1 / 2 / 2;
}
#create-users-content input:nth-of-type(2) {
    grid-area: 3 / 1 / 4 / 2;
}
#create-users-content input:nth-of-type(3) {
    grid-area: 3 / 3 / 4 / 4;
}
#create-users-content input:nth-of-type(4) {
    grid-area: 5 / 1 / 6 / 2;
}
#create-users-content input:nth-of-type(5) {
    grid-area: 5 / 3 / 6 / 4;
}
#create-users-content div:nth-of-type(1) {
    grid-area: 1 / 3 / 2 / 4;
}
#create-users-content div:nth-of-type(2) {
    grid-area: 9 / 1 / 10 / 2;
}
#create-users-content input[type="submit"] {
    grid-area: 7 / 1 / 8 / 2;
}

#batch-users-file-wrap {
    grid-area: 11 / 1 / 12 / 2;
    /* align-self: center; */
}

#batch-users-file-wrap label, #batch-users-file-wrap input {
    display: block;
}

#export-btns {
    list-style-type: none;
    margin-top: 20px;
}

.export-btn {
    text-decoration: underline;
    cursor: pointer;
}

#create-users-content .create-div-oneline {
    display: flex;
    flex-direction: row;
    align-items: center;
}

#create-users-content .create-div-oneline input {
    margin-right: 0.5em;
}

#create-users-content #signup-errortext {
    color: #BA0C2F;
    grid-area: 7 / 3 / 8 / 4;
    align-self: center;
}

.success-text {
    color: #658D1B !important;
}

#export-users-content {
    grid-area: 1 / 3 / 2 / 4;
    padding: 0 20px 20px 20px;
    background-color: white;
}


#content-grid h2, #admin-grid h2, #login-signup h2 {
    width: calc(100% + 40px);
    height: 56px;
    line-height: 56px;
    background-color: #EFDF00;
    color: black;
    position: relative;
    font-size: 14px;
    padding-left: 20px;
    box-sizing: border-box;
    margin-left: -20px;
}

#video-content {
    grid-area: 1 / 1 / 2 / 2;
    background-color: black;
}

#slido-main-view {
    grid-area: 1 / 2 / 2 / 4;
}

#slido-frame {
    border: 0;
    grid-area: 1 / 1 / 2 / 2;
    height: 100%;
    width: 100%;
}

#vimeo-frame {
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
}

#question-content {
    grid-area: 3 / 1 / 4 / 2;
    background-color: white;
    padding: 0 20px 20px 20px;
}

#resources-content {
    grid-area: 3 / 3 / 4 / 4;
    background-color: white;
    padding: 0 20px 20px 20px;
}

#resources-content table {
    text-align: left;
    width: 100%;
    border-collapse: collapse;
    position: relative;
}

#resources-content thead {
    font-size: 14px;
    line-height: 40px;
    font-weight: bold;
}


#resources-content #table-wrapper {
    height: auto;
    max-height: calc(100% - 75px);
    width: 100%;
    display: block;
    overflow-y: scroll;
}


#resources-content tbody tr:not(:last-child) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
}

#resources-content tbody tr {
    height: 1.75rem;
    font-size: 14px;
    font-weight: 300;
}

#resources-content tbody tr:hover {
    background-color: #e6e6ec;
}

#resources-content tbody tr img {
    position: relative;
    top: 3px;
}

#login-signup {
    width: 500px;
    max-width: calc(100vw - 40px - 2 * var(--w-pad));
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 0 20px 20px 20px;
}

#login-signup form {
    margin-top: 20px;
    display: grid;
    grid-template-rows: 2rem 1rem 2rem;
    grid-template-columns: calc(50% - 10px) 20px calc(50% - 10px);
}

#login-signup #login-errortext {
    color: #BA0C2F;
    align-self: center;
}

#login-signup input {
    box-sizing: border-box;
    padding: 0 10px 0 10px;
}

#login-signup form *:nth-child(1) {
    grid-area: 1 / 1 / 2 / 2;
}
#login-signup form *:nth-child(2) {
    grid-area: 1 / 3 / 2 / 4;
}
#login-signup form *:nth-child(3) {
    grid-area: 3 / 1 / 4 / 2;
    height: 100%;
}
#login-signup form *:nth-child(4) {
    grid-area: 3 / 3 / 4 / 4;
}




#question-content form {
    width: 100%;
    height: calc(100% - 50px);
}

#question-content input[type="text"] {
    width: 100%;
    height: 30px;
    font-size: 16px;
    padding: 0 20px 0 20px;
    box-sizing: border-box;
    position: relative;
    top: 50%;
    transform: translate(0, -50%);
    margin-bottom: 10px;
}

#question-content input[type="submit"] {
    min-width: 100px;
    padding: 0 10px 0 10px;
    height: 30px;
    position: relative;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

#questions-content {
    grid-area: 1 / 1 / 2 / 4;
    background-color: white;
    padding: 0 20px 20px 20px;
    position: relative;
}

#questions-content table {
    margin-top: 10px;
    width: 100%;
/*    border-collapse: collapse;*/
    border-spacing: 0 1px;
}

#questions-content thead td {
    font-weight: bold;
}

#questions-content tbody td {
    word-break: break-word;
    word-wrap: break-word;
    vertical-align: top;
}

#questions-content td {
    box-sizing: border-box;
}

#questions-content tbody tr:not(:last-of-type) td {
    padding-bottom: 10px;
}

#questions-content tbody td:nth-of-type(1) {
    text-align: right;
}

#questions-content td:nth-of-type(1) {
    width: 100px;
    padding-right: 10px;
}
#questions-content td:nth-of-type(2) {
    width: 120px;
    padding-right: 10px;
}
#questions-content td:nth-of-type(3) {
    width: calc(100% - 1px);
    /*
        For some reason setting this to 100% -
        any value makes it stretch to the perfect
        length. No idea why, but hey, it works :)
    */
}
#questions-content td:nth-of-type(4) {
    width: calc(4em + 10px);
    text-align: right;
}

#questions-content td:nth-of-type(4) a {
    height: 2em;
    width: 2em;
    margin-left: 5px;
}

#questions-content #table-wrapper {
    height: auto;
    max-height: calc(100% - 40px - 2em);
    width: 100%;
    display: block;
    overflow-y: scroll;
}

.controls-wrapper {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: row-reverse;
}

#questions-content .question-secondary {
    display: none;
/*    background-color: rgba(0, 255, 0, 0.5);*/
}

#presentation-login-content {
    grid-area: 1 / 1 / 4 / 4;
    background-color: white;
    padding: 0 20px 20px 20px;
}

#presentation-login-content input[type="password"] {
    display: block;
    font-size: 20px;
    padding-left: 10px;
    padding-right: 10px;
    height: 30px;
    width: 200px;
    margin-top: 20px;
    position: relative;
    left: 50%;
    transform: translate(-50%, 0);
}

#presentation-login-content input[type="submit"] {
    margin-top: 20px;
    display: block;
    font-size: 18px;
    padding: 3px 5px 3px 5px;
    position: relative;
    left: 50%;
    transform: translate(-50%, 0);
}

#questions-content {
    grid-area: 3 / 1 / 4 / 4;
}


#logout-btn {
    position: absolute;
    bottom: var(--h-pad);
    left: var(--w-pad);
    overflow: visible;
    font-size: 12px;
}


@media screen and (max-width: 1280px) {

    /* body {
        background-color: red;
    } */

    #content-grid {
        margin: 20px 20px var(--h-pad) 20px;
        justify-content: center;
        grid-template-columns: min(calc(100vw - (2 * var(--w-pad))), 800px);
        grid-template-rows: calc(min(100vw - 40px, 800px) / 16 * 9) var(--w-pad) max(calc((100vw - 40px) / 16 * 9), 500px);
    }

    #video-content {
        grid-area: 1 / 1 / 2 / 2;
    }
    
    #slido-main-view {
        grid-area: 3 / 1 / 4 / 2;
    }

    #admin-grid {
        grid-template-columns: min(calc(100vw - (2 * var(--w-pad))), 800px);
        grid-template-rows: auto var(--w-pad) auto;
        justify-content: center;
    }

    #create-users-content {
        grid-area: 1 / 1 / 2 / 2;
    }

    #export-users-content {
        grid-area: 3 / 1 / 4 / 2;
    }

    #logout-btn {
        bottom: unset;
        left: calc((100vw - min(calc(100vw - (2 * var(--w-pad))), 800px)) / 2)
    }
}