@import url('https://fonts.googleapis.com/css?family=Roboto+Slab&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Roboto Slab', serif;
}

body {
    background-color: #2B90D9; /* #2B90D9 or #D9E1E8 */
}


/* Buttons */
.primaryButtons {
    background-color: #D9E1E8;
    color: #2B90D9;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 2px;
    border: none;
    font-size: 24px;
    height: 60px;
}

#startButton {
    width: 200px;
}

.secondaryButtons {
    background-color: #2B90D9;
    color: #D9E1E8;
    border: 1px solid #D9E1E8;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 2px;
}

#highscoresButton {
    display: block; /* block or none */
    height: 40px;
    width: 150px;
    align-self: center;
    font-size: 14px;
}

#submitScoreButton {
    width: 372px;
}

#clearScoreButton {
    font-size: 24px;
    width: 312px;
    height: 60px;
}

#backButton {
    width: 196px;
}


/* Header */
header {
    background-color: #2B90D9;
    height: 82px;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    margin-bottom: 40px;
}

#branding {
    display: none; /* block or none */
    color: #D9E1E8;
    font-size: 40px;
    font-weight: bold;
    align-self: center;
    cursor: pointer;
}

#timer {
    width: 94px;
    height: 94px;
    border-radius: 47px;
    background-color: #282C37;
    border: 1px solid #D9E1E8;
    margin-top: 20px;
    color: #D9E1E8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#time {
    font-size: 36px;
    line-height: 1;
}

#timerLabel {
    font-size: 14px;
    opacity: .6;
}

/* Home */
#home {
    display: block; /* block or none */
    width: 700px;
    height: auto;
    padding: 20px;
    text-align: center;
    color: #D9E1E8;
    margin: 0 auto;
}

.heading {
    font-size: 72px;
    margin-bottom: 40px;
    color: #D9E1E8;
}

.description {
    font-size: 22px;
    margin-bottom: 40px;
}


/* Quiz */
#quiz {
    display: none; /* block or none */
    background-color: #fff;
    width: 760px;
    margin: 0 auto;
    border-radius: 4px;
    box-shadow: 0 3px 6px rgb(0, 0, 0, .16);
}

.questionWrapper {
    display: flex;
    padding: 20px 30px 40px 30px;
}

.quizNumWrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-right: 30px;
    width: 54px;
    height: 54px;
    border: 1px solid rgb(40, 44, 55, .4);
    border-radius: 4px;
}

.quizNum {
    font-size: 28px;
    color: #282C37;
    line-height: 1;
}

.quizNumTotal {
    font-size: 14px;
    color: rgb(40, 44, 55, .6);
}

.quizQuestion {
    font-size: 24px;
    color: #282C37;
    align-self: center;
    width: 80%;
}

.quizAnswerChoices {
    display: flex;
    flex-wrap: wrap;
    padding: 0 30px 20px 30px;
}

.quizAnswerChoices li {
    list-style: none;
}

.quizAnswerChoice {
    height: 80px;
    width: 330px;
    border: 1px solid rgb(40, 44, 55, .4);
    border-radius: 4px;
    margin-right: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    padding: 20px;
    font-size: 18px;
    cursor: pointer;
}

.quizAnswerChoice:hover {
    border: 1px solid #2B90D9;
    background-color: #D9E1E8;
}

.quizAnswerChoices span {
    pointer-events: none;
}

.quizAnswerLetter {
    height: 32px;
    width: 32px;
    background-color: #D9E1E8;
    border: 1px solid rgb(40, 44, 55, .4);
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgb(40, 44, 55, .6);
    margin-right: 20px;
}

.quizAnswerChoice:hover .quizAnswerLetter {
    background-color: #2B90D9;
    border: 1px solid #2B90D9;
    color: #D9E1E8;
}

.quizAnswerText {
    color: #282C37;
}

.quizFeedback {
    min-width: 250px;
    background-color: #282C37;
    padding: 0 30px;
    height: 80px;
    visibility: hidden;
    display: none;
    align-items: center;
    position: fixed;
    bottom: 30px;
    left: 50%;
    margin-left: -125px;
    border-radius: 4px;
}

.quizFeedback.show {
    visibility: visible;
    display: flex;
    -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

/* Animations to fade the quizFeedback snackbar in and out */
@-webkit-keyframes fadein {
    from {bottom: 0; opacity: 0;}
    to {bottom: 30px; opacity: 1;}
}

@keyframes fadein {
from {bottom: 0; opacity: 0;}
to {bottom: 30px; opacity: 1;}
}

@-webkit-keyframes fadeout {
from {bottom: 30px; opacity: 1;}
to {bottom: 0; opacity: 0;}
}

@keyframes fadeout {
from {bottom: 30px; opacity: 1;}
to {bottom: 0; opacity: 0;}
}

.quizFeedbackIcon {
    font-size: 22px;
    color: #D86262; /* #D86262 or #62D872 */
    margin-right: 20px;
}

.quizFeedbackText {
    font-size: 22px;
    font-style: italic;
    color: #D86262; /* #D86262 or #62D872 */
}


/* Done */
#done {
    display: none; /* flex or none */
    flex-direction: column;
    align-items: center;
    width: auto;
    margin: 0 auto;
}

