/* questions.css — the coach's side of the one question engine (questions-ui.js):
   Subscribers → Forms, the editor, "Ask questions" on a space or booking, a
   space's Questions tab, and booked calls' answers. App variables only, so light
   and dark follow the app. Readable at 55+: 16px body, 15px meta, 44px targets. */

.qx-sub { color: var(--text-2); font-size: 16px; margin: 6px 0 0; max-width: 70ch; }
.qx-empty, .qx-none { color: var(--text-2); font-size: 16px; padding: 18px; }
.qx-head-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.qx-btn-sm { min-height: 40px; }

/* The list */
.qx-list { padding: 0; overflow: hidden; }
.qx-row { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: none; border: 0;
  border-bottom: 1px solid var(--border-soft, var(--border)); padding: 16px 18px; min-height: 64px; cursor: pointer; color: var(--text); font: inherit; }
.qx-row:last-child { border-bottom: 0; }
.qx-row:hover { background: var(--surface-2); }
.qx-row:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.qx-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.qx-row-name { font-size: 17px; font-weight: 600; }
.qx-row-meta { font-size: 15px; color: var(--text-2); }
.qx-row-n { font-size: 15px; color: var(--text-2); white-space: nowrap; }
.qx-row-n b { color: var(--text); font-size: 17px; }

/* Start from */
.qx-empty-card { padding: 22px; }
.qx-empty-card h2 { margin: 0 0 4px; font-size: 20px; }
.qx-empty-card p { color: var(--text-2); font-size: 16px; margin: 0 0 14px; }
.qx-start { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.qx-start-card { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 6px; cursor: pointer; color: var(--text); font: inherit; min-height: 96px; }
.qx-start-card b { font-size: 17px; }
.qx-start-card span { font-size: 15px; color: var(--text-2); line-height: 1.45; }
.qx-start-card:hover { border-color: var(--accent); }
.qx-start-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Detail */
.qx-stats { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 16px; }
.qx-stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; min-width: 120px; display: flex; flex-direction: column; }
.qx-stat b { font-size: 26px; }
.qx-stat span { font-size: 15px; color: var(--text-2); }
.qx-answers { display: flex; flex-direction: column; }
.qx-answer { padding: 14px 18px; border-top: 1px solid var(--border-soft, var(--border)); }
.qx-answer-who { font-weight: 600; font-size: 16px; margin-bottom: 6px; }
.qx-answer-who span { font-weight: 400; color: var(--text-2); font-size: 15px; margin-left: 6px; }
.qx-kv { font-size: 16px; line-height: 1.5; }
.qx-kv { margin-top: 6px; } .qx-kv span { display: block; font-size: 14px; color: var(--text-2); }

