/* ---------- The Help assistant (CaptureTech.Platform SuiteHelp, js/suite-help.js) ----------
   A round button at the bottom right of every page of a colleague, and the chat panel it opens above it: 380 by 560 on a
   desktop, the whole screen on a phone. The button rises above what sits at the bottom of a page (a selection bar, the
   CMS's save bar, Field Service's tab bar): the script sets --suite-help-lift. Above the bars (60) and the menus' scrims
   (79, 85), under a dialog (100). The hidden source in the page is never shown. */
html[data-ui="next"] .suite-help-source{display:none !important;}
html[data-ui="next"] .suite-help{--suite-help-lift:0px;font-family:var(--font-body);}

html[data-ui="next"] .suite-help-fab{
  position:fixed;right:20px;bottom:calc(20px + var(--suite-help-lift) + env(safe-area-inset-bottom, 0px));z-index:90;
  width:48px;height:48px;border-radius:50%;border:0;padding:0;cursor:pointer;
  display:inline-flex;align-items:center;justify-content:center;
  background:var(--blue);color:var(--on-accent);box-shadow:var(--shadow-pop);
  transition:background-color .12s ease, transform .15s var(--ease), bottom .2s var(--ease);
}
html[data-ui="next"] .suite-help-fab:hover{background:var(--ct-navy-600);}
html[data-ui="next"] .suite-help-fab:focus-visible{outline:2px solid var(--ct-navy-600);outline-offset:3px;}
html[data-ui="next"] .suite-help-fab svg{width:24px;height:24px;}
html[data-ui="next"] .suite-help.open .suite-help-fab{transform:scale(.92);}

html[data-ui="next"] .suite-help-panel{
  position:fixed;right:20px;bottom:calc(80px + var(--suite-help-lift) + env(safe-area-inset-bottom, 0px));z-index:91;
  width:380px;height:560px;max-width:calc(100vw - 40px);max-height:calc(100vh - 100px - var(--suite-help-lift));
  display:flex;flex-direction:column;
  background:var(--surface);border:1px solid var(--line);border-radius:var(--r-panel);
  box-shadow:0 2px 4px rgba(10,25,50,.06), 0 24px 60px -18px rgba(10,25,50,.42);
  color:var(--ink);font-size:13.5px;line-height:1.5;
}
html[data-ui="next"] .suite-help-panel[hidden]{display:none;}

html[data-ui="next"] .suite-help-head{display:flex;align-items:center;gap:4px;padding:11px 12px 11px var(--pad);border-bottom:1px solid var(--line-soft);flex-shrink:0;}
html[data-ui="next"] .suite-help-title{flex:1;min-width:0;margin:0;font-family:var(--font-head);font-size:15px;font-weight:700;color:var(--ink);}
html[data-ui="next"] .suite-help-title span{font-weight:500;color:var(--ink-3);}

html[data-ui="next"] .suite-help-log{flex:1;min-height:0;overflow-y:auto;padding:14px var(--pad);display:flex;flex-direction:column;gap:10px;}
html[data-ui="next"] .suite-help-intro p{margin:0 0 8px;color:var(--ink-2);}
html[data-ui="next"] .suite-help-suggest-head{font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-4) !important;margin-top:12px !important;}
html[data-ui="next"] .suite-help-suggest{display:flex;flex-direction:column;align-items:flex-start;gap:6px;}
html[data-ui="next"] .suite-help-chip{
  font:inherit;font-size:13px;text-align:left;cursor:pointer;
  padding:6px 10px;border-radius:var(--r-ctl);border:1px solid var(--line);background:var(--surface);color:var(--blue);
  transition:background-color .12s ease, border-color .12s ease;
}
html[data-ui="next"] .suite-help-chip:hover{background:var(--tint);border-color:var(--blue-edge);}
html[data-ui="next"] .suite-help-chip:focus-visible{outline:none;box-shadow:var(--focus-ring);border-color:var(--blue-edge);}
html[data-ui="next"] .suite-help-off{padding:10px 12px;border-radius:var(--r-ctl);background:var(--tint-warn);border:1px solid var(--line);color:var(--ink-2);}

