/* FlowCAD3D — walking through a project together (js/ui/walk-tools.js, js/3d/avatars.js, js/cloud/walk-session.js)
   and the render engine choice. Colours from the theme tokens of css/app.css; the colour of a participant is --av.
   Tablet mode: every target at least 44 px. */

/* ---------- full screen: only the 3D view ---------- */
body.walk-immersive #topbar, body.walk-immersive #left, body.walk-immersive #right, body.walk-immersive #bottombar,
body.walk-immersive .fc-drawer-handle { display: none !important; }

/* ---------- action bar (right) ---------- */
.wk-acts { position: absolute; right: var(--wk-r); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.wk-act { position: relative; width: 44px; height: 44px; min-width: 44px; padding: 0; justify-content: center; border-radius: 12px;
  background: var(--overlay-bg); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.wk-act .ico { width: 22px; height: 22px; }
.wk-act.active { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.wk-act[data-k="render"][data-mode="realistic"] { color: var(--warn); }
.wk-act[data-k="render"][data-mode="raytrace"] { color: #7C3AED; }
.wk-badge { position: absolute; right: -5px; top: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #16A34A;
  color: #FFFFFF; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bg2); }
.wk-badge[hidden] { display: none; }
/* low drawing area (landscape phone): one row at the bottom between the joystick and the up/down buttons */
.wk-short .wk-acts { flex-direction: row; top: auto; bottom: var(--wk-b); right: auto; left: 50%; transform: translateX(-50%); gap: 4px; }
.wk-short .wk-act { width: 40px; height: 40px; min-width: 40px; }
.wk-touch.wk-short .wk-info { bottom: calc(var(--wk-b) + 50px); }

/* laser pen: object and distance next to the dot */
.wk-linfo { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; gap: 1px; max-width: 280px; padding: 5px 9px;
  border-radius: 8px; background: var(--lbl-bg); color: var(--lbl-fg); font-size: 12px; line-height: 1.35; pointer-events: none; }
.wk-linfo b { font-size: 12px; overflow-wrap: anywhere; }
.wk-linfo span { opacity: .8; font-variant-numeric: tabular-nums; }
.wk-linfo[hidden] { display: none; }
.wk-hud.wk-laser .wk-cross { background: #EF4444; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 0 10px 3px rgba(239, 68, 68, .55); }

/* ---------- participants ---------- */
.wk-people { position: absolute; right: calc(var(--wk-r) + 54px); top: 64px; width: 292px; max-width: calc(100% - 80px); max-height: calc(100% - 150px);
  display: flex; flex-direction: column; background: var(--overlay-bg); border: 1px solid var(--line2); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; z-index: 3; }
.wk-people[hidden] { display: none; }
.wk-p-head { display: flex; align-items: center; gap: 6px; padding: 6px 4px 6px 10px; border-bottom: 1px solid var(--line); }
.wk-p-title { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.wk-p-title .ico { width: 18px; height: 18px; color: var(--accent); }
.wk-p-state { flex: 1; text-align: right; color: var(--fg3); font-size: 12px; }
.wk-p-state.on { color: var(--ok); font-weight: 600; }
.wk-p-x { min-width: 32px; min-height: 32px; }
.wk-p-list { flex: 1 1 auto; overflow: auto; overscroll-behavior: contain; padding: 4px; display: flex; flex-direction: column; gap: 2px; }
.wk-p-note { padding: 8px 6px; color: var(--fg2); font-size: 12px; line-height: 1.45; }
.wk-p-row { display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 6px; border-radius: 8px; }
.wk-p-row:hover { background: var(--bg3); }
.wk-p-row.following { background: var(--accentbg); }
.wk-p-row .btn { min-width: 34px; min-height: 34px; padding: 0 6px; }
.wt-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--av, #F97316); box-shadow: 0 0 0 2px rgba(255, 255, 255, .85); }
.wk-p-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.wk-p-txt b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-p-txt span { color: var(--fg3); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-p-txt .wk-p-ver { color: var(--warn); }
.wk-p-foot { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border-top: 1px solid var(--line); }
.wk-p-foot .btn { flex: 1 1 auto; }
.wk-p-vis { display: flex; align-items: center; gap: 6px; width: 100%; padding: 2px 2px 0; color: var(--fg2); font-size: 12px; }
.wk-p-vis[hidden], .wk-p-foot .btn[hidden] { display: none; }
.wk-narrow .wk-people { left: var(--wk-l); right: calc(var(--wk-r) + 54px); width: auto; max-width: none; }
.wk-touch .wk-p-row .btn, .wk-touch .wk-p-foot .btn, .wk-touch .wk-p-x { min-height: 44px; min-width: 44px; }

/* colleague asks to come over */
.wk-summon { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 8px;
  max-width: min(520px, calc(100% - 24px)); padding: 8px 10px; background: var(--overlay-bg); border: 2px solid var(--av, var(--accent)); border-radius: 12px; box-shadow: var(--shadow); z-index: 4; }
.wk-summon[hidden] { display: none; }
.wk-summon > span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.wk-summon i { width: 12px; height: 12px; border-radius: 50%; background: var(--av, var(--accent)); }

/* ---------- render mode in the settings panel ---------- */
.wk-render { display: flex; flex-direction: column; gap: 4px; }
.wk-rrow { min-height: 34px; flex-direction: column; align-items: stretch !important; gap: 4px; }
.wk-rlabel { flex: none; margin-right: 2px; }
/* the three modes on their own full-width row: "Standaard / Realistisch / Raytracing" always fit */
.wk-rmode { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; min-width: 0; }
.wk-rmode .btn { min-width: 0; justify-content: center; border-radius: 0; font-weight: 600; padding: 0 2px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wk-rmode .btn:first-child { border-radius: 8px 0 0 8px; }
.wk-rmode .btn:last-child { border-radius: 0 8px 8px 0; }
.wk-rmode .btn.active { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.wk-sun { display: flex; flex-direction: column; gap: 2px; }
.wk-sun[hidden] { display: none; }
.wk-sun input[type=range] { flex: 1.2; min-width: 90px; accent-color: var(--accent); }
.wk-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.wk-opts .btn { flex: 1 1 auto; justify-content: center; }
.wk-opts .btn[hidden] { display: none; }

/* path tracing progress */
.wk-rt { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); padding: 5px 12px 7px; border-radius: 16px; background: var(--overlay-bg);
  border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 12px; font-weight: 600; white-space: nowrap; pointer-events: none; overflow: hidden; }
.wk-rt::after { content: ''; position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--p, 0) * 100%); background: #7C3AED; transition: width .2s; }
.wk-rt.err { color: var(--err); }
.wk-rt[hidden] { display: none; }
.wk-short .wk-rt { top: 64px; left: var(--wk-l); transform: none; }

/* ---------- figures: name tags, pointer labels, markers ---------- */
.av-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 7; }
.av-layer[hidden] { display: none; }
.av-tag, .av-ptr, .av-mark, .av-arrow { position: absolute; left: 0; top: 0; will-change: transform; }
.av-tag[hidden], .av-ptr[hidden], .av-mark[hidden], .av-arrow[hidden] { display: none; }
.av-tag { display: flex; align-items: center; gap: 6px; padding: 3px 9px 3px 6px; border-radius: 14px; background: rgba(11, 30, 58, .82); color: #FFFFFF;
  border: 2px solid var(--av); font-size: 12px; white-space: nowrap; box-shadow: 0 2px 8px rgba(11, 30, 58, .35); }
.av-tag i { width: 10px; height: 10px; border-radius: 50%; background: var(--av); }
.av-tag span { opacity: .75; font-size: 11px; font-variant-numeric: tabular-nums; }
.av-tag em { font-style: normal; font-weight: 700; color: var(--av); }
.av-ptr { padding: 3px 8px; border-radius: 8px; background: rgba(11, 30, 58, .82); color: #FFFFFF; border-left: 4px solid var(--av); font-size: 12px; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.av-mark { padding: 4px 10px; border-radius: 10px; background: var(--av); color: var(--ink); font-size: 12px; font-weight: 600; white-space: nowrap; box-shadow: 0 2px 10px rgba(11, 30, 58, .4); }
.av-mark span { font-weight: 500; opacity: .8; margin-left: 4px; font-variant-numeric: tabular-nums; }
.av-arrow { width: 0; height: 0; border-top: 13px solid transparent; border-bottom: 13px solid transparent; border-left: 22px solid var(--av);
  filter: drop-shadow(0 1px 3px rgba(11, 30, 58, .6)); }

/* ---------- status bar: colleagues walking in this project ---------- */
.st-walk { display: inline-flex; align-items: center; gap: 6px; margin-left: 10px; padding: 1px 10px 1px 6px; border: 1px solid #16A34A; border-radius: 12px;
  background: rgba(22, 163, 74, .12); color: inherit; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.st-walk .ico { width: 15px; height: 15px; color: var(--ok); }
.st-walk b { color: var(--ok); }
.st-walk[hidden] { display: none; }
.st-walk:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

/* ---------- invitation ---------- */
.wt-inv-list { display: flex; flex-direction: column; gap: 2px; max-height: 280px; overflow: auto; margin: 8px 0 12px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; }
.wt-inv-row { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 6px; cursor: pointer; }
.wt-inv-row:hover { background: var(--bg3); }
.wt-inv-row.dis { opacity: .6; cursor: default; }
.wt-inv-row b { flex: 1; font-weight: 600; }
.cd-walk .ico { width: 16px; height: 16px; }
.wk-touch.wk-short .wk-act { width: 44px; height: 44px; min-width: 44px; }
