/* 申请问题 (apply questions) — editor, apply chips, applicant answer summary.  v20260928-applyq1 */

/* ── Editor (create / edit recruitment post) ─────────────────────────────── */
.raq-root {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.1rem 1.2rem;
  margin: 1.25rem 0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  text-align: left;
  transition: border-color .2s, box-shadow .2s;
}
.raq-root.has-questions {
  border-color: #c7d2fe;
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.10);
}
.raq-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.raq-head-text { flex: 1 1 auto; min-width: 0; }
.raq-title {
  margin: 0; font-size: 1.05rem; font-weight: 700; color: #0f172a;
  display: flex; align-items: center; gap: .6rem; line-height: 1.35;
}
.raq-title i { color: #6366f1; font-size: 1.15rem; }
.raq-desc { margin: .35rem 0 0; font-size: .86rem; color: #64748b; line-height: 1.45; }
.raq-count {
  flex: 0 0 auto; font-size: .74rem; font-weight: 800; color: #4338ca;
  background: #eef2ff; border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.raq-count:empty { display: none; }

.raq-list { display: flex; flex-direction: column; gap: 12px; margin-top: .9rem; }
.raq-list:empty { display: none; }

.raq-q {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  transition: border-color .15s, box-shadow .15s;
}
.raq-q:focus-within { border-color: #a5b4fc; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12); }
.raq-q.is-invalid { border-color: #fca5a5; box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.10); }

.raq-q-top { display: flex; align-items: center; gap: 10px; }
.raq-q-index {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 800; color: #4338ca; background: #eef2ff;
}
.raq-root input.raq-q-title,
.raq-root input.raq-opt-label {
  flex: 1 1 auto; min-width: 0; width: 100%;
  border: 1px solid #e2e8f0; border-radius: 10px;
  background: #f8fafc; color: #0f172a;
  padding: .55rem .8rem; font-size: .92rem; line-height: 1.3;
  outline: none; box-shadow: none; transition: border-color .15s, background .15s;
}
.raq-root input.raq-q-title { font-weight: 700; font-size: .95rem; }
.raq-root input.raq-q-title:focus,
.raq-root input.raq-opt-label:focus { border-color: #818cf8; background: #fff; }
.raq-root input::placeholder { color: #94a3b8; font-weight: 500; }

.raq-q-remove, .raq-opt-remove {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s, transform .15s, color .15s;
}
.raq-q-remove {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid #fecaca; background: #fff1f2; color: #e11d48;
}
.raq-q-remove:hover { background: #ffe4e6; transform: translateY(-1px); }
.raq-opt-remove {
  width: 30px; height: 30px; border-radius: 999px;
  border: 1px solid transparent; background: transparent; color: #94a3b8; font-size: .8rem;
}
.raq-opt-remove:hover { background: #f1f5f9; color: #e11d48; }

.raq-type-seg {
  display: inline-flex; gap: 4px; margin: 10px 0 8px 38px;
  padding: 3px; border-radius: 999px; background: #f1f5f9; border: 1px solid #e2e8f0;
}
.raq-type-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; color: #475569;
  border-radius: 999px; padding: 5px 12px; font-size: .8rem; font-weight: 700; cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.raq-type-btn.is-on { background: #fff; color: #4338ca; box-shadow: 0 2px 8px rgba(99, 102, 241, 0.18); }
.raq-type-ico { width: 13px; height: 13px; border: 2px solid currentColor; display: inline-block; opacity: .85; }
.raq-type-ico--radio { border-radius: 50%; }
.raq-type-ico--check { border-radius: 3px; }

.raq-opts { display: flex; flex-direction: column; gap: 6px; margin-left: 38px; }
.raq-opt { display: flex; align-items: center; gap: 8px; }
.raq-opt-mark {
  flex: 0 0 auto; width: 16px; height: 16px; border: 2px solid #cbd5e1; border-radius: 50%; background: #fff;
}
.raq-q[data-type="multiple"] .raq-opt-mark { border-radius: 4px; }

.raq-add-opt, .raq-add-q {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border-radius: 999px; font-weight: 700; transition: background .15s, border-color .15s;
}
.raq-add-opt {
  margin: 8px 0 0 38px; padding: 5px 12px; font-size: .8rem;
  border: 1px dashed #cbd5e1; background: #fff; color: #475569;
}
.raq-add-opt:hover { border-color: #a5b4fc; color: #4338ca; background: #eef2ff; }
.raq-add-q {
  margin-top: .85rem; padding: .45rem 1rem; font-size: .86rem;
  border: 1px dashed #a5b4fc; background: #eef2ff; color: #4338ca;
}
.raq-add-q:hover { background: #e0e7ff; border-style: solid; }
.raq-add-q:disabled, .raq-add-opt:disabled { opacity: .45; cursor: not-allowed; }
.raq-error { color: #b91c1c; font-size: .82rem; font-weight: 700; margin-top: 8px; }
.raq-error:empty { display: none; }

/* dashboard 创建招募 VtAlert (compact) */
.dash-create-recruit-swal .raq-root { margin: 0; padding: .9rem; }
.dash-create-recruit-swal .raq-title { font-size: .95rem; font-weight: 800; }
.dash-create-recruit-swal .raq-desc { font-size: .78rem; color: #94a3b8; }

@media (max-width: 575.98px) {
  .raq-root { padding: .9rem; }
  .raq-q { padding: 10px; }
  .raq-type-seg, .raq-opts, .raq-add-opt { margin-left: 0; }
  .raq-q-remove { width: 34px; height: 34px; }
}

/* ── Apply popup (blogger) — question title + capsule chip scroller ───────── */
.raq-apply { text-align: left; display: flex; flex-direction: column; gap: 14px; }
.raq-apply--separated { padding-top: 1rem; margin-top: .25rem; border-top: 1px solid #e8ecf4; }
.raq-apply-q { min-width: 0; }
.raq-apply-q-title {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
  font-size: .95rem; font-weight: 700; color: #0f172a; line-height: 1.35;
}
.raq-apply-q-text { min-width: 0; overflow-wrap: anywhere; }
.raq-apply-q-hint {
  flex: 0 0 auto; font-size: .68rem; font-weight: 800; letter-spacing: .02em;
  color: #64748b; background: #f1f5f9; border: 1px solid #e2e8f0;
  border-radius: 999px; padding: 1px 8px;
}
.raq-apply-q-hint.is-multi { color: #4338ca; background: #eef2ff; border-color: #c7d2fe; }

.raq-chip-row {
  display: flex; flex-wrap: nowrap; gap: 8px;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
  padding: 2px 2px 8px; margin: 0 -2px;
  scrollbar-width: thin;
}
.raq-chip-row::-webkit-scrollbar { height: 4px; }
.raq-chip-row::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }

.raq-chip {
  flex: 0 0 auto; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 5px;
  max-width: 78vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  border: 1px solid #c7d2fe; background: #eef2ff; color: #4338ca;
  border-radius: 999px; padding: 7px 14px; font-size: .84rem; font-weight: 700; line-height: 1.2;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: background .15s, color .15s, box-shadow .15s, transform .1s;
}
.raq-chip span { overflow: hidden; text-overflow: ellipsis; }
.raq-chip:hover { box-shadow: 0 2px 8px rgba(99, 102, 241, 0.16); }
.raq-chip:active { transform: scale(.97); }
.raq-chip:focus-visible { outline: 2px solid #818cf8; outline-offset: 2px; }
.raq-chip.is-on {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border-color: transparent; color: #fff;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.28);
}
.raq-chip-tick { display: none; font-size: .9rem; }
.raq-chip.is-on .raq-chip-tick { display: inline-block; }
.raq-apply-q.is-invalid .raq-chip { border-color: #fca5a5; }
.raq-apply-q-error { color: #dc2626; font-size: .78rem; font-weight: 700; margin-top: 2px; }
.raq-apply-q-error:empty { display: none; }

/* ── Applicant card: compact answers ─────────────────────────────────────── */
.raq-ans {
  display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; overflow-y: hidden;
  max-width: 100%; min-width: 0;
  margin-top: 6px; padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 transparent;
}
.raq-ans::-webkit-scrollbar { display: block; height: 8px; }
.raq-ans::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 999px; }
.raq-ans-item {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  border-radius: 999px; padding: 3px 10px; font-size: .72rem; line-height: 1.4;
  background: #f8fafc; border: 1px solid #e2e8f0; color: #334155; white-space: nowrap;
}
.raq-ans-q { display: none; }
.raq-ans-a { color: #4338ca; font-weight: 800; }
