/* ============================================================
   lesson-quiz.css — Quiz tipo carrusel, una pregunta a la vez
   Diseñado para páginas de lección con fondo claro
   ============================================================ */

/* ── Sección contenedor ── */
#lesson-quiz-container {
  margin: 48px auto 16px;
  max-width: 680px;
  padding: 0 16px;
}

/* ── Card principal (fondo oscuro para destacar sobre el fondo claro del sitio) ── */
.lq-card {
  background: #12172b;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 48px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.06);
}

/* ── Header de la card ── */
.lq-card-header {
  background: var(--wc, #2F7BF6);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.lq-card-tag {
  font-family: var(--font-display, 'Nunito', sans-serif);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #fff;
}
.lq-progress-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.lq-progress-dots {
  display: flex;
  gap: 6px;
}
.lq-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  transition: all .25s;
}
.lq-dot.done  { background: rgba(255,255,255,.6); }
.lq-dot.active { background: #fff; transform: scale(1.2); }
.lq-progress-label {
  font-size: 11px;
  color: rgba(255,255,255,.75);
  font-weight: 600;
}

/* ── Texto de la pregunta ── */
.lq-question-text {
  font-family: var(--font-display, 'Nunito', sans-serif);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.55;
  color: #fff;
  padding: 28px 24px 20px;
}

/* ── Opciones ── */
.lq-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 24px;
}
.lq-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.85);
  font-family: var(--font-display, 'Nunito', sans-serif);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: all .18s ease;
}
.lq-opt:hover:not(:disabled) {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.3);
  color: #fff;
  transform: translateX(4px);
}
.lq-opt:disabled { cursor: default; }

.lq-opt-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  color: #fff;
}
.lq-opt-text { flex: 1; }
.lq-opt-mark {
  font-size: 18px;
  font-weight: 900;
  flex-shrink: 0;
  margin-left: auto;
}

/* Estados después de responder */
.lq-opt.lq-opt-correct {
  background: rgba(34,194,104,.2);
  border-color: #22C268;
  color: #fff;
}
.lq-opt.lq-opt-correct .lq-opt-letter {
  background: #22C268;
}
.lq-opt.lq-opt-correct .lq-opt-mark { color: #22C268; }

.lq-opt.lq-opt-wrong {
  background: rgba(231,76,60,.15);
  border-color: #E74C3C;
  color: rgba(255,255,255,.6);
}
.lq-opt.lq-opt-wrong .lq-opt-mark { color: #E74C3C; }

/* ── Pista ── */
.lq-pista {
  margin: 16px 24px 0;
  padding: 12px 16px;
  background: rgba(243,156,18,.12);
  border-left: 3px solid #F39C12;
  border-radius: 0 10px 10px 0;
  font-size: 14px;
  color: rgba(255,255,255,.8);
  line-height: 1.5;
}

/* ── Footer ── */
.lq-card-footer {
  padding: 20px 24px 24px;
  display: flex;
  justify-content: flex-end;
}
.lq-hint-select {
  font-size: 13px;
  color: rgba(255,255,255,.35);
  font-style: italic;
  padding: 10px 0;
}

.lq-btn-next {
  padding: 13px 28px;
  border-radius: 12px;
  border: none;
  background: var(--wc, #2F7BF6);
  color: #fff;
  font-family: var(--font-display, 'Nunito', sans-serif);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: all .2s ease;
  letter-spacing: .01em;
}
.lq-btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  filter: brightness(1.1);
}

/* ── Pantalla de resultados ── */
.lq-result-card {
  text-align: center;
}
.lq-result-card .lq-card-header {
  justify-content: center;
}
.lq-result-score {
  font-size: 64px;
  padding: 28px 24px 8px;
  line-height: 1;
}
.lq-result-num {
  font-family: var(--font-display, 'Nunito', sans-serif);
  font-weight: 900;
  font-size: 36px;
  color: #fff;
  line-height: 1;
}
.lq-result-pct {
  font-size: 18px;
  color: rgba(255,255,255,.55);
  margin: 6px 0 16px;
}
.lq-result-msg {
  font-size: 16px;
  color: rgba(255,255,255,.8);
  line-height: 1.6;
  padding: 0 28px 24px;
}
.lq-result-card.lq-passed .lq-result-num { color: #22C268; }
.lq-result-card.lq-failed .lq-result-num { color: #E74C3C; }

.lq-btn-retry {
  margin: 0 24px 24px;
  padding: 13px 28px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,.2);
  background: transparent;
  color: #fff;
  font-family: var(--font-display, 'Nunito', sans-serif);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all .18s;
  width: calc(100% - 48px);
}
.lq-btn-retry:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.4);
}

.lq-entrega-notice {
  margin: 0 24px 24px;
  padding: 14px 16px;
  background: rgba(243,156,18,.12);
  border: 1.5px solid rgba(243,156,18,.3);
  border-radius: 12px;
  font-size: 14px;
  color: rgba(255,255,255,.8);
  line-height: 1.5;
  text-align: left;
}
.lq-entrega-notice strong { color: #F39C12; }

/* ── Ya completado ── */
.lq-already-done {
  text-align: center;
}
.lq-already-done .lq-card-header {
  justify-content: center;
  background: #22C268;
}
.lq-already-done .lq-result-score {
  font-size: 56px;
  padding: 24px 24px 8px;
}
.lq-already-done .lq-result-msg { padding-bottom: 28px; }

/* ── Overlay de candado sobre el botón siguiente ── */
#lq-lock-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(10,15,35,.82);
  border-radius: inherit;
  color: rgba(255,255,255,.95);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .02em;
  z-index: 3;
  text-align: center;
  padding: 8px 12px;
  pointer-events: none;
  transition: background .2s ease;
}
#lq-lock-overlay .lq-lock-ico {
  font-size: 26px;
  line-height: 1;
  margin-bottom: 5px;
  display: block;
}

/* ── Botón siguiente bloqueado ── */
.lnav-btn.next-btn.lq-locked {
  opacity: .75;
  cursor: not-allowed;
  filter: grayscale(.2);
}
.lnav-btn.next-btn.lq-locked:hover {
  opacity: .88;
  filter: grayscale(0);
}
.lnav-btn.next-btn.lq-locked:hover #lq-lock-overlay {
  background: rgba(10,15,35,.94);
}

/* ── Shake al intentar navegar sin quiz ── */
@keyframes lqShake {
  0%, 100% { transform: translateX(0); }
  15% { transform: translateX(-7px) rotate(-.4deg); }
  35% { transform: translateX(7px) rotate(.4deg); }
  55% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.lq-shake { animation: lqShake .45s ease !important; }

/* El párrafo legacy ya no se usa */
#lq-lock-msg { display: none !important; }
.lnav-btn.next-btn.lq-unlocked {
  animation: lqPop .45s cubic-bezier(.34,1.56,.5,1);
}
@keyframes lqPop { 0%{transform:scale(1)} 50%{transform:scale(1.06)} 100%{transform:scale(1)} }

#lq-lock-msg {
  text-align: center;
  font-size: 13px;
  color: #999;
  margin-top: 8px;
}
#lq-lock-msg.lq-done-msg { color: #22C268; font-weight: 600; }

/* ── Responsive ── */
@media (max-width: 480px) {
  .lq-question-text { font-size: 16px; padding: 22px 18px 16px; }
  .lq-options-list { padding: 0 18px; }
  .lq-card-footer { padding: 16px 18px 20px; }
  .lq-opt { font-size: 14px; padding: 11px 13px; }
}