html[data-ui="next"] .suite-help-msg{max-width:92%;padding:8px 11px;border-radius:var(--r-panel);overflow-wrap:anywhere;}
html[data-ui="next"] .suite-help-msg.q{align-self:flex-end;background:var(--tint);color:var(--ink);white-space:pre-wrap;}
html[data-ui="next"] .suite-help-msg.a{align-self:flex-start;background:var(--field);border:1px solid var(--line-soft);}
html[data-ui="next"] .suite-help-msg.error{background:var(--ct-red-100);border-color:var(--line);color:var(--red-dark);}
html[data-ui="next"] .suite-help-body.streaming{white-space:pre-wrap;}
html[data-ui="next"] .suite-help-body p{margin:0 0 .6em;}
html[data-ui="next"] .suite-help-body p:last-child,html[data-ui="next"] .suite-help-body ul:last-child,html[data-ui="next"] .suite-help-body ol:last-child{margin-bottom:0;}
html[data-ui="next"] .suite-help-body h4{margin:.4em 0 .3em;font-size:13.5px;font-weight:700;}
html[data-ui="next"] .suite-help-body ul,html[data-ui="next"] .suite-help-body ol{margin:0 0 .6em;padding-left:20px;}
html[data-ui="next"] .suite-help-body li{margin-bottom:3px;}
html[data-ui="next"] .suite-help-body a{color:var(--blue);text-decoration:underline;}
html[data-ui="next"] .suite-help-body code{font-family:var(--font-mono);font-size:12px;padding:1px 4px;border-radius:4px;background:var(--hover);}
html[data-ui="next"] .suite-help-body strong{font-weight:600;}
html[data-ui="next"] .suite-help-note{margin:.4em 0 0;font-size:12px;color:var(--ink-4);}

html[data-ui="next"] .suite-help-typing{display:inline-flex;gap:4px;padding:4px 0;}
html[data-ui="next"] .suite-help-typing i{width:6px;height:6px;border-radius:50%;background:var(--ink-4);animation:suite-help-dot 1.1s ease-in-out infinite;}
html[data-ui="next"] .suite-help-typing i:nth-child(2){animation-delay:.15s;}
html[data-ui="next"] .suite-help-typing i:nth-child(3){animation-delay:.3s;}
@keyframes suite-help-dot{0%,80%,100%{opacity:.25;transform:translateY(0);}40%{opacity:1;transform:translateY(-2px);}}

html[data-ui="next"] .suite-help-verdict{display:flex;align-items:center;gap:4px;margin-top:6px;font-size:12px;color:var(--ink-4);}
html[data-ui="next"] .suite-help-verdict span{margin-right:2px;}

html[data-ui="next"] .suite-help-form{display:flex;align-items:flex-end;gap:8px;padding:10px 12px 6px;border-top:1px solid var(--line-soft);flex-shrink:0;}
html[data-ui="next"] .suite-help-form textarea{
  flex:1;min-width:0;resize:none;max-height:120px;font:inherit;font-size:13.5px;line-height:1.45;
  padding:7px 10px;border:1px solid var(--line);border-radius:var(--r-ctl);background:var(--field);color:var(--ink);
}
html[data-ui="next"] .suite-help-form textarea:focus{outline:none;border-color:var(--blue-edge);box-shadow:var(--focus-ring);background:var(--surface);}
html[data-ui="next"] .suite-help-form textarea:disabled{opacity:.6;}
html[data-ui="next"] .suite-help-form .btn[hidden]{display:none;}
html[data-ui="next"] .suite-help-foot{margin:0;padding:0 12px 9px;font-size:11.5px;color:var(--ink-4);flex-shrink:0;}

