/* Scoped overrides for /tests/ pages. Base look comes from /assets/css/site.css. */
.quiz-test .quiz-panel,
.quiz-test .result-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.quiz-test .player-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.quiz-test .question-image {
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
}

.quiz-test .question-prompt {
  font-size: clamp(1.25rem, 3.5vw, 1.75rem);
  margin: 0;
}

.quiz-test .answer-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.quiz-test .answer-option {
  width: 100%;
  text-align: left;
}

.quiz-test .player-actions .button,
.quiz-test .result-panel .button {
  align-self: flex-start;
}

.quiz-test-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.quiz-test-preview-banner {
  border: 2px dashed #b45309;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

/* ---- dense ad layout ---------------------------------------------------- */

/* Room under the content so the Ezoic bottom anchor never covers Next or the footer. */
.quiz-test-page {
  padding-bottom: 7rem;
}

.quiz-test .question-image {
  max-height: 44vh;
}

.quiz-test-ad {
  margin-block: 1rem;
}

/* In-panel slots bleed to the panel edge (same clamp as site.css .quiz-panel
   padding); otherwise a 390px phone leaves ~295px and no 300x250 fits, and a
   desktop column beside the rail cannot fit 728x90. */
.quiz-test .quiz-panel .quiz-test-ad {
  margin: 0.5rem calc(-1 * clamp(1.25rem, 4vw, 2.5rem));
  padding-inline: 0;
  border-inline: 0;
  border-radius: 0;
}

.quiz-test .result-panel .quiz-test-ad {
  margin-block: 0.5rem;
}

.quiz-test-page .main-shell {
  padding-block: 1rem 2rem;
}

/* The page title already names the quiz; the repeat only pushes answers down. */
.quiz-test .quiz-test-question > .eyebrow {
  display: none;
}

@media (min-width: 48rem) {
  .quiz-test .question-image {
    max-height: 28vh;
  }
}

/* Reserve each slot's tallest likely creative so nothing jumps under a tap. */
.quiz-test-ad[data-quiz-ad="top"] .ad-slot { min-height: 100px; }
.quiz-test-ad[data-quiz-ad="foot"] .ad-slot { min-height: 100px; }
.quiz-test-ad[data-quiz-ad="pre_answers"] .ad-slot,
.quiz-test-ad[data-quiz-ad="post_answer"] .ad-slot,
.quiz-test-ad[data-quiz-ad="after_quiz"] .ad-slot,
.quiz-test-ad[data-quiz-ad="result"] .ad-slot,
.quiz-test-ad[data-quiz-ad="result_after"] .ad-slot { min-height: 280px; }
.quiz-test-ad[data-quiz-ad="rail"] .ad-slot { min-height: 600px; }

@media (min-width: 48rem) {
  .quiz-test-ad[data-quiz-ad="top"] .ad-slot,
  .quiz-test-ad[data-quiz-ad="foot"] .ad-slot,
  .quiz-test-ad[data-quiz-ad="pre_answers"] .ad-slot { min-height: 90px; }
  .quiz-test-ad[data-quiz-ad="post_answer"] .ad-slot,
  .quiz-test-ad[data-quiz-ad="after_quiz"] .ad-slot,
  .quiz-test-ad[data-quiz-ad="result"] .ad-slot,
  .quiz-test-ad[data-quiz-ad="result_after"] .ad-slot { min-height: 250px; }
}

/* Desktop rail: shown only where a 300px column fits beside a readable quiz. */
.quiz-test-rail {
  display: none;
}

@media (min-width: 75rem) {
  .quiz-test-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 21.5rem;
    gap: 2rem;
    align-items: start;
  }

  .quiz-test-rail {
    display: block;
    position: sticky;
    top: 5.5rem;
  }

  .quiz-test-rail .quiz-test-ad {
    margin-block: 0;
  }
}

.quiz-test-ad-preview {
  border: 2px dashed #b45309;
  background: repeating-linear-gradient(45deg, #fff7ed, #fff7ed 12px, #ffedd5 12px, #ffedd5 24px);
}

.quiz-test-ad-preview .ad-label {
  color: #9a3412;
}

.quiz-test-ad-preview .ad-sizes {
  color: #7c2d12;
  font-size: 0.8rem;
  font-weight: 700;
}
