/*********************/

/****** QUIZ ******/

#quiz {
  z-index: 90;
  position: fixed;
  top: 0px;
  left: 0px;
  bottom: 0px;
  right: 0px;
  /* padding: 0 var(--HD12px) var(--HD12px) var(--HD12px); */
  overflow: auto;
  text-align: center;
  --correct-color: rgba(26, 191, 28, 0.9);
  --incorrect-color: rgba(255, 23, 23, 0.9);
}

#quizIndicator {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15px, 1fr));
  height: var(--HD21px);
}

.quizIndicatorItem {
  height: var(--HD12px);
  float: left;
  list-style: none;
  margin: 0px 5px;
  opacity: 0.3;
  background: var(--element-background-color);
  -webkit-transition: height 0.4s;
  /* Safari */
  transition: height 0.4s;
}

.quizIndicatorItem.active {
  opacity: 1;
}

.quizIndicatorItem.inFocus {
  opacity: 1;
  height: var(--HD21px);
}

#quiz .content {
  position: fixed;
  top: 0px;
  left: 0px;
  bottom: 0px;
  right: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quizQuestion {
  top: 0px;
  left: 0px;
  display: none;
  align-items: flex-start;
  justify-items: center;
  grid-template-rows: auto auto;
  width: 80%;
  min-height: 50%;
}

.quizQuestion.active {
  display: grid;
}

.quizQuestion .questionArea {
  color: var(--background-text-color);
  font-size: var(--HD60px);
  margin: .6em 0 .6em 0;
  padding: 0 10%;
}

.quizQuestion .questionArea .questionNo {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: var(--HD12px);
}

.quizQuestion .questionArea .questionText.smaller {
  font-size: var(--HD45px);
}

.quizQuestion #answerArea {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 85%;
  grid-gap: var(--HD36px);
  margin-bottom: var(--HD60px);
}

.quizQuestion #answerArea .answer {
  font-size: var(--HD30px);
  padding: var(--HD18px);
  text-align: left;
  border: 3px solid;
  box-shadow: 0px 0px 0px;
  display: grid;
  grid-template-columns: var(--HD45px) auto;
}

.quizQuestion #answerArea .answer .answerLetter {
  /* float: left; */
  width: var(--HD45px);
  height: var(--HD45px);
  text-align: center;
  /* color: #fff; */
  border-radius: var(--HD120px);
  font-size: 50%;
  font-weight: bold;
  display: grid;
  align-items: center;
  text-transform: uppercase;
  margin-right: var(--HD24px);
}

.quizQuestion #answerArea .answer .ansverText {
  /* align-self: center; */
  padding: 0.14em 0 0 var(--HD18px);
}

.quizQuestion #answerArea .answer.chosen {
  border-color: #fff !important;
}

.quizQuestion #answerArea .answer.correct {
  /* border-color: #1abf1c !important; */
  animation: animateGreenGlow 1s infinite;
}

.quizQuestion #answerArea .answer.incorrect {
  /* border-color: #ff0000 !important; */
  animation: animateRedGlow 1s infinite;
}

#resultScreenArea {
  position: fixed;
  top: 0px;
  left: 0px;
  width: 100%;
  height: 90%;
  padding: var(--HD21px) var(--HD12px) 0 var(--HD12px);
  display: grid;
  align-items: center;
  justify-items: center;
}

#resultScreen {
  background-color: #fff;
  padding: 30px 50px;
  text-align: center;
  min-width: 400px;
  width: 40%;
  margin: 0 auto;
}

#resultScreen .answerProcent {
  font-size: var(--HD90px);
  margin-bottom: var(--HD15px);
}

#resultScreen h2 {
  text-transform: uppercase;
  font-size: var(--HD21px);
  margin-bottom: 60px;
}

#resultScreen h4 {
  font-weight: normal;
  font-size: var(--HD45px);
  margin-bottom: var(--HD60px);
  letter-spacing: 1.3px;
}

#resultScreen .goBack {
  padding: 20px 30px;
  margin: 20px 0;
  font-size: var(--HD36px);
}

#resultScreen .tryAgain {
  font-size: var(--HD24px);
  height: var(--HD75px);
  display:flex;
  align-items: center;
  justify-content: center;
}

/* HANDLES THE PORTRAIT MODE */

.portraitmode .quizQuestion .questionArea {
  padding: 0;
}

.portraitmode .quizQuestion #answerArea {
  grid-template-columns: 1fr;
}

.portraitmode #resultScreen {
  width: 60%;
}

.portraitmode #resultScreenArea {
  top: 10%;
  height: 80%;
}

@media (max-width: 900px) {
  #quiz {
    top: 50px;
  }
  .quizQuestion {
    margin-top: 50px;
  }
  .portraitmode .quizQuestion {
    height: calc(100%-50px);
  }
}

/* ANIMATION KEYFRAMES */

@keyframes animateRedGlow {
  0% {
    box-shadow: 0 0 10px 0px var(--incorrect-color);
  }
  50% {
    box-shadow: 0 0 10px 10px var(--incorrect-color);
    /* background:  rgb(255, 23, 23) */
  }
  100% {
    box-shadow: 0 0 10px 0px var(--incorrect-color);
  }
}

@keyframes animateGreenGlow {
  0% {
    box-shadow: 0 0 10px 0px var(--correct-color);
  }
  50% {
    box-shadow: 0 0 10px 10px var(--correct-color);
    /* background:  rgb(26, 191, 28); */
  }
  100% {
    box-shadow: 0 0 10px 0px var(--correct-color);
  }
}