/* Feedback: the panel's second face (the log, the question box and the foot hide). */
html[data-ui="next"] .suite-help-feedback-open{flex-shrink:0;gap:5px;}
html[data-ui="next"] .suite-help-feedback-open[aria-pressed="true"]{background:var(--tint);color:var(--blue);}
html[data-ui="next"] .suite-help-feedback-open svg{width:15px;height:15px;}
html[data-ui="next"] .suite-help-log[hidden],html[data-ui="next"] .suite-help-form[hidden],html[data-ui="next"] .suite-help-foot[hidden]{display:none;}
html[data-ui="next"] .suite-help-feedback{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:10px;padding:14px var(--pad);}
html[data-ui="next"] .suite-help-feedback[hidden]{display:none;}
html[data-ui="next"] .suite-help-feedback-head{margin:0;font-family:var(--font-head);font-size:14px;font-weight:700;color:var(--ink);}
html[data-ui="next"] .suite-help-kinds{border:0;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px;}
html[data-ui="next"] .suite-help-kinds legend{padding:0;margin-bottom:6px;font-size:12.5px;font-weight:600;color:var(--ink-2);}
html[data-ui="next"] .suite-help-kind{display:inline-flex;align-items:center;gap:6px;padding:5px 10px;border:1px solid var(--line);border-radius:var(--r-ctl);cursor:pointer;font-size:13px;}
html[data-ui="next"] .suite-help-kind:has(input:checked){border-color:var(--blue-edge);background:var(--tint);color:var(--blue);}
html[data-ui="next"] .suite-help-kind:has(input:focus-visible){box-shadow:var(--focus-ring);}
html[data-ui="next"] .suite-help-feedback-label{font-size:12.5px;font-weight:600;color:var(--ink-2);}
html[data-ui="next"] .suite-help-feedback textarea{
  width:100%;min-height:120px;resize:vertical;font:inherit;font-size:13.5px;line-height:1.45;
  padding:7px 10px;border:1px solid var(--line);border-radius:var(--r-ctl);background:var(--field);color:var(--ink);
}
html[data-ui="next"] .suite-help-feedback textarea:focus{outline:none;border-color:var(--blue-edge);box-shadow:var(--focus-ring);background:var(--surface);}
html[data-ui="next"] .suite-help-feedback-conv{display:flex;align-items:center;gap:7px;font-size:13px;color:var(--ink-2);cursor:pointer;}
html[data-ui="next"] .suite-help-feedback-conv[hidden]{display:none;}
html[data-ui="next"] .suite-help-feedback-note{margin:0;font-size:11.5px;color:var(--ink-4);}
html[data-ui="next"] .suite-help-feedback-status{margin:0;font-size:13px;color:var(--ct-status-success);}
html[data-ui="next"] .suite-help-feedback-status:empty{display:none;}
html[data-ui="next"] .suite-help-feedback-status.error{color:var(--red-dark);}
html[data-ui="next"] .suite-help-feedback-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:auto;}

/* A phone: the panel is the whole screen, a sheet over the page. */
@media (max-width:640px){
  html[data-ui="next"] .suite-help-fab{right:14px;bottom:calc(14px + var(--suite-help-lift) + env(safe-area-inset-bottom, 0px));}
  html[data-ui="next"] .suite-help-panel{
    inset:0;width:auto;height:auto;max-width:none;max-height:none;border:0;border-radius:0;z-index:95;
    padding-bottom:env(safe-area-inset-bottom, 0px);
  }
  html[data-ui="next"] .suite-help.open .suite-help-fab{display:none;}
}
@media (prefers-reduced-motion:reduce){
  html[data-ui="next"] .suite-help-fab{transition:none;}
  html[data-ui="next"] .suite-help-typing i{animation:none;opacity:.6;}
}
@media print{
  html[data-ui="next"] .suite-help{display:none;}
}
