/* Quiz / Test Editor V2 (docs/QUIZ_EDITOR_V2.md). Loaded after style.css and
   live.css: the Live Quiz editor's layout and brand blues (--lq-*), plus the
   few pieces an ordinary quiz needs — type selector, compact scoring, picture
   answer cards, accepted answers and the "ready" card. */
.qe-preview-note { max-width: 1400px; margin: 4px auto 10px; font-size: 0.85rem; color: #fff; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.qe-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--lq-navy); color: #fff; font-weight: 700; font-size: 0.78rem; }
.qe-total { margin: 0 0 10px; font-size: 0.82rem; font-weight: 700; color: var(--lq-navy); }
.qe-chip { white-space: nowrap; }
.qe-chip.is-off { background: #f1f3f6; color: var(--ink-soft); }
.live-qitem-row { flex-wrap: wrap; }

.qe-error-title { font-size: 1.2rem; margin: 0 0 8px; color: var(--lq-navy); }
.qe-error-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 0; }

textarea.qe-desc { margin-top: 10px; width: 100%; border: 1.5px solid var(--lq-line); border-radius: 12px; }
.btn.qe-adddesc { margin-top: 6px; color: var(--accent-2); }
.qe-qmid { margin: 16px 0 20px; }
.qe-qsettings { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); align-items: start; }
.qe-qsettings > .live-section-title, .qe-qsettings > .live-field:nth-child(2) { grid-column: 1 / -1; }
.qe-seg { width: auto; max-width: 100%; flex-wrap: wrap; }
.qe-seg button { flex: 1 1 auto; }
/* Answer type: one row of three equal segments. The 1.5px gaps over the line
   colour draw the dividers; labels may wrap on a narrow phone. */
.qe-typefield { margin: 14px 0 0; }
.qe-typeseg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5px; width: 100%; background: var(--lq-line); }
.qe-typeseg button { background: #fff; min-height: 44px; white-space: normal; line-height: 1.2; }
.qe-typeseg button + button { border-left: 0; }
#qEdit > .vpm-qmedia { margin: 14px 0 0; }
#qEdit > .live-section-title { margin-top: 18px; }
.qe-scoring { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.qe-points { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--lq-navy); flex-wrap: wrap; }
.qe-points input { width: 5.5em; max-width: 5.5em; }
.qe-check { font-weight: 600; color: var(--lq-navy); align-items: flex-start; }
.qe-check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--lq-navy); flex: none; }
.qe-inline-hint { margin: 0; font-weight: 400; }
.hint.qe-tight { margin: 0; }
.qe-gap { margin-top: 16px; }

.qe-ans-foot { justify-content: flex-end; }

/* Pictures: each answer card is a picture drop zone with its caption */
.qe-picgrid { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.qe-pic .qe-picbox { min-height: 170px; flex: none; }
.qe-pic .qe-picbox img { max-height: 180px; }

/* Text answer: accepted answers as compact cards */
.qe-accepted { display: grid; gap: 8px; }
.qe-accepted-row { display: flex; padding: 8px 10px; }
.qe-accepted-row input { flex: 1; min-width: 0; }
.qe-accepted-row .live-ans-letter { background: var(--success); width: 34px; height: 34px; font-size: 1rem; }

/* Created */
.qe-done { max-width: 640px; margin: 20px auto; }
.qe-done-title { font-size: 1.4rem; margin: 0 0 6px; color: var(--lq-navy); }
.qe-linkrow { display: flex; gap: 8px; flex-wrap: wrap; }
.qe-linkrow input { flex: 1 1 220px; min-width: 0; }
.qe-done-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.qe-copy-status { min-height: 1.3em; margin: 0 0 6px; font-weight: 600; color: var(--lq-success-ink); }
.qe-copy-status:empty { min-height: 0; margin: 0; }

@media (max-width: 760px) {
  .qe-preview-note { margin: 2px 0 8px; }
  .qe-picgrid { grid-template-columns: 1fr; }
  .qe-total { display: none; } /* the sidebar is one scrolling row here; the total is in Quiz settings */
}