#scoreSubmitWrapper {
    display: flex;
}

#scoreWrapper {
    width: 170px;
    height: 154px;
    border: 1px solid #D9E1E8;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #D9E1E8;
    margin-right: 40px;
}

#scoreLabel {
    font-size: 22px;
}

#score {
    font-size: 100px;
    line-height: .85;
}

#userName {
    height: 60px;
    padding-left: 20px;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    border: none;
    border-bottom: 1px solid #D9E1E8;
    background-color: rgb(217, 225, 232, 0.3);
    font-size: 22px;
    color: #D9E1E8;
}

#userName::placeholder {
    color: #D9E1E8;
    opacity: 0.6;
}

#userName:focus, #userName:hover {
    background-color: rgb(217, 225, 232, 0.1);
    border-bottom: 2px solid #D9E1E8;
}

#userName:disabled {
    background: black;
}

#scoreSubmitForm {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}


/* Highscores */
#highscores {
    display: none; /* flex or none */
    flex-direction: column;
    align-items: center;
}

#highscoresWrapper {
    width: 600px;
    border: 1px solid #D9E1E8;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 30px;
}

.highscoresLabels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: rgb(217, 225, 232, 0.6);
    margin-bottom: 12px;
    padding: 0 18px;
}

#scoreList {
    display: flex;
    flex-direction: column;
}

#scoreList li {
    list-style-type: none;
}

.scoreListItem {
    display: flex;
    align-items: center;
    background-color: rgb(217, 225, 232, 0.2);
    height: 60px;
    margin-bottom: 10px;
    padding-left: 20px;
    border-radius: 4px;
}

.placeNumber {
    background-color: #D9E1E8;
    height: 36px;
    width: 36px;
    border-radius: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    color: #2B90D9;
    font-weight: bold;
    margin-right: 20px;
}

.userName {
    font-size: 22px;
    color: #D9E1E8;
    width: 80%;
}

.userScore {
    font-size: 28px;
    font-weight: bold;
    color: #D9E1E8;
    letter-spacing: 2px;
    margin-right: 20px;
}

#highscoresButtons {
    display: flex;
    justify-content: space-around;
    width: 600px;
}



/****** Media Querries ******/

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
    /* Home */
    #home {
        padding: 10px;
    }

    header {
        padding: 0 20px;
    }

    .description {
        font-size: 18px;
    }

    #startButton {
        width: 80%;
    }

    .heading {
        font-size: 60px;
        margin-bottom: 20px;
    }

    /* Quiz */
    #quiz {
        width: 100%;
    }

    .questionWrapper {
        padding: 20px 20px 40px 20px;
    }

    .quizAnswerChoices {
        padding: 0 20px 10px 20px;
    }

    .quizFeedback {
        padding: 0 20px;
    }

    /* Done */
    #scoreSubmitWrapper {
        width: 90%;
    }
    #scoreSubmitForm {
        width: 90%;
    }
    #submitScoreButton {
        width: 100%;
    }

    /* Highscores */
    #highscoresButtons {
        flex-direction: column;
        align-items: center;
        width: 90%;
    }

    #clearScoreButton {
        margin-bottom: 20px;
    }

    #backButton {
        width: 312px;
    }
}

/* Medium devices (landscape tablets, 768px and down) */
@media only screen and (max-width: 768px) {
    /* Home */
    #home {
        width: 100%;
    }

    #branding {
        font-size: 32px;
    }

    /* Quiz */
    #quiz {
        width: 90%;
        margin-bottom: 60px;
    }

    .questionWrapper {
        display: flex;
        padding-bottom: 20px;
    }

    .quizNumWrapper {
        margin-right: 20px;
    }

    .quizQuestion {
        font-size: 18px;
    }

    .quizAnswerChoice {
        width: 100%;
        margin-right: 0;
        margin-bottom: 12px;
    }

    /* Done */
    #scoreSubmitWrapper {
        flex-direction: column;
        align-items: center;
    }

    #scoreWrapper {
        margin-right: 0;
        margin-bottom: 30px;
    }

    #userName {
        margin-bottom: 20px;
    }

    /* Highscores */
    #highscoresWrapper {
        width: 90%;
    }

    #backButton {
        margin-bottom: 60px;
    }

    .scoreListItem {
        padding-left: 12px;
    }
    
    .placeNumber {
        min-width: 36px;
        margin-right: 12px;
    }
}

/* Large devices (laptops/desktops, 992px and down) */
@media only screen and (max-width: 992px) {
    
}

/* Extra large devices (large laptops and desktops, 1200px and down) */
@media only screen and (max-width: 1200px) {
    
}