/* =========================================================
   题库搜索 search.css（电脑端弹窗 + 教师后台共用）
   ========================================================= */
.qh-bar { display: flex; align-items: center; gap: 10px; padding: 16px 20px 10px; }
.qh-search {
  flex: 1; display: flex; align-items: center; gap: 9px;
  border: 1.5px solid #dbe7f5; border-radius: 12px; background: #fbfdff;
  padding: 0 12px; transition: .16s;
}
.qh-search:focus-within {
  border-color: #1268d8; background: #fff;
  box-shadow: 0 0 0 3px rgba(18, 104, 216, .12);
}
.qh-search svg { width: 18px; height: 18px; color: #7b8fa8; flex: 0 0 auto; }
.qh-search input {
  flex: 1; width: 100%; border: none; outline: none; background: transparent;
  font-size: 15px; color: #16293f; padding: 11px 0;
}
.qh-search input::placeholder { color: #9aabc0; }
.qh-btn {
  border: 1px solid #dbe7f5; background: #fff; color: #3d5673;
  border-radius: 10px; padding: 9px 15px; font-size: 13px; font-weight: 700;
  font-family: inherit; cursor: pointer; white-space: nowrap; transition: .16s;
}
.qh-btn:hover { border-color: #cfe1f8; color: #1268d8; }
.qh-btn.primary {
  background: linear-gradient(100deg, #1b7ce8, #0f5fc4);
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 15px rgba(18, 104, 216, .22);
}
.qh-btn.primary:hover { filter: brightness(1.05); color: #fff; }
.qh-btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }

.qh-filters { display: flex; gap: 7px; flex-wrap: wrap; padding: 4px 20px 12px; }
.qh-chip {
  border: 1px solid #e2eaf4; background: #fff; color: #5b7390;
  border-radius: 999px; padding: 5px 13px; font-size: 12px; font-weight: 700;
  font-family: inherit; cursor: pointer; transition: .15s; white-space: nowrap;
}
.qh-chip:hover { border-color: #cfe1f8; color: #1268d8; }
.qh-chip.active { background: #0a2540; border-color: #0a2540; color: #fff; }

.qh-meta {
  padding: 0 20px 8px; font-size: 12px; color: #7b8fa8;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.qh-meta b { color: #1268d8; font-variant-numeric: tabular-nums; }
.qh-kbd {
  display: inline-block; border: 1px solid #dbe7f5; border-bottom-width: 2px;
  border-radius: 5px; padding: 0 5px; font-size: 10.5px; color: #7b8fa8;
  background: #f8fbff; line-height: 1.6;
}

.qh-results { padding: 2px 20px 20px; overflow: auto; }
.qh-results.teacher-results { max-height: 58vh; }
.qh-hit {
  border: 1px solid #e2eaf4; border-radius: 13px; background: #fff;
  padding: 13px 15px; margin-bottom: 10px; transition: .16s;
}
.qh-hit:hover { border-color: #cfe1f8; box-shadow: 0 6px 18px rgba(16, 54, 104, .07); }
.qh-hit-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qh-hit-head b { font-size: 14px; color: #16293f; }
.qh-type {
  font-size: 10.5px; font-weight: 800; letter-spacing: .4px;
  padding: 2px 8px; border-radius: 5px; white-space: nowrap;
}
.qh-type.case { background: #eaf2fe; color: #1268d8; }
.qh-type.question { background: #e9f8f2; color: #0f8f6b; }
.qh-type.scene { background: #fdf3df; color: #b7791f; }
.qh-type.pearl { background: #f3ecff; color: #7b4fd0; }
.qh-type.standard { background: #eef3f8; color: #4a6a8c; }
.qh-case { margin-left: auto; font-size: 11px; color: #7b8fa8; white-space: nowrap; }

.qh-snippets { margin-top: 9px; display: flex; flex-direction: column; gap: 6px; }
.qh-snippet { font-size: 12.8px; line-height: 1.75; color: #3d5673; word-break: break-word; }
.qh-snippet em {
  font-style: normal; font-weight: 800; color: #1268d8;
  font-size: 11px; background: #eef5ff; border-radius: 4px;
  padding: 1px 6px; margin-right: 6px; white-space: nowrap;
}
.qh-snippet mark { background: #fff0a8; color: #3a2c00; padding: 0 1px; border-radius: 2px; }

.qh-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

.qh-detail {
  margin-top: 12px; border-top: 1px dashed #e2eaf4; padding-top: 11px;
}
.qh-detail h5 { margin: 0 0 8px; font-size: 12px; color: #4a6a8c; letter-spacing: .4px; }
.qh-detail-q { font-size: 13px; line-height: 1.75; color: #16293f; margin-bottom: 10px; }
.qh-opt {
  display: flex; gap: 8px; align-items: flex-start;
  border: 1px solid #e7eef8; border-radius: 9px; padding: 8px 10px; margin-bottom: 6px;
  font-size: 12.5px; line-height: 1.65; color: #3d5673;
}
.qh-opt .k {
  flex: 0 0 20px; width: 20px; height: 20px; border-radius: 6px;
  display: grid; place-items: center; background: #eef5ff; color: #1268d8;
  font-size: 10.5px; font-weight: 900;
}
.qh-opt .v {
  margin-left: auto; flex: 0 0 auto; font-size: 10.5px; font-weight: 800;
  padding: 1px 7px; border-radius: 4px; background: #eef3f8; color: #7b8fa8;
}
.qh-opt.good { border-color: #bfe9da; background: #f5fdf9; }
.qh-opt.good .v { background: #0f8f6b; color: #fff; }
.qh-opt.partial { border-color: #f0d9a6; background: #fffcf4; }
.qh-opt.partial .v { background: #b7791f; color: #fff; }
.qh-opt.bad { border-color: #f3c3c5; background: #fff8f8; }
.qh-opt.bad .v { background: #ce343a; color: #fff; }
.qh-opt-note { margin: 4px 0 0 28px; font-size: 11.5px; line-height: 1.65; color: #7b8fa8; }

.qh-empty {
  padding: 44px 18px; text-align: center; color: #7b8fa8;
  font-size: 13px; line-height: 1.9;
}
.qh-empty b { color: #16293f; }
.qh-empty .qh-sugs { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.qh-sug {
  border: 1px solid #dbe7f5; background: #f8fbff; color: #1268d8;
  border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer;
  font-family: inherit;
}
.qh-sug:hover { background: #eef5ff; }

/* 搜索弹窗（电脑端） */
.qh-modal { width: 880px; max-width: 94vw; max-height: 88vh; display: flex; flex-direction: column; }
.qh-modal .modal-body { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.qh-modal .qh-results { max-height: 54vh; }

/* 教师后台：定位节点时闪烁提示 */
.node-card.qh-flash { box-shadow: 0 0 0 3px rgba(18, 104, 216, .28); border-color: #1268d8; }

@media (max-width: 640px) {
  .qh-bar { padding: 12px 12px 8px; }
  .qh-filters { padding: 2px 12px 10px; }
  .qh-meta { padding: 0 12px 8px; }
  .qh-results { padding: 2px 12px 14px; }
  .qh-case { margin-left: 0; width: 100%; }
  .qh-modal .qh-results { max-height: 48vh; }
}
