/*
 * QUIZ
*/

#quiz-content-outside {
  position: relative;
}

/* Quiz Header */
.quiz-header {
  margin-bottom: 10px;
  padding-top: 20px;
}

.quiz-header-heading {
  margin-top: 0;
}

.quiz-description {
  font-size: 14px;
}

/* Progress Bar */
#progress_bar_container {
  position: relative;
  margin-top: 30px;
  width: 100%;
  height: 26px;
  background: #999;
  clear: both;
}


#progress_bar {
  width: 0;
  height: 26px;
  background: #850f0f;
}

.progress-bar-counter {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  display: inline-block;
  margin-left: -5em;
  width: 10em;
  height: 26px;
  line-height: 26px;
  text-align: center;
  color: #fff;
}

/* Quiz Question Display */

.quiz-question {
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: normal;
}

.quiz-question:before {
  display: inline-block;
  position: relative;
  content: "Q:";
  font-size: 1.1em;
  font-weight: bold;
  color: #850f0f;
}

.quiz-question-media {
  margin: 0 auto 10px;
  max-width: 885px;
}

.quiz-question-media img {
  max-width: 100%;
  height: auto;
}

.quiz-question-intro .quiz-question {
  display: none;
}

/* Answer Selection */
.quiz-answers {
  margin: 0 0 10px; /* Add 10px to the 20px already added by LI items */
  padding: 0;
  list-style: none;
}

.quiz-answer {
  margin-bottom: 10px;
}

.quiz-answer-field {
  display: none;
}

.quiz-answer-button {
  display: block;
  position: relative;
  margin-bottom: 0;
  padding: .5em 2.75em;
  border: 2px solid #ddd;
  border-bottom: 4px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
  text-align: center;

  -webkit-transition: background-color .35s ease-out;
  -moz-transition: background-color .35s ease-out;
  -o-transition: background-color .35s ease-out;
  transition: background-color .35s ease-out;
}

.quiz-answer-button:hover {
  background-color: #efefef;
}

.quiz-answer-button:before {
  position: absolute;
  top: 50%;
  left: .5em;

  margin-top: -10px;

  height: 20px;
  width: 20px;

  font-family: 'Glyphicons Halflings';
  font-size: 1.3em;
  line-height: 1;
  color: #fff;
}

/* Answer Selection States */
.quiz-answer-button[data-answer-correct] {
  border: 2px solid #009a3d;
  border-bottom: 4px solid #00752F;
  background-color: #009a3d;
  color: #fff;
}

.quiz-answer-button[data-answer-correct]:before {
  display: inline-block;
  content: "✔"
}

.quiz-answer-button[data-answer-incorrect] {
  border: 2px solid #850f0f;
  border-bottom: 4px solid #400606;
  background-color: #850f0f;
  color: #fff;
}

.quiz-answer-button[data-answer-incorrect]:before {
  display: inline-block;
  content: "✘"
}

/* Buttons are no longer clickable after an answer */
.quiz-answer-button[disabled] {
  pointer-events: none;
}

/* Answer Displays Colors */
.answer-displays {
  display: none;
  margin: 0 40px 20px;
  border-bottom: 5px solid;
  font-size: 1.5em;
  font-weight: bold;
}

.answer-displays-correct {
  color: #009a3d;
}

.answer-displays-incorrect {
  color: #850f0f;
}

/* Ad Display */
/* NOTE: Ensure that ID name matches what's in quiz.js.
  Class not used to avoid blockers. */
.quiz-question-content [id*="gpt-ad-quiz"] {
  margin-bottom: 30px;
  text-align: center;
}

/* Questions Footer */
.quiz-footer,
.quiz-next-steps {
  padding-top: 20px;
  padding-bottom: 20px;
  border-top: 2px solid #ccc;
  text-align: center;
}

.quiz-footer {
  visibility: hidden;
}

.quiz-footer.visible {
  visibility: visible;
}

.quiz-next-button {
  display: inline-block;
  padding: .8em 1.5em;
  background: #015fb6;
  font-size: 1.3em;
  font-weight: bold;
  color: #fff;
}

.quiz-next-button:hover,
.quiz-next-button:focus,
.quiz-next-button:active {
  text-decoration: none;
  color: #fff;
}

@media screen and (min-width: 500px) {
  .quiz-footer {
    text-align: right;
  }

  .answer-displays {
    margin-bottom: 0;
    margin-right: 40px;
  }

  .answer-display.visible {
    display: inline-block;
  }
}

@media screen and (min-width: 680px) {
  #progress_bar_container {
    margin-top: 20px;
  }

  .quiz-question {
    margin-bottom: 20px;
    font-size: 28px;
  }

  .quiz-answer {
    display: inline-block;
    margin-bottom: 12px;
    width: calc(50% - 10px);
    vertical-align: top;
  }

  .quiz-answer:nth-child(2n + 2) {
	/* Not 20px, more room for padding */
    margin-left: 16px;
  }

  .quiz-question-intro .quiz-question-media {
    float: left;
    margin-right: 20px;
    width: calc(50% - 10px); /* Match button width */
  }

  .quiz-question-content > .quiz-question {
    display: none;
  }

  .quiz-question-intro .quiz-question {
    display: block;
  }
}

@media screen and (min-width: 768px) {
  .quiz-header-heading {
    float: left;
    width: 55%;
  }

  .quiz-description {
    float: right;
    width: 40%;
    font-size: 16px;
  }
}


/*
 * QUIZ RESULTS
*/

.quiz-header.with-border {
  padding-bottom: 20px;
  border-bottom: 2px solid #ccc;
}

.quiz-results-breakdown,
.quiz-sharing {
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 550px;
}

.quiz-results-breakdown {
  margin-bottom: 20px;
  text-align: center;
  color: #fff;
}

.quiz-results-heading,
.quiz-results-breakdown-line{
  margin: 0;
}

.quiz-results-heading {
  padding: 20px;
  font-size: 3em;
  color: #3e3e3e;
}

.quiz-results-breakdown-line {
  position: relative;
  display: inline-block;
  padding: .75em;
  background: #009a3d;
  font-weight: normal;
  color: #fff;
}

.quiz-results-breakdown-line:before,
.quiz-results-breakdown-line:after {
  display: block;

  position: absolute;
  top: -1em;
  z-index: 0;

  border-style: solid;
  content: "";
}

.quiz-results-breakdown-line:before {
  left: 0;
  border-width: 0 0 24px 28px;
  border-color: transparent transparent #00752F transparent;
}

.quiz-results-breakdown-line:after {
  right: 0;
  border-width: 24px 0 0 28px;
  border-color: transparent transparent transparent #00752F;
}

.quiz-results-breakdown-line.no-ribbon:before,
.quiz-results-breakdown-line.no-ribbon:after {
  display: none;
}

.quiz-results-photo img {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 42px);
  height: auto;
}

.quiz-results-tally {
  display: inline-block;
  white-space: nowrap;
}

.quiz-sharing {
  text-align: center;
}

.quiz-next-steps {
  text-align: center;
}

.quiz-next-steps .quiz-next-button {
  margin: 0 20px 20px;
}

@media screen and (min-width: 500px) {
  .quiz-results-breakdown-line {
    padding: 1em 1.5em;
  }
}
