/* ===== Code Quiz styles ===== */

/* Progress */
.cq-progress { margin-bottom: 1rem; }
.cq-progress-bar {
  height: 6px;
  background: #ddd;
  border-radius: 3px;
  margin-top: .35rem;
  overflow: hidden;
}
.cq-progress-fill {
  height: 100%;
  background: #5b6abf;
  border-radius: 3px;
  transition: width .3s;
}

/* Card */
.cq-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

.cq-prompt {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Code block */
.cq-code {
  background: #1e1e2e;
  color: #cdd6f4;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  font-size: .82rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
  margin-bottom: 1rem;
}

.cq-pick-label {
  font-size: .9rem;
  font-weight: 500;
  color: #555;
  margin-bottom: .5rem;
}

/* Options */
.cq-options {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: 1rem;
}

.cq-option {
  display: block;
  width: 100%;
  text-align: left;
  background: #f6f6fa;
  border: 2px solid #e0e0e8;
  border-radius: 8px;
  padding: .75rem 1rem;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
  font-size: .8rem;
  line-height: 1.5;
  white-space: pre;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  overflow-x: auto;
}
.cq-option:hover:not(.locked) {
  border-color: #5b6abf;
  background: #ededf6;
}

.cq-option.selected {
  border-color: #5b6abf;
  background: #e8e8f4;
}

.cq-option.correct {
  border-color: #2e7d32;
  background: #e8f5e9;
}
.cq-option.wrong {
  border-color: #c62828;
  background: #ffebee;
}
.cq-option.locked {
  cursor: default;
  opacity: .7;
}
.cq-option.correct.locked { opacity: 1; }

/* Feedback */
.cq-feedback {
  padding: .75rem 1rem;
  border-radius: 8px;
  font-size: .88rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}
.cq-feedback.is-correct {
  background: #e8f5e9;
  color: #1b5e20;
}
.cq-feedback.is-wrong {
  background: #ffebee;
  color: #b71c1c;
}

/* Results actions */
.cq-results-actions {
  display: flex;
  gap: .75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.cq-results-actions .btn { text-decoration: none; text-align: center; }

/* #cq-progress-text */
#cq-progress-text {
  font-size: .85rem;
  color: #666;
}
