/* Task Helper — edit a workflow AS THE TASK FORM (job-intake §39; REPLY-1295 W2-b). Copyright Rapid Surveys Pty Ltd. Namespace fe2-. */
.fe2-card { max-width:1120px; }
.fe2-head { flex-wrap:wrap; gap:6px 12px; }
.fe2-head .fe2-list { width:auto; min-height:40px; padding:8px 14px; font-size:14px; border-radius:8px; background:var(--bg); color:var(--ink); border:1px solid var(--line); }
.fe2-main { display:flex; gap:16px; align-items:flex-start; margin-top:12px; }
.fe2-form { flex:1 1 auto; min-width:0; }
.fe2-side { flex:0 0 340px; position:sticky; top:var(--fe2-top, 12px); max-height:calc(100vh - var(--fe2-top, 12px) - 12px); overflow-y:auto; }   /* BRIEF-1315: below the editor's own head, scrolling by itself (its head + Save stay in it) */
.fe2-tap * { pointer-events:none; }   /* design mode: the form's own (disabled) controls never swallow the tap — the part takes it */
.fe2-tap { cursor:pointer; border-radius:8px; outline:1px dashed transparent; outline-offset:3px; transition:outline-color .12s, background .12s; }
.fe2-tap:hover, .fe2-tap:focus-visible { outline-color:var(--accent); background:color-mix(in srgb, var(--accent) 6%, transparent); }
.fe2-tap.fe2-on { outline:2px solid var(--accent); background:color-mix(in srgb, var(--accent) 8%, transparent); }
.fe2-form .fe2-add { margin-top:12px; width:auto; }
.fe2-sheet { border:1px solid var(--line); border-radius:12px; background:var(--card); padding:12px 14px; box-shadow:0 6px 24px rgba(20,28,40,.12); }
.fe2-sheet-h { display:flex; align-items:center; gap:8px; }
.fe2-sheet-h h3 { flex:1; margin:0; font-size:16px; }
.fe2-sheet-b { display:flex; flex-direction:column; gap:10px; margin:10px 0; }
.fe2-sheet-f { display:flex; align-items:center; gap:10px; border-top:1px solid var(--line); padding-top:10px; }
.fe2-card .fe2-save { width:auto; min-height:44px; padding:10px 22px; font-size:15px; border-radius:8px; }
.fe2-row { display:flex; align-items:center; gap:8px; font-size:14px; min-height:44px; }
.fe2-row input[type="checkbox"], .fe2-row input[type="radio"] { width:20px; height:20px; margin:0; flex:0 0 auto; }
.fe2-opts { border:1px solid var(--line); border-radius:8px; padding:8px 10px; margin:0; }
.fe2-opts legend { font-size:13px; font-weight:600; padding:0 4px; }
.fe2-picks { display:flex; flex-direction:column; max-height:50vh; overflow:auto; }
.fe2-card .linkbtn { width:auto; background:none; border:0; color:var(--accent); padding:0; font:inherit; text-decoration:underline; cursor:pointer; }
.fe2-side-left .fe2-side { order:-1; }   /* ROUND 40: "+ Add a field" on the LEFT; the form shifts right */
.fe2-addfoot { border-top:1px solid var(--line); padding-top:10px; }
.fe2-card .fe2-editfields { width:auto; margin:0; }
@media (max-width: 767px) {
  .fe2-card > .fe2-head { display:grid; grid-template-columns:minmax(0, 1fr) auto; align-items:center; gap:4px 8px; }   /* beats .th-dhead's flex (BRIEF-1315) */
  .fe2-head h2 { grid-column:1; grid-row:1; min-width:0; overflow-wrap:anywhere; }
  .fe2-head .wf-x { grid-column:2; grid-row:1; }
  .fe2-head .wf-gap { display:none; }
  .fe2-head .fe2-used { grid-column:1; grid-row:2; }
  .fe2-head .fe2-list { grid-column:2; grid-row:2; }
  .fe2-main { display:block; }
  .fe2-side { position:fixed; left:0; right:0; bottom:var(--th-bottom, 0px); top:auto; z-index:70; max-height:min(78vh, calc(100vh - var(--th-top, 0px) - var(--th-bottom, 0px))); overflow:auto; }   /* BRIEF-1307: above the view bar */
  .fe2-sheet { border-radius:14px 14px 0 0; }
  .fe2-has-side .fe2-form { padding-bottom:45vh; }
}
/* W2-c: boxes edited in place */
.fe2-adds { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.fe2-form .fe2-adds .chip { margin:0; }
.fe2-place { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; border-top:1px solid var(--line); padding-top:8px; }
.fe2-place select { width:auto; min-width:150px; margin:0 0 0 6px; }
.fe2-pos { display:inline-flex; gap:6px; }
.fe2-card .wf-mv { min-width:40px; min-height:40px; padding:4px 8px; background:var(--card); color:var(--ink); border:1px solid var(--line); border-radius:8px; }
.fe2-col { flex-direction:column; align-items:stretch; gap:4px; }
.fe2-col input { margin:0; }
.fe2-bitems ol { margin:4px 0 0; padding-left:20px; font-size:14px; }
.fe2-card .fe2-bremove { width:auto; align-self:flex-start; color:var(--err); }
/* "+ Add a field": headings that fold — "No group" + each group (Gary ROUND 37 + 39) */
.fe2-grp { border-bottom:1px solid var(--line); }
.fe2-grp > summary { display:flex; align-items:center; gap:6px; min-height:44px; font-size:14px; font-weight:600; cursor:pointer; list-style:none; }
.fe2-grp > summary::-webkit-details-marker { display:none; }
.fe2-grp > summary::before { content:'▸'; display:inline-block; width:14px; color:var(--muted); }   /* the fold mark Gary asked for (ROUND 39: "v >") */
.fe2-grp[open] > summary::before { content:'▾'; }
.fe2-grp > .fe2-row { padding-left:22px; }
/* BRIEF-1315 THFrame: the panel's head + its Save row stay in reach (the phone sheet scrolls) */
.fe2-sheet { --th-dpad:14px; }
.fe2-sheet .fe2-sheet-h.th-dhead { margin-top:-12px; padding-top:12px; padding-bottom:4px; border-radius:12px 12px 0 0; }
.fe2-sheet .fe2-sheet-f.th-dfoot { border-radius:0 0 12px 12px; }
