/* ===== Help Chat floating widget - shared across every dashboard page ===== */
.zoxi-help-bubble{
  position:fixed;bottom:22px;right:22px;height:52px;padding:0 20px 0 16px;border-radius:999px;
  background:linear-gradient(135deg,var(--violet),#9333EA);color:#fff;
  display:flex;align-items:center;justify-content:center;gap:9px;cursor:pointer;
  box-shadow:0 8px 24px -6px rgba(124,58,237,.5);z-index:9998;border:none;
  transition:transform .15s ease;
}
.zoxi-help-bubble:hover{transform:scale(1.05);background:#F97316;}
.zoxi-help-bubble svg{width:24px;height:24px;flex-shrink:0;}
.zoxi-help-label{font-family:var(--font-display);font-weight:700;font-size:14px;white-space:nowrap;}
.zoxi-help-badge{
  position:absolute;top:-4px;right:-4px;background:#EF4444;color:#fff;
  font-size:10px;font-weight:700;min-width:18px;height:18px;border-radius:999px;
  display:flex;align-items:center;justify-content:center;padding:0 4px;
  border:2px solid var(--bg);
}

.zoxi-help-panel{
  position:fixed;bottom:90px;right:22px;width:340px;max-width:calc(100vw - 32px);
  height:460px;max-height:calc(100vh - 130px);
  background:var(--surface);border:1px solid var(--border);border-radius:16px;
  box-shadow:0 20px 50px -10px rgba(0,0,0,.25);
  display:none;flex-direction:column;overflow:hidden;z-index:9998;
  font-family:var(--font-body);
}
.zoxi-help-panel.show{display:flex;}

.zoxi-help-header{
  background:linear-gradient(135deg,var(--violet),#9333EA);color:#fff;
  padding:14px 16px;display:flex;align-items:center;justify-content:space-between;
  flex-shrink:0;
}
.zoxi-help-header h4{font-family:var(--font-display);font-size:14px;margin:0;font-weight:700;}
.zoxi-help-header p{font-size:11px;margin:2px 0 0;opacity:.85;}
#zoxiHelpLiveDot{animation:zoxiLivePulse 1.6s ease-in-out infinite;}
@keyframes zoxiLivePulse{
  0%,100%{opacity:1;box-shadow:0 0 0 0 rgba(74,222,128,.6);}
  50%{opacity:.7;box-shadow:0 0 0 4px rgba(74,222,128,0);}
}
.zoxi-help-close{background:rgba(255,255,255,.2);border:none;color:#fff;width:26px;height:26px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.zoxi-help-close:hover{background:rgba(255,255,255,.35);}

.zoxi-help-messages{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;background:var(--bg);}
.zoxi-help-msg{max-width:85%;padding:9px 12px;border-radius:12px;font-size:12.5px;line-height:1.5;word-wrap:break-word;}
.zoxi-help-msg.user{align-self:flex-end;background:linear-gradient(135deg,var(--violet),#9333EA);color:#fff;border-bottom-right-radius:4px;}
.zoxi-help-msg.bot{align-self:flex-start;background:var(--surface);border:1px solid var(--border);color:var(--text);border-bottom-left-radius:4px;}
.zoxi-help-msg.admin{align-self:flex-start;background:rgba(5,150,105,.1);border:1px solid rgba(5,150,105,.3);color:var(--text);border-bottom-left-radius:4px;}
.zoxi-help-msg.admin .zoxi-help-tag{display:block;font-size:10px;font-weight:700;color:#059669;text-transform:uppercase;margin-bottom:3px;}
.zoxi-help-msg.pending{align-self:flex-start;background:rgba(249,115,22,.1);border:1px solid rgba(249,115,22,.3);color:var(--text-muted);font-style:italic;}
/* Perspective-based classes: "me" = whoever is looking at this panel
   right now (right-aligned, purple) - used both by a normal user's own
   messages AND by Super Admin's own replies in admin-view mode. "them"
   = the other party (left-aligned, neutral). This lets the SAME widget
   correctly flip "who's on which side" depending on who's using it. */
.zoxi-help-msg.me{align-self:flex-end;background:linear-gradient(135deg,var(--violet),#9333EA);color:#fff;border-bottom-right-radius:4px;}
.zoxi-help-msg.them{align-self:flex-start;background:var(--surface);border:1px solid var(--border);color:var(--text);border-bottom-left-radius:4px;}
.zoxi-help-msg.them .zoxi-help-tag{display:block;font-size:10px;font-weight:700;color:var(--text-muted);text-transform:uppercase;margin-bottom:3px;}

.zoxi-help-suggestions{padding:0 14px 10px;display:flex;flex-wrap:wrap;gap:6px;background:var(--bg);flex-shrink:0;}
.zoxi-help-chip{background:var(--surface-alt);border:1px solid var(--border);border-radius:999px;padding:5px 11px;font-size:11px;color:var(--text);cursor:pointer;}
.zoxi-help-chip:hover{background:var(--violet);color:#fff;border-color:transparent;}

.zoxi-help-inputbar{display:flex;gap:8px;padding:10px;border-top:1px solid var(--border);background:var(--surface);flex-shrink:0;}
.zoxi-help-inputbar input{flex:1;border:1px solid var(--border);background:var(--bg);color:var(--text);border-radius:10px;padding:9px 12px;font-size:12.5px;font-family:var(--font-body);outline:none;}
.zoxi-help-inputbar button{background:linear-gradient(135deg,var(--violet),#9333EA);color:#fff;border:none;border-radius:10px;width:38px;height:38px;flex-shrink:0;cursor:pointer;display:flex;align-items:center;justify-content:center;}
.zoxi-help-inputbar button:hover{background:#F97316;}
.zoxi-help-inputbar button:disabled{opacity:.5;cursor:not-allowed;}

@media(max-width:600px){
  .zoxi-help-panel{right:16px;bottom:82px;width:calc(100vw - 32px);}
  .zoxi-help-bubble{right:16px;bottom:16px;}
}
