/* =========================================
   EXAM SIMULATOR STYLES
   ========================================= */
:root {
  --sim-font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --sim-font-ui: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --sim-font-mono: 'IBM Plex Mono', monospace;
}

.option-card {
  font-family: var(--sim-font-ui);
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 15px;
  color: #111827;
}

.option-card:hover {
  background-color: #f9fafb;
  border-color: #0071e3;
}

.option-card.selected {
  background-color: #e5f1fb;
  border-color: #0071e3;
  color: #0071e3;
  font-weight: 600;
}

.question-dot {
  font-family: var(--sim-font-mono);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.question-dot.active {
  border-color: #0071e3;
  background: #0071e3;
  color: #fff;
}

.question-dot.answered {
  background: #e5f1fb;
  border-color: #0071e3;
  color: #0071e3;
}

/* Results Review Items */
.review-item {
  font-family: var(--sim-font-ui);
  border: 1px solid #e3e8ee;
  border-radius: 8px;
  padding: 20px;
  background: #f9fafb;
  word-break: break-word;
  overflow-wrap: break-word;
}

.review-item.correct {
  border-left: 4px solid #34c759;
}

.review-item.incorrect {
  border-left: 4px solid #ff3b30;
}

/* Force Leonardo Blue on the Exam / Upgrade CTA Button */
#start-exam-btn {
  font-family: var(--sim-font-display);
  background-color: #0071e3 !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  border: none !important;
  opacity: 1 !important; 
  cursor: pointer !important;
  transition: all 0.2s ease;
}

#start-exam-btn:hover {
  background-color: #005ce6 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 113, 227, 0.2);
}

/* =========================================
   PAST EXAM RESULTS HEADER, CARDS & REVIEW MODAL
   ========================================= */
.past-exams-header-row {
  flex-wrap: wrap;
  gap: 12px;
}

.past-exams-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.past-filter-select {
  font-family: var(--sim-font-ui);
  width: auto !important;
  min-width: 170px;
  height: 36px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  font-weight: 600;
  color: #374151;
}

.avg-score-pill {
  font-family: var(--sim-font-mono);
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.avg-score-pill.passing {
  background: #ecfdf3;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.avg-score-pill.needs-work {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.sim-result-card {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 18px 20px !important;
}

.sim-result-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.sim-result-subject {
  font-family: var(--sim-font-display);
  color: #111827;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sim-result-date {
  font-family: var(--sim-font-mono);
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.sim-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.sim-meta-badge {
  font-family: var(--sim-font-mono);
  font-size: 11px;
  background: #f3f4f6 !important;
  color: #4b5563 !important;
  border-color: #e5e7eb !important;
  font-weight: 600;
}

.sim-result-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sim-action-btn {
  font-family: var(--sim-font-ui);
  min-height: 36px !important;
  padding: 6px 14px !important;
  font-size: 13px !important;
  text-decoration: none;
  white-space: nowrap;
}

.sim-tutor-btn {
  color: #0071e3 !important;
  border-color: #cfe4fa !important;
  background-color: #f0f7ff !important;
}

.sim-tutor-btn:hover {
  background-color: #e0effe !important;
}

.sim-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.sim-delete-btn:hover {
  color: #df1b41;
  border-color: #fecaca;
  background: #fef2f2;
}

/* Past Exam Review Modal */
.past-review-modal-content {
  max-width: 740px !important;
  width: 100%;
}

.review-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e3e8ee;
}

.review-filter-tabs {
  display: inline-flex;
  background: #f3f4f6;
  padding: 4px;
  border-radius: 8px;
  gap: 4px;
}

.review-tab-btn {
  border: none;
  background: transparent;
  color: #6b7280;
  font-family: var(--sim-font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.review-tab-btn.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.review-empty-msg {
  font-family: var(--sim-font-ui);
  text-align: center;
  padding: 32px 16px;
  color: #6b7280;
  font-size: 14px;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
}

@media screen and (max-width: 768px) {
  .past-exams-controls {
    width: 100%;
    justify-content: space-between;
  }

  .past-filter-select {
    flex: 1;
  }

  .sim-result-card {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .sim-result-actions {
    width: 100%;
    flex-wrap: wrap;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
  }

  .sim-action-btn {
    flex: 1;
    justify-content: center;
  }
}