/* === CDL TOOLKIT — Practice Test Styles === */

.test-header { margin-bottom: 32px; }

.test-progress-bar {
  height: 6px; background: #1a1a1a; border-radius: 3px;
  overflow: hidden; margin-bottom: 16px;
}
.test-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--amber), #d97706);
  border-radius: 3px; transition: width 0.4s ease;
}

.test-meta {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.test-category-badge {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--amber); letter-spacing: 2px; text-transform: uppercase;
  background: var(--amber-ghost); border: 1px solid var(--amber-border);
  padding: 4px 10px; border-radius: 2px;
}
.test-count {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-muted); letter-spacing: 2px;
}
.test-score-live {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-dim); letter-spacing: 1px;
}

/* Question */
.test-question { margin-bottom: 28px; }
.test-question-text {
  font-family: var(--font-body); font-size: 20px;
  color: var(--text-primary); line-height: 1.5;
  font-weight: 400;
}
@media (max-width: 600px) {
  .test-question-text { font-size: 17px; }
}

/* Options */
.test-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }

.test-option {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: 2px; padding: 16px 20px;
  cursor: pointer; transition: all 0.2s ease;
  text-align: left; width: 100%;
  font-family: var(--font-body); font-size: 15px;
  color: var(--text-secondary); line-height: 1.5;
  position: relative;
}
.test-option:hover:not(:disabled) {
  border-color: var(--amber-dim);
  background: var(--bg-elevated);
}
.test-option.selected {
  border-color: var(--amber);
  background: #1a1808;
}
.test-option.correct {
  border-color: #22c55e;
  background: #0a1a0e;
}
.test-option.incorrect {
  border-color: #dc2626;
  background: #1a0a0a;
}
.test-option.faded { opacity: 0.4; }
.test-option:disabled { cursor: default; }

.test-option-letter {
  font-family: var(--font-display); font-size: 18px;
  color: var(--amber); min-width: 24px; text-align: center;
  line-height: 1.3;
}
.test-option.correct .test-option-letter { color: #22c55e; }
.test-option.incorrect .test-option-letter { color: #dc2626; }

.test-option-text { flex: 1; }

.test-option-icon {
  font-size: 18px; min-width: 24px; text-align: center;
}
.test-option.correct .test-option-icon { color: #22c55e; }
.test-option.incorrect .test-option-icon { color: #dc2626; }

@media (max-width: 600px) {
  .test-option { padding: 14px 16px; font-size: 14px; min-height: 52px; }
  .test-option-letter { font-size: 16px; }
}

/* Feedback */
.test-feedback {
  border-radius: 2px; padding: 20px 24px; margin-bottom: 24px;
}
.test-feedback.correct {
  background: #22c55e0d; border: 1px solid #22c55e33;
}
.test-feedback.incorrect {
  background: #dc26260d; border: 1px solid #dc262633;
}
.test-feedback-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.test-feedback-icon { font-size: 20px; }
.test-feedback.correct .test-feedback-icon { color: #22c55e; }
.test-feedback.incorrect .test-feedback-icon { color: #dc2626; }

.test-feedback-title {
  font-family: var(--font-display); font-size: 16px;
  letter-spacing: 2px;
}
.test-feedback.correct .test-feedback-title { color: #22c55e; }
.test-feedback.incorrect .test-feedback-title { color: #dc2626; }

.test-feedback-text {
  font-family: var(--font-body); font-size: 14px;
  color: var(--text-secondary); line-height: 1.7;
}

/* Navigation */
.test-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 16px; border-top: 1px solid var(--border);
  gap: 16px; flex-wrap: wrap;
}
.test-hint {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-dim); letter-spacing: 1px;
}

/* === RESULTS === */
.test-results { padding-bottom: 40px; }

.test-results-header {
  text-align: center; padding: 40px 24px; margin-bottom: 32px;
  border-radius: 2px;
}
.test-results-header.passed { background: #22c55e0d; border: 1px solid #22c55e33; }
.test-results-header.failed { background: #dc26260d; border: 1px solid #dc262633; }

.test-results-icon { font-size: 48px; margin-bottom: 12px; }
.test-results-header.passed .test-results-icon { color: #22c55e; }
.test-results-header.failed .test-results-icon { color: #dc2626; }

.test-results-title {
  font-family: var(--font-display); font-size: 32px;
  letter-spacing: 3px;
}
.test-results-header.passed .test-results-title { color: #22c55e; }
.test-results-header.failed .test-results-title { color: #dc2626; }

.test-results-subtitle {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-muted); letter-spacing: 2px;
  text-transform: uppercase; margin-top: 8px;
}

.test-results-score { text-align: center; margin-bottom: 32px; }
.test-results-big-number {
  font-family: var(--font-display); font-size: 72px;
  letter-spacing: 4px; line-height: 1;
}
.test-results-big-number.passed { color: #22c55e; }
.test-results-big-number.failed { color: #dc2626; }
.test-results-detail {
  font-family: var(--font-mono); font-size: 13px;
  color: var(--text-muted); letter-spacing: 1px; margin-top: 8px;
}

/* Score bar */
.test-results-bar-container { max-width: 500px; margin: 0 auto 40px; padding: 0 16px; }
.test-results-bar {
  height: 12px; background: #1a1a1a; border-radius: 6px;
  overflow: visible; position: relative;
}
.test-results-bar-fill {
  height: 100%; border-radius: 6px;
  transition: width 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.test-results-bar-fill.passed { background: linear-gradient(90deg, #22c55e, #16a34a); }
.test-results-bar-fill.failed { background: linear-gradient(90deg, #dc2626, #b91c1c); }

.test-results-bar-threshold {
  position: absolute; top: -6px; bottom: -6px;
  width: 2px; background: var(--amber);
  transform: translateX(-50%);
}
.test-results-bar-label {
  position: absolute; top: -22px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono); font-size: 10px;
  color: var(--amber); letter-spacing: 1px; white-space: nowrap;
}

/* Review */
.test-review-heading {
  font-family: var(--font-display); font-size: 20px;
  letter-spacing: 2px; color: var(--text-primary);
  margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.test-review-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }

.test-review-item {
  display: flex; gap: 16px; padding: 16px;
  border-radius: 2px; border: 1px solid var(--border);
  background: var(--bg-card);
}
.test-review-item.correct { border-left: 3px solid #22c55e; }
.test-review-item.incorrect { border-left: 3px solid #dc2626; }

.test-review-number {
  font-family: var(--font-display); font-size: 20px;
  color: var(--text-dim); min-width: 28px;
}
.test-review-content { flex: 1; }
.test-review-question {
  font-size: 14px; color: var(--text-primary);
  margin-bottom: 8px; line-height: 1.5;
}
.test-review-wrong {
  font-size: 13px; color: #dc2626; margin-bottom: 4px;
  font-family: var(--font-mono); letter-spacing: 0.5px;
}
.test-review-right {
  font-size: 13px; color: #22c55e;
  font-family: var(--font-mono); letter-spacing: 0.5px;
}
.test-review-explanation {
  font-size: 13px; color: var(--text-muted); margin-top: 8px;
  line-height: 1.6; font-style: italic;
}

.test-results-actions {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}

@media (max-width: 600px) {
  .test-results-header { padding: 28px 16px; }
  .test-results-title { font-size: 24px; }
  .test-results-big-number { font-size: 56px; }
  .test-review-item { padding: 12px; flex-direction: column; gap: 8px; }
  .test-review-number { font-size: 16px; }
  .test-results-actions { flex-direction: column; }
  .test-results-actions .btn-primary,
  .test-results-actions .btn-ghost { width: 100%; }
}
