/* FlowCAD3D — site progress (js/ui/progress.js): tab "Voortgang" of the right panel, 3D legend, offline queue. */
.pg-body { display: flex; flex-direction: column; gap: 6px; }
.pg-body > * { flex-shrink: 0; }
.pg-types { width: 100%; gap: 8px; align-items: center; flex-wrap: nowrap; }
.pg-types .pg-typesel { flex: 1; min-width: 0; width: auto; }
.pg-summary { display: flex; flex-direction: column; gap: 4px; margin: 2px 0; }
.pg-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--bg4); border: 1px solid var(--line); }
.pg-seg { display: block; height: 100%; }
.pg-tools { gap: 6px; }
.pg-tools .pg-search { flex: 1 1 140px; min-width: 0; }
.pg-tools .pg-filter { flex: 0 1 150px; width: auto; }
.pg-acts { gap: 6px; flex-wrap: wrap; align-items: center; }
.pg-acts .grow, .pg-sendrow .grow { flex: 1; }
.pg-chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
.pg-chk input { width: 18px; height: 18px; }
.pg-list { display: flex; flex-direction: column; }
.pg-item { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.pg-item.sel { background: var(--accentbg); }
.pg-item .grow { min-width: 0; }
.pg-item .t1 { font-weight: 600; }
.pg-item .t2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-pick { width: 20px; height: 20px; flex: 0 0 auto; }
.pg-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border: 1px solid var(--line2); border-radius: 12px; font-size: 12px; white-space: nowrap; background: var(--bg2); flex: 0 0 auto; }
.pg-chip.pending { border-style: dashed; border-color: var(--warn); }
.pg-chip.error { border-color: var(--err); }
.pg-chip .pg-pend .ico, .pg-chip .pg-pend svg { width: 13px; height: 13px; }
.pg-chip.pending .pg-pend { color: var(--warn); display: inline-flex; }
.pg-chip.error .pg-pend { color: var(--err); }
.pg-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .18); flex: 0 0 auto; }
.pg-head { display: flex; align-items: flex-start; gap: 8px; margin-top: 4px; }
.pg-head .grow { flex: 1; min-width: 0; }
.pg-title { margin: 0; font-size: 16px; }
.pg-form { display: flex; flex-direction: column; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg3); }
.pg-label { font-weight: 600; font-size: 13px; }
/* big status buttons: easy to hit with a gloved finger */
.pg-stgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.pg-stgrid .pg-st { min-height: 48px; justify-content: flex-start; gap: 8px; padding: 0 10px; background: var(--bg2); text-align: left; }
.pg-stgrid .pg-st .pg-sw { width: 16px; height: 16px; }
.pg-stgrid .pg-st.active { border: 2px solid var(--accent); background: var(--accentbg); font-weight: 700; }
.pg-stgrid.compact .pg-st { min-height: 40px; }
.pg-note { resize: vertical; }
.pg-sendrow { align-items: center; gap: 6px; }
.pg-send { min-height: 44px; padding: 0 18px; font-weight: 700; }
.pg-h { margin: 10px 0 2px; font-size: 13px; }
.pg-history { display: flex; flex-direction: column; gap: 6px; }
.pg-h-row { border-left: 3px solid var(--line2); padding: 4px 0 4px 8px; display: flex; flex-direction: column; gap: 3px; }
.pg-h-row.pending { border-left-color: var(--warn); }
.pg-h-row .row { align-items: center; gap: 6px; }
.pg-h-note { font-size: 13px; white-space: normal; overflow-wrap: anywhere; }
.pg-err { color: var(--err); }
.pg-multibar { position: sticky; bottom: 0; z-index: 2; background: var(--bg2); border-top: 1px solid var(--line2); padding: 6px 0 4px; display: flex; flex-direction: column; gap: 6px; }
.pg-multibar[hidden] { display: none; }
.pg-multibar .row { align-items: center; gap: 6px; }
.pg-queue { border: 1px solid var(--warn); border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 6px; background: var(--bg3); margin-top: 6px; }
.pg-queue.has-error { border-color: var(--err); }
.pg-queue .row { align-items: center; gap: 6px; flex-wrap: wrap; }
.pg-q-ico { color: var(--warn); display: inline-flex; }
.pg-q-row { display: flex; align-items: center; gap: 8px; }
.pg-q-row .grow { min-width: 0; }
.pg-foot { margin-top: 6px; }
.pg-offline { margin: 0; }

/* legend of the status colours (floating over the model view) */
.pg-legend { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 21; width: 300px; max-width: calc(100% - 24px); background: var(--overlay-bg); border: 1px solid var(--line2); border-radius: 10px; box-shadow: var(--shadow); font-size: 13px; color: var(--fg); padding: 4px 10px 8px; }
.pg-lg-head { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); padding: 2px 0 6px; margin-bottom: 4px; }
.pg-lg-title { flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.pg-lg-seg { display: flex; width: 100%; margin: 2px 0 4px; }
.pg-lg-seg .btn { flex: 1; }
.pg-lg-row { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.pg-lg-row .grow { flex: 1; }
.pg-lg-row b { font-variant-numeric: tabular-nums; }
.pg-lg-note { margin-top: 4px; }

/* tablet / phone: 44 px touch targets */
body.mode-touch .pg-item { min-height: 52px; }
body.mode-touch .pg-chk { min-height: 44px; }
body.mode-touch .pg-chk input, body.mode-touch .pg-pick { width: 26px; height: 26px; }
body.mode-touch .pg-body .pg-stgrid .pg-st { min-height: 56px; font-size: 14px; }
body.mode-touch .pg-body .btn, body.mode-touch .pg-legend .btn, body.mode-touch .pg-qdlg .btn { min-height: 44px; min-width: 44px; }
body.mode-touch .pg-tools .inp { min-height: 44px; }
body.mode-touch .pg-note { font-size: 16px; }             /* iOS: no zoom on focus */
@media (max-width: 640px) {
  .pg-stgrid { grid-template-columns: 1fr 1fr; }
  .pg-legend { top: auto; bottom: 64px; }
}
