/* ==========================================================================
   ESTILOS DEL MÓDULO DE EXAMEN UA2 - TICCAD
   Colores institucionales: Vino (#611232), Oro (#A57F2C), Fondo (#F8F9FF)
   ========================================================================== */

.exam-modal-content {
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid #A57F2C;
  box-shadow: 0 10px 40px rgba(97, 18, 50, 0.2);
  background-color: #ffffff;
}

.exam-modal-header {
  background: linear-gradient(135deg, #611232 0%, #4a0c24 100%);
  color: #ffffff;
  padding: 18px 24px;
  border-bottom: 3px solid #A57F2C;
}

.exam-badge-gold {
  background-color: #A57F2C;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.exam-step-container {
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Paso 1: Búsqueda y Autocompletado */
.student-search-box {
  position: relative;
}

.student-results-list {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-top: 8px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.student-result-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.student-result-item:hover, .student-result-item.active {
  background-color: #fdf6ec;
  border-left: 4px solid #A57F2C;
}

.student-result-item .student-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 15px;
}

.student-result-item .student-email {
  font-size: 13px;
  color: #64748b;
}

/* Paso 2: Confirmación de Correo */
.email-confirm-card {
  background: #fdfcfb;
  border: 2px dashed #A57F2C;
  border-radius: 14px;
  padding: 24px;
  text-align: center;
}

.email-display-badge {
  display: inline-block;
  background-color: #611232;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 30px;
  margin: 12px 0;
  word-break: break-all;
}

/* Barra de Progreso y Navegador de Reactivos */
.exam-progress-bar-wrap {
  height: 10px;
  background-color: #e2e8f0;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 16px;
}

.exam-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #A57F2C 0%, #611232 100%);
  transition: width 0.3s ease;
}

.question-nav-drawer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  max-height: 110px;
  overflow-y: auto;
  padding: 8px;
  background-color: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.q-dot {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  color: #475569;
}

.q-dot:hover {
  transform: translateY(-2px);
}

.q-dot.current {
  border: 2px solid #611232;
  background-color: #611232;
  color: #ffffff;
}

.q-dot.answered {
  background-color: #10b981;
  border-color: #059669;
  color: #ffffff;
}

.q-dot.pending {
  background-color: #f59e0b;
  border-color: #d97706;
  color: #ffffff;
  position: relative;
}

.q-dot.pending::after {
  content: '•';
  position: absolute;
  top: -2px;
  right: 2px;
  font-size: 14px;
}

/* Tarjeta del Reactivo */
.question-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 10px 4px;
}

.question-theme-tag {
  color: #A57F2C;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.question-text {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.45;
  margin-bottom: 20px;
}

/* Opciones de Respuesta */
.option-cards-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-card {
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background-color: #fdfdfd;
}

.option-card:hover {
  border-color: #A57F2C;
  background-color: #fefcf9;
  transform: translateX(4px);
}

.option-card.selected {
  border-color: #611232;
  background-color: #fcf4f7;
  box-shadow: 0 4px 12px rgba(97, 18, 50, 0.08);
}

.option-key {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #e2e8f0;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.option-card.selected .option-key {
  background-color: #611232;
  color: #ffffff;
}

.option-card:hover .option-key {
  background-color: #A57F2C;
  color: #ffffff;
}

.option-desc {
  font-size: 15px;
  color: #334155;
  line-height: 1.45;
  flex: 1;
}

.option-card.selected .option-desc {
  color: #611232;
  font-weight: 600;
}

/* Acciones inferiores */
.exam-actions-bar {
  display: flex;
  flex-direction: column;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  gap: 12px;
}

#btn-exam-next {
  width: 100% !important;
  background-color: #611232 !important;
  border-color: #611232 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  min-height: 48px !important;
  border-radius: 8px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 12px rgba(97, 18, 50, 0.25) !important;
  transition: all 0.2s ease !important;
  cursor: pointer;
}

#btn-exam-next:hover,
#btn-exam-next:focus,
#btn-exam-next:active {
  background-color: #4a0c24 !important;
  border-color: #4a0c24 !important;
  color: #ffffff !important;
}

#btn-exam-next.btn-success {
  background-color: #15803d !important;
  border-color: #15803d !important;
  color: #ffffff !important;
}

.exam-nav-secondary-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.exam-nav-secondary-btns > button {
  flex: 1;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
}

.btn-pending {
  background-color: #fffbeb;
  border: 1px solid #f59e0b;
  color: #b45309;
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-pending:hover, .btn-pending.is-pending {
  background-color: #f59e0b;
  color: #ffffff;
}

/* Modal de Sorpresa: ¿¿¿EstÁS Segur@??? */
.surprise-card {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 3px dashed #ea580c;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(234, 88, 12, 0.2);
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.surprise-emoji {
  font-size: 50px;
  margin-bottom: 8px;
  display: inline-block;
  animation: bounceEmoji 1s infinite alternate;
}

@keyframes bounceEmoji {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

/* Pantalla de Resultados Finales */
.score-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 6px solid #16a34a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  background: #f0fdf4;
}

.score-circle.needs-work {
  border-color: #d97706;
  background: #fffbeb;
}

.score-circle.failed {
  border-color: #dc2626;
  background: #fef2f2;
}

.score-big {
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  color: #1e293b;
}

.score-small {
  font-size: 14px;
  color: #64748b;
  font-weight: 600;
}

.result-feedback-item {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 14px;
  text-align: left;
}

/* Adaptabilidad Móvil PWA */
@media (max-width: 576px) {
  .exam-modal-header {
    padding: 14px 16px;
  }
  .question-text {
    font-size: 16px;
  }
  .option-card {
    padding: 10px 14px;
  }
  .option-desc {
    font-size: 14px;
  }
  .exam-actions-bar {
    flex-direction: column;
    align-items: stretch;
  }
  #btn-exam-next {
    width: 100% !important;
  }
  .exam-nav-secondary-btns {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
  }
  .exam-nav-secondary-btns > button {
    flex: 1;
    font-size: 13px;
    padding: 10px 8px;
  }
}
