/* quiz-detail-modal.css — Quiz detail modal for parent dashboard */

.qdm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 43, 43, 0.52);
  backdrop-filter: blur(4px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: qdmFadeIn 0.18s ease;
}
@keyframes qdmFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.qdm-panel {
  background: white;
  border-radius: 20px;
  max-width: 540px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  animation: qdmSlideUp 0.2s ease;
}
@keyframes qdmSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.qdm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1.5px solid rgba(26, 43, 43, 0.08);
  position: sticky;
  top: 0;
  background: white;
  border-radius: 20px 20px 0 0;
  z-index: 1;
}
.qdm-title {
  font-family: 'Nunito', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #1A2B2B;
  flex: 1;
  padding-right: 12px;
  line-height: 1.3;
}
.qdm-close {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  color: #8AABAB;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background 0.15s;
  flex-shrink: 0;
  font-family: 'Inter', sans-serif;
}
.qdm-close:hover { background: rgba(26, 43, 43, 0.06); }

.qdm-body {
  padding: 20px;
}

/* Score section */
.qdm-score-section {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  padding: 16px;
  background: #F6FAFA;
  border-radius: 14px;
}
.qdm-score-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'Nunito', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
}
.qdm-score-ring.great { background: #e8f5e9; color: #2e7d32; }
.qdm-score-ring.good  { background: #E4F7F7; color: var(--teal); }
.qdm-score-ring.needs { background: #ffe0e0; color: #b71c1c; }

.qdm-score-info { flex: 1; }
.qdm-score-frac {
  font-weight: 700;
  color: #1A2B2B;
  font-size: .95rem;
  margin-bottom: 4px;
}
.qdm-score-time {
  font-size: .75rem;
  color: #8AABAB;
  margin-bottom: 6px;
}
.qdm-score-msg {
  font-size: .8rem;
  font-weight: 600;
  color: #4A6060;
  line-height: 1.4;
}

/* Question breakdown */
.qdm-section-label {
  font-size: .68rem;
  font-weight: 700;
  color: #8AABAB;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
  margin-top: 4px;
}
.qdm-q-grid {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 20px;
}
.qdm-q-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: .8rem;
}
.qdm-q-row.correct { background: #e8f5e9; }
.qdm-q-row.wrong   { background: #fff3f3; }
/* Wrong first time, then put right on "Try the wrong ones again". Its own
   colour, between the two: the score above is the first sitting's, so this
   row is neither a tick it earned first time nor a question still wrong. */
.qdm-q-row.fixed   { background: #FFF6E0; }
.qdm-q-fixed-tag {
  flex-shrink: 0;
  font-size: .68rem;
  font-weight: 700;
  color: #8A5A00;
  white-space: nowrap;
}
/* One box for all three icons: the ↺ of a put-right row is narrower than the
   ✅ and ❌ emoji, and without a width its question number sat 8px left of the
   rest. */
.qdm-q-icon { flex-shrink: 0; font-size: .85rem; width: 1.3em; text-align: center; }
.qdm-q-num  {
  font-weight: 700;
  color: #4A6060;
  flex-shrink: 0;
  font-size: .72rem;
  min-width: 26px;
}
.qdm-q-text {
  color: #1A2B2B;
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Shown INSTEAD of the rows when there is no per-question record — an attempt
   from before the detail was stored, or one past the server's answer cap.
   Deliberately not styled like a row: the previous behaviour drew eight green
   ticks in this situation, and anything row-shaped here would read as a result
   rather than as the absence of one. */
.qdm-q-note {
  font-size: .8rem;
  color: #6B7C7C;
  background: #F4F7F7;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 20px;
}

/* Buttons */
.qdm-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.qdm-btns .btn { flex: 1; min-width: 120px; }

/* Priority practice button */
.qdm-priority-row { margin-bottom: 12px; }
.qdm-priority-btn {
  width: 100%;
  background: #f0f9f9;
  border: 1.5px dashed var(--teal);
  color: var(--teal);
  font-weight: 700;
  padding: 11px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-size: .88rem;
  text-align: center;
  font-family: 'Nunito', sans-serif;
}
.qdm-priority-btn:hover {
  background: #ddf1f2;
  border-color: #158a8d;
  color: #158a8d;
}
.qdm-priority-btn.qdm-priority-set {
  background: #e8f5e9;
  border: 1.5px solid #2e7d32;
  color: #2e7d32;
}
.qdm-priority-btn.qdm-priority-set:hover {
  background: #ffeaea;
  border-color: #b71c1c;
  color: #b71c1c;
}

/* Chip for low-score activity items */
.chip-retry { background: #ffe0e0; color: #b71c1c; }
