/* ===== Turkish-style exam — question-type UI ===== */

/* Type badge next to the question number */
.q-type-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.12);
  color: var(--primary);
  border: 1px solid var(--border);
  vertical-align: middle;
  margin: 0 6px;
}

/* Multiple-choice option letter chip (A–E) */
.opt-letter {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 12px;
  border-radius: 6px;
  background: var(--border);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 13px;
  flex: 0 0 auto;
}
.quiz-option { display: flex; align-items: center; }
.quiz-option.correct .opt-letter { background: var(--correct); color: #fff; }
.quiz-option.wrong .opt-letter { background: var(--wrong); color: #fff; }

/* True / False */
.tf-options { flex-direction: row !important; gap: 12px; }
.tf-option { flex: 1; text-align: center; justify-content: center; font-weight: 600; }

/* Fill-in-the-blank */
.fill-gap {
  display: inline-block;
  min-width: 70px;
  border-bottom: 2px solid var(--primary);
  color: transparent;
  letter-spacing: 2px;
}
.fill-area { display: flex; gap: 10px; flex-wrap: wrap; }
.fill-input {
  flex: 1;
  min-width: 200px;
  padding: 13px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 15px;
  outline: none;
}
.fill-input:focus { border-color: var(--primary); }
.fill-input.correct { border-color: var(--correct); }
.fill-input.wrong { border-color: var(--wrong); }
.fill-answer {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: var(--card);
  border: 1px solid var(--border);
}
.fill-answer.correct { border-color: var(--correct); }
.fill-answer.wrong { border-color: var(--wrong); }
.fill-answer-label { font-weight: 600; margin-right: 6px; color: var(--text-muted); }

/* Matching (eşleştirme) */
.match-area { display: flex; flex-direction: column; gap: 10px; }
.match-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}
.match-row.correct { border-color: var(--correct); }
.match-row.wrong { border-color: var(--wrong); }
.match-left { flex: 1; min-width: 120px; font-weight: 500; }
.match-select {
  flex: 1;
  min-width: 160px;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}
.match-select:disabled { opacity: 0.9; cursor: default; }
.match-correct { color: var(--correct); font-size: 13px; font-weight: 600; width: 100%; }
.match-area > .btn-primary { align-self: flex-start; margin-top: 4px; }

/* ===== Notes / Exam keyword search ===== */
/* Compact search living in the topbar, next to Share */
.study-search { position: relative; }
.study-search-bar {
  display: flex; align-items: center; gap: 8px;
  width: 190px;
  padding: 7px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  transition: width 0.2s ease, border-color 0.2s ease;
}
.study-search-bar:focus-within { border-color: var(--primary); width: 240px; }
.study-search-bar > svg { flex: 0 0 auto; }
.study-search-bar input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--text); font-size: 13.5px; }
.study-search-clear { background: none; border: none; color: var(--text-muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.study-search-results {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  width: min(420px, 86vw); max-height: 65vh; overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.32);
  text-align: left;
}
@media (max-width: 640px) {
  .study-search-bar { width: 140px; }
  .study-search-bar:focus-within { width: 170px; }
  .study-search-results { width: min(320px, 88vw); }
}
.search-group-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); padding: 10px 14px 4px; }
.search-result { padding: 9px 14px; border-top: 1px solid var(--border); cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.search-result.exam { cursor: default; }
.search-result:hover { background: rgba(124, 58, 237, 0.06); }
.search-tag { font-size: 11px; color: var(--primary); font-weight: 600; }
.search-snippet { font-size: 13.5px; color: var(--text); line-height: 1.5; }
.search-answer { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.search-snippet mark, .search-answer mark { background: rgba(251, 191, 36, 0.35); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-empty { padding: 14px; text-align: center; color: var(--text-muted); font-size: 13px; }
.search-flash { animation: searchFlash 1.6s ease; border-radius: 6px; }
@keyframes searchFlash { 0%, 100% { background: transparent; } 25% { background: rgba(251, 191, 36, 0.3); } }
