/* ============================================================
   Guided flow — spotlight, coach-marks, virtual cursor
   ============================================================ */

/* ---------- launcher ---------- */
.flow-launcher{
  position:fixed;right:22px;bottom:22px;z-index:75;display:flex;flex-direction:column;align-items:flex-end;gap:10px;
}
.flow-fab{
  display:flex;align-items:center;gap:10px;height:44px;padding:0 20px;border-radius:24px;
  background:var(--blue);color:#fff;font-size:14px;font-weight:500;box-shadow:0 8px 22px rgba(22,119,255,.4);
  transition:transform .15s,box-shadow .15s;
}
.flow-fab:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(22,119,255,.5)}
.flow-fab svg{width:18px;height:18px}
.flow-picker{
  display:none;width:320px;background:#fff;border:1px solid var(--border-2);border-radius:var(--radius-lg);
  box-shadow:var(--tour-shadow);overflow:hidden;
}
.flow-picker.on{display:block}
.flow-picker h4{padding:14px 16px 4px;font-size:14px}
.flow-picker p{padding:0 16px 12px;font-size:12px;color:var(--text-3)}
.flow-picker .fitem{
  display:block;width:100%;text-align:left;padding:12px 16px;border-top:1px solid var(--border);
}
.flow-picker .fitem:hover{background:var(--blue-bg)}
.flow-picker .fitem b{display:block;font-size:14px;font-weight:500}
.flow-picker .fitem small{color:var(--text-3);font-size:12px}

/* ---------- picker: search + "on this page" ----------
   85 walkthroughs across fifteen phase groups is more than a 44vh scroller can
   serve, so the picker gained a filter and pins the flows that open on the
   current screen above everything else. */