/* The editor */
.qx-editor { display: flex; flex-direction: column; gap: 14px; }
.qx-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .qx-grid2 { grid-template-columns: 1fr; } }
.qx-lab { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; color: var(--text); }
.qx-lab .input, .qx-lab textarea, .qx-lab select { font-size: 16px; min-height: 44px; font-weight: 400; }
.qx-qs { display: flex; flex-direction: column; gap: 12px; }
.qx-q { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.qx-q-head { display: flex; align-items: center; gap: 10px; }
.qx-q-n { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-softer, var(--surface)); color: var(--accent); display: grid; place-items: center; font-weight: 700; flex: none; }
.qx-type { flex: 1; min-width: 0; min-height: 44px; font-size: 16px; }
.qx-q-tools { display: flex; gap: 4px; }
.qx-icon { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 18px; cursor: pointer; }
.qx-icon:disabled { opacity: .35; cursor: default; }
.qx-del { color: var(--danger); }
.qx-quiz { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
@media (max-width: 560px) { .qx-quiz { grid-template-columns: 1fr; } .qx-q-head { flex-wrap: wrap; } .qx-type { flex-basis: calc(100% - 40px); } }
.qx-q-foot { display: flex; flex-direction: column; gap: 8px; }
.qx-check { display: flex; align-items: center; gap: 10px; font-size: 16px; min-height: 44px; }
.qx-check input { width: 22px; height: 22px; }
.qx-more summary { cursor: pointer; font-size: 15px; color: var(--text-2); min-height: 32px; display: flex; align-items: center; }
.qx-more .qx-lab { margin-top: 8px; }
.qx-thanks { margin-top: 4px; }

/* Ask questions */
.qx-ask-body { padding: 4px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.qx-modes { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.qx-legend { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.qx-mode { display: flex; align-items: center; gap: 10px; font-size: 16px; min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.qx-mode input { width: 20px; height: 20px; flex: none; }
.qx-mode:has(input:checked) { border-color: var(--accent); background: var(--accent-softer, var(--surface-2)); }
.qx-which { display: flex; flex-direction: column; gap: 10px; }
.qx-which[hidden] { display: none; }
.qx-which-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.qx-note { font-size: 15px; color: var(--text-2); margin: 0; line-height: 1.5; }
.qx-msg { font-size: 15px; color: var(--text-2); margin: 0; min-height: 1em; }

/* A space's answers */
.qx-space { display: flex; flex-direction: column; gap: 16px; }
.qx-people { display: flex; flex-direction: column; }
.qx-person { padding: 14px 18px; border-top: 1px solid var(--border-soft, var(--border)); display: flex; flex-direction: column; gap: 8px; }
.qx-person-head { display: flex; align-items: center; gap: 12px; }
.qx-av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.qx-av-i { display: grid; place-items: center; background: var(--accent-softer, var(--surface-2)); color: var(--accent); font-weight: 700; }
.qx-person-name { font-weight: 600; font-size: 16px; }
.qx-person-meta { font-size: 15px; color: var(--text-2); overflow-wrap: anywhere; }
.qx-ans { border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; }
.qx-ans summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 16px; }
.qx-when { color: var(--text-2); font-size: 15px; margin-left: auto; }
.qx-ans dl, .sbk-answers dl { margin: 4px 0 12px; display: grid; grid-template-columns: 1fr; gap: 2px; }
.qx-ans dt, .sbk-answers dt { font-size: 14px; color: var(--text-2); margin-top: 8px; }
.qx-ans dd, .sbk-answers dd { margin: 0; font-size: 16px; line-height: 1.5; white-space: pre-wrap; }
.qx-decide { display: flex; gap: 8px; margin: 0 0 12px; }
.sbk-answers summary { cursor: pointer; font-size: 15px; color: var(--accent); min-height: 32px; display: flex; align-items: center; }

/* The editor and the panels draw their own inputs (the app's .input is not
   styled inside a sheet), and the editor sheet is wider than a plain confirm. */
#cb-sheet .rel-editor:has(.qx-editor) { max-width: 760px; }
.qx-editor .input, .qx-ask .input { width: 100%; box-sizing: border-box; border: 1px solid var(--border, #d9dbe3); border-radius: 10px;
  padding: 10px 12px; background: var(--surface, #fff); color: var(--text, #15172b); font: inherit; font-size: 16px; min-height: 44px; }
.qx-editor textarea.input, .qx-ask textarea.input { min-height: 88px; resize: vertical; }
.qx-editor .input:focus-visible, .qx-ask .input:focus-visible { outline: 3px solid var(--accent, #6c63ff); outline-offset: 1px; }
.qx-lab { min-width: 0; }
.qx-editor .btn, .qx-ask .btn { min-height: 44px; }
.qx-resp-head { flex-wrap: wrap; gap: 8px; }
.qx-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }

/* Review 3, UX3-14: a saved answer's name as the chip an email carries (the Automated emails editor's own look). */
.qx-tokline { margin: 6px 0 0; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.qx-tok { display: inline-block; padding: 0 8px; border-radius: 6px; background: #eef0ff; color: #3730a3; font-size: 14px; font-weight: 600; line-height: 1.7; white-space: nowrap; }
