/* =========================================================
   Ishyo Assistant — self-contained widget styles.
   Ported from the approved theme design. Brand tokens are
   scoped to the widget so it renders correctly even if the
   active theme changes.
   ========================================================= */
#help-fab, .help-panel {
  --purple:#8a2889; --purple-deep:#6f1f6e; --amber:#fcaf17; --navy:#1b3967;
  --cream:#f6e6c7; --cream-soft:#fbf3e2; --ink:#241a25; --ink-soft:#5b4f5c;
  --shadow-sm:0 6px 18px rgba(36,18,40,.08);
  --ease:cubic-bezier(.22,.61,.36,1);
  --font-head:"Barlow Condensed", system-ui, sans-serif;
  --font-body:"Barlow", system-ui, sans-serif;
}
#help-fab, .help-panel, .help-panel * { box-sizing:border-box; }
#help-fab { border:none; }
.help-panel button { border:none; background:none; font-family:inherit; cursor:pointer; }

.help-fab{position:fixed;right:22px;bottom:22px;z-index:1000;display:inline-flex;align-items:center;gap:10px;background:var(--purple);color:#fff;border-radius:100px;padding:13px 20px 13px 16px;box-shadow:0 14px 34px rgba(138,40,137,.4);font-family:var(--font-head);font-weight:700;letter-spacing:.02em;font-size:1rem;cursor:pointer;transition:transform .25s var(--ease),background .25s}
.help-fab:hover{transform:translateY(-3px);background:var(--purple-deep)}
.help-fab svg{width:24px;height:24px;fill:none;stroke:#fff;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.help-fab .help-dot{position:absolute;top:8px;right:14px;width:10px;height:10px;border-radius:50%;background:var(--amber);box-shadow:0 0 0 3px var(--purple)}
.help-fab.hidden{display:none}

.help-panel{position:fixed;right:22px;bottom:22px;z-index:1001;width:min(380px,calc(100vw - 32px));height:min(560px,calc(100vh - 100px));background:var(--cream-soft);border-radius:22px;box-shadow:0 30px 70px rgba(36,18,40,.35);display:flex;flex-direction:column;overflow:hidden;opacity:0;transform:translateY(16px) scale(.98);pointer-events:none;transition:opacity .3s var(--ease),transform .3s var(--ease)}
.help-panel.open{opacity:1;transform:none;pointer-events:auto}
.help-head{display:flex;align-items:center;gap:12px;background:var(--purple);color:#fff;padding:16px 18px}
.help-head .help-av{width:42px;height:42px;border-radius:50%;background:#fff;display:grid;place-items:center;flex:0 0 auto}
.help-head .help-av svg{width:26px;height:26px;fill:none;stroke:var(--purple);stroke-width:9;stroke-linecap:round;stroke-linejoin:round}
.help-head .help-av .help-smile-swoosh{position:static;width:34px;height:auto;color:var(--purple);filter:none}
.help-smile-swoosh .smile-swoosh-main,.help-smile-swoosh .smile-swoosh-tip{fill:currentColor;stroke:none}
.help-head .help-tt{flex:1;line-height:1.1}
.help-head .help-tt strong{font-family:var(--font-head);font-weight:700;font-size:1.12rem;display:block}
.help-head .help-tt span{font-size:.78rem;opacity:.85;display:inline-flex;align-items:center;gap:6px}
.help-head .help-tt span::before{content:"";width:8px;height:8px;border-radius:50%;background:#4ade80;display:inline-block}
.help-close{background:rgba(255,255,255,.15);color:#fff;width:34px;height:34px;border-radius:50%;font-size:1.2rem;line-height:1;display:grid;place-items:center;transition:background .2s}
.help-close:hover{background:rgba(255,255,255,.3)}
.help-body{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:12px}
.help-msg{max-width:84%;padding:12px 15px;border-radius:16px;font-size:.95rem;line-height:1.45;animation:helpIn .3s var(--ease)}
.help-msg.bot{align-self:flex-start;background:#fff;color:var(--ink);border-bottom-left-radius:5px;box-shadow:var(--shadow-sm)}
.help-msg.user{align-self:flex-end;background:var(--navy);color:#fff;border-bottom-right-radius:5px}
.help-msg a{color:var(--purple);font-weight:600;text-decoration:underline}
.help-msg.user a{color:var(--cream)}
@keyframes helpIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.help-typing{align-self:flex-start;display:inline-flex;gap:4px;background:#fff;padding:14px 16px;border-radius:16px;border-bottom-left-radius:5px;box-shadow:var(--shadow-sm)}
.help-typing span{width:8px;height:8px;border-radius:50%;background:var(--purple);opacity:.4;animation:helpBlink 1s infinite}
.help-typing span:nth-child(2){animation-delay:.2s}
.help-typing span:nth-child(3){animation-delay:.4s}
@keyframes helpBlink{0%,60%,100%{opacity:.3;transform:translateY(0)}30%{opacity:1;transform:translateY(-4px)}}
.help-chips{display:flex;flex-wrap:wrap;gap:8px;padding:0 18px 12px}
.help-chip{font-family:var(--font-body);font-size:.84rem;color:var(--purple);background:#fff;border:1.5px solid rgba(138,40,137,.25);padding:8px 13px;border-radius:100px;cursor:pointer;transition:background .2s,color .2s;text-align:left}
.help-chip:hover{background:var(--purple);color:#fff;border-color:var(--purple)}
.help-input{display:flex;gap:8px;padding:12px;background:#fff;border-top:1px solid rgba(36,18,40,.08)}
.help-input input{flex:1;min-width:0;border:2px solid rgba(27,57,103,.14);border-radius:100px;padding:11px 16px;font-family:var(--font-body);font-size:.95rem;color:var(--ink);background:var(--cream-soft)}
.help-input input:focus{outline:none;border-color:var(--purple);background:#fff}
.help-send{flex:0 0 auto;width:44px;height:44px;border-radius:50%;background:var(--purple);color:#fff;display:grid;place-items:center;transition:background .2s,transform .2s}
.help-send:hover{background:var(--purple-deep);transform:scale(1.05)}
.help-send svg{width:20px;height:20px;fill:#fff}
.help-note{font-size:.68rem;text-align:center;color:var(--ink-soft);padding:6px 12px 10px;background:#fff}

@media (max-width:560px){
  .help-fab .help-label{display:none}
  .help-fab{padding:14px}
  .help-panel{right:8px;left:8px;bottom:8px;width:auto;height:min(72vh,560px)}
}