.flow-picker{width:382px}
.flow-find{
  display:flex;align-items:center;gap:8px;margin:0 14px 8px;padding:0 10px;height:36px;
  border:1px solid var(--border-input);border-radius:var(--radius);background:#fff;
}
.flow-find:focus-within{border-color:var(--blue);box-shadow:0 0 0 3px rgba(22,119,255,.12)}
.ff-ico{display:flex;color:var(--text-4);line-height:0;flex:0 0 auto}
.ff-ico svg{width:15px;height:15px}
.flow-find input{
  flex:1;min-width:0;border:0;outline:0;background:transparent;font:inherit;font-size:13px;color:var(--text);
}
.flow-find input::-webkit-search-cancel-button{display:none}
.ff-x{
  flex:0 0 auto;display:none;place-items:center;width:20px;height:20px;border-radius:50%;
  color:var(--text-4);line-height:0;
}
.ff-x:hover{background:var(--hover);color:var(--text-2)}
.flow-picker.searching .ff-x{display:grid}
.flow-meta{
  display:flex;align-items:baseline;justify-content:space-between;gap:10px;
  padding:0 16px 8px;font-size:11.5px;color:var(--text-4);
}
.ff-hint{font-size:11px}
.flow-picker .flow-scroll{max-height:52vh}
/* the pinned group reads as the answer, not another phase */
.fgroup.pinned{
  background:var(--blue-bg);margin:0 0 10px;padding-bottom:2px;
  border-top:1px solid #BAE0FF;border-bottom:1px solid #BAE0FF;
}
.fgroup.pinned .fgroup-h{color:#1657b8}
.fgroup.pinned .fitem{border-top-color:#CFE6FA;background:transparent}
.fgroup.pinned .fitem:hover{background:#DCEBFB}
.ph.ph-here{
  background:var(--blue);color:#fff;font-size:8px;display:inline-grid;place-items:center;
}
.fnone{padding:18px 16px 22px !important;font-size:12.5px;line-height:1.55}

/* ---------- spotlight ---------- */
.tour-scrim{position:fixed;inset:0;z-index:80;display:none;pointer-events:none}
.tour-scrim.on{display:block}
.tour-hole{
  position:absolute;border-radius:6px;
  box-shadow:0 0 0 9999px rgba(11,24,45,.55), 0 0 0 3px var(--tour-accent), 0 0 22px 6px rgba(22,119,255,.45);
  transition:top .34s cubic-bezier(.4,0,.2,1),left .34s cubic-bezier(.4,0,.2,1),
             width .34s cubic-bezier(.4,0,.2,1),height .34s cubic-bezier(.4,0,.2,1);
  pointer-events:none;
}
.tour-hole.pulse{animation:holePulse 1.1s ease-in-out infinite}
@keyframes holePulse{
  0%,100%{box-shadow:0 0 0 9999px rgba(11,24,45,.55),0 0 0 3px var(--tour-accent),0 0 22px 6px rgba(22,119,255,.45)}
  50%    {box-shadow:0 0 0 9999px rgba(11,24,45,.55),0 0 0 3px var(--tour-accent),0 0 30px 12px rgba(22,119,255,.65)}
}
/* full-screen step (no target) */
.tour-hole.hidden{box-shadow:0 0 0 9999px rgba(11,24,45,.62);width:0;height:0}

/* ---------- coach mark ---------- */
.coach{
  position:fixed;z-index:82;width:400px;max-width:calc(100vw - 32px);background:#fff;border-radius:10px;
  box-shadow:var(--tour-shadow);padding:18px 20px 16px;display:none;
  transition:top .34s cubic-bezier(.4,0,.2,1),left .34s cubic-bezier(.4,0,.2,1);
}
.coach.on{display:block}
.coach .role-badge{
  display:inline-flex;align-items:center;gap:7px;font-size:11px;font-weight:600;letter-spacing:.4px;
  text-transform:uppercase;padding:3px 9px;border-radius:20px;margin-bottom:10px;
}
.coach .role-badge.employee{background:#E6F4FF;color:#0958D9}
.coach .role-badge.manager{background:#F6EDFF;color:#722ED1}
.coach .role-badge.system{background:#F0F0F0;color:var(--text-2)}
.coach .role-badge img{width:16px;height:16px;border-radius:50%}
.coach h4{font-size:16px;font-weight:600;margin-bottom:6px}
.coach p{font-size:13.5px;line-height:1.5;color:var(--text-2)}
.coach .hint{
  margin-top:10px;font-size:12px;color:var(--blue);background:var(--blue-bg);border-radius:var(--radius);
  padding:7px 10px;display:flex;gap:7px;align-items:flex-start;
}
.coach .hint svg{width:14px;height:14px;flex:0 0 14px;margin-top:1px}
.coach-foot{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:10px}
.coach-foot .btn{height:30px;font-size:13px;padding:0 14px}
.coach-foot .btn svg{margin-right:-2px}
.step-n{display:block;font-size:12px;color:var(--text-3);margin-top:8px}
.coach-progress{height:3px;background:var(--border);border-radius:2px;margin-top:14px;overflow:hidden}
.coach-progress i{display:block;height:100%;background:var(--tour-accent);transition:width .3s ease}

/* arrow */
.coach::after{
  content:'';position:absolute;width:12px;height:12px;background:#fff;transform:rotate(45deg);
}
.coach[data-side="bottom"]::after{top:-6px;left:var(--arrow-x,32px)}
.coach[data-side="top"]::after{bottom:-6px;left:var(--arrow-x,32px)}
.coach[data-side="right"]::after{left:-6px;top:var(--arrow-y,28px)}
.coach[data-side="left"]::after{right:-6px;top:var(--arrow-y,28px)}
.coach[data-side="center"]::after{display:none}

/* ---------- virtual cursor ---------- */
.tour-cursor{
  position:fixed;z-index:86;width:26px;height:26px;pointer-events:none;display:none;
  transition:transform .55s cubic-bezier(.35,.1,.25,1);
  filter:drop-shadow(0 2px 4px rgba(0,0,0,.35));
}
.tour-cursor.on{display:block}
.tour-cursor .ring{
  position:absolute;inset:-9px;border-radius:50%;border:2px solid var(--tour-accent);opacity:0;
}
.tour-cursor.click .ring{animation:clickRing .5s ease-out}
@keyframes clickRing{0%{opacity:.9;transform:scale(.35)}100%{opacity:0;transform:scale(1.5)}}

/* typing caret feedback on inputs driven by the tour */
.tour-typing{box-shadow:0 0 0 2px rgba(22,119,255,.25)!important;border-color:var(--blue)!important}

/* step index panel */
.tour-steps{
  position:fixed;left:0;bottom:0;z-index:82;width:100%;background:rgba(255,255,255,.97);
  border-top:1px solid var(--border-2);padding:9px 18px;display:none;align-items:center;gap:8px;overflow-x:auto;
  box-shadow:0 -4px 16px rgba(0,0,0,.06);
}
.tour-steps.on{display:flex}
.tour-steps .ts{
  display:flex;align-items:center;gap:7px;padding:5px 11px;border-radius:20px;font-size:12px;
  color:var(--text-3);background:var(--hover);white-space:nowrap;flex:0 0 auto;
}
.tour-steps .ts b{width:17px;height:17px;border-radius:50%;background:#D9D9D9;color:#fff;font-size:10px;
  display:grid;place-items:center;font-weight:600}
.tour-steps .ts.done{color:var(--text-2);background:#F0F9EB}
.tour-steps .ts.done b{background:var(--green)}
.tour-steps .ts.cur{color:#fff;background:var(--blue)}
.tour-steps .ts.cur b{background:rgba(255,255,255,.28)}

/* highlighted element gets lifted above the scrim */
.tour-target{position:relative;z-index:81!important}

body.tour-running{overflow:hidden}

/* ---------- "Viewing as" — the role switch, relocated from the topbar ----------
   The live ESS topbar has no role control, so the Employee|Manager|HR switch
   moved here on 14-Sep-2026, into the one panel that is openly mock-only.
   Three equal columns so the widest label (Employee) does not make its button
   larger than the others. */
.flow-as{margin:2px 0 12px;padding:10px 12px;background:var(--page);border:1px solid var(--border);border-radius:8px}
.fas-h{font-size:11.5px;font-weight:600;text-transform:uppercase;letter-spacing:.3px;color:var(--text-2);margin-bottom:8px}
.fas-h small{text-transform:none;letter-spacing:0;font-weight:400;color:var(--text-3);margin-left:6px}
.fas-seg{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.fas-seg button{
  display:flex;align-items:center;gap:7px;padding:7px 8px;border:1px solid var(--border-2);border-radius:7px;
  background:#fff;text-align:left;min-width:0;transition:border-color .12s,background .12s;
}
.fas-seg button:hover{border-color:var(--blue)}
.fas-seg button.on{background:var(--blue-bg);border-color:var(--blue)}
.fas-seg img{width:24px;height:24px;border-radius:50%;object-fit:cover;flex:0 0 auto}
.fas-seg span{display:flex;flex-direction:column;min-width:0;line-height:1.2}
.fas-seg b{font-size:12.5px;font-weight:600;color:var(--text);overflow:hidden;text-overflow:ellipsis}
.fas-seg small{font-size:10.5px;color:var(--text-3);overflow:hidden;text-overflow:ellipsis}
.fas-seg button.on b{color:var(--blue)}
