/* assets/quiz/quiz.css */

/* Original */
/* body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 2rem;
  line-height: 1.4;
} */
/* New */
body {font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
   margin: 0; 
   padding: 0; 
}

.card {
  max-width: 720px;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1.2rem 1.3rem;
}

.row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

button {
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  cursor: pointer;
}

.muted {
  color: #666;
  font-size: 0.95rem;
}

.feedback {
  margin-top: 0.8rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: #f7f7f7;
}

.feedback.ok {
  border: 1px solid #b9e3c6;
  background: #f2fbf5;
}

.feedback.bad {
  border: 1px solid #f0c2c2;
  background: #fff3f3;
}

/* --- MCQ rectangles --- */
.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.8rem;
}

@media (max-width: 560px) {
  .choices { grid-template-columns: 1fr; }
}

.choice {
  text-align: left;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
  padding: 0.85rem 0.9rem;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  transition: transform 80ms ease, box-shadow 80ms ease, border-color 80ms ease;
}

.choice:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.choice:focus {
  outline: 3px solid rgba(0, 80, 200, 0.25);
  outline-offset: 2px;
}

.choice .tag {
  flex: 0 0 auto;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  border: 1px solid #ddd;
  display: grid;
  place-items: center;
  font-weight: 650;
  background: #fafafa;
}

.choice .content { flex: 1 1 auto; }

.choice.selected {
  border-color: rgba(0, 80, 200, 0.45);
  box-shadow: 0 0 0 3px rgba(0, 80, 200, 0.12);
}

.choice.correct {
  border-color: rgba(20, 130, 60, 0.55);
  box-shadow: 0 0 0 3px rgba(20, 130, 60, 0.14);
}

.choice.wrong {
  border-color: rgba(200, 40, 40, 0.55);
  box-shadow: 0 0 0 3px rgba(200, 40, 40, 0.14);
}

/* Hide solution snippets included in HTML */
.solution-correct,
.solution-wrong,
.solution-show {
  display: none;
}

/* Numeric input (works for .quiz-num cards) */
.quiz-num input[type="text"],
.quiz-num input[type="number"] {
  padding: 0.45rem 0.6rem;
  font-size: 1rem;
  width: 160px;
}

/* For iframe embeds: remove default page whitespace */
body.quiz-embed { margin: 0; padding: 0; }

/* Deck layout */
.quiz-deck { padding: 16px; }

.quiz-deck-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 720px;
  margin: 0 auto 0.75rem auto;
}

.quiz-deck-progress { font-weight: 600; }

.quiz-deck-nav button:disabled { opacity: 0.55; cursor: not-allowed; }

/* Keep cards centered in the deck */
.quiz-deck .card { margin: 0 auto; }

