/* Helpcho — AI assistant (hero + floating chat). Matches messaging FAB glass/gold. */
.helpcho-hero{
  margin:28px auto 0;padding-top:22px;
  border-top:1px solid rgba(201,168,76,.22);
  max-width:min(560px,100%);
}
.helpcho-hero-glass{
  display:flex;align-items:center;gap:10px;
  box-sizing:border-box;width:100%;
  padding:8px 8px 8px 14px;
  border-radius:var(--lg-radius,18px);
  border:1px solid var(--lg-stroke,rgba(15,15,20,.12));
  background:var(--lg-capsule,rgba(255,255,255,.78));
  box-shadow:var(--lg-shadow,0 12px 40px rgba(15,15,20,.12)), inset 0 1px 0 rgba(255,255,255,.6);
  -webkit-backdrop-filter:blur(22px) saturate(210%);
  backdrop-filter:blur(22px) saturate(210%);
  -apple-visual-effect:-apple-system-glass-material;
  transition:box-shadow .25s var(--lg-ease,ease), border-color .25s ease, transform .2s ease;
}
.helpcho-hero-glass:focus-within{
  border-color:rgba(201,168,76,.5);
  box-shadow:0 16px 48px rgba(15,15,20,.14), 0 0 0 3px rgba(201,168,76,.16), inset 0 1px 0 rgba(255,255,255,.7);
}
.helpcho-hero-badge{
  flex:0 0 auto;
  font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;
  color:var(--gold-dim,#a8872e);
  padding:6px 8px;border-radius:999px;
  background:rgba(201,168,76,.12);
  border:1px solid rgba(201,168,76,.28);
}
.helpcho-hero-input{
  flex:1 1 auto;min-width:0;box-sizing:border-box;
  border:0;background:transparent;outline:none;
  color:var(--text,#1a1a1f);
  font-family:'Barlow',sans-serif;font-size:15px;font-weight:500;
  padding:10px 4px;
}
.helpcho-hero-input::placeholder{color:var(--muted,#8a8a96);font-weight:500}
.helpcho-hero-send{
  flex:0 0 auto;border:1px solid rgba(201,168,76,.35);
  border-radius:var(--lg-radius,14px);
  background:linear-gradient(180deg,#d4b65e,#C9A84C);
  color:#1a1408;font-family:'Barlow',sans-serif;font-size:13px;font-weight:800;
  letter-spacing:.03em;padding:11px 16px;cursor:pointer;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35);
  transition:transform .2s ease, box-shadow .2s ease;
}
.helpcho-hero-send:hover{transform:translateY(-1px)}
.helpcho-hero-send:disabled{opacity:.55;cursor:wait;transform:none}
body.dark .helpcho-hero-glass{
  background:rgba(22,22,28,.72);border-color:rgba(255,255,255,.12);
}
body.dark .helpcho-hero-input{color:#f2f2f4}
body.dark .helpcho-hero-badge{color:var(--gold,#C9A84C)}
.helpcho-chip{
  display:inline-flex;align-items:center;gap:6px;
  padding:7px 11px;border-radius:999px;text-decoration:none!important;
  border:1px solid rgba(201,168,76,.35);
  background:rgba(201,168,76,.08);
  color:var(--text,#1a1a1f)!important;
  font-size:12px;font-weight:700;line-height:1.2;max-width:100%;
}
.helpcho-chip:hover{background:rgba(201,168,76,.16)}
body.dark .helpcho-chip{color:#f2f2f4!important;background:rgba(201,168,76,.12)}

/* Floating stack — above messaging FABs */
.helpcho-float{
  position:fixed;z-index:10020;
  bottom:calc(88px + env(safe-area-inset-bottom,0px));
  right:max(24px,env(safe-area-inset-right,0px));
  display:flex;flex-direction:column;align-items:flex-end;gap:10px;
  font-family:'Barlow',sans-serif;
}
.helpcho-float[hidden]{display:none!important}
body.has-cookie-banner-visible .helpcho-float{
  bottom:calc(184px + env(safe-area-inset-bottom,0px));
}
body.has-cart-open .helpcho-float,
body.modal-open .helpcho-float,
body.ecl-checkout-open .helpcho-float{display:none!important}

/* Scroll-top (gold ↑) sits behind the longer «Асистент» FAB — push it above both FABs. */
body.has-helpcho #scroll-top,
body.has-helpcho.has-messaging-widgets #scroll-top{
  bottom:calc(152px + env(safe-area-inset-bottom,0px));
  right:max(24px,env(safe-area-inset-right,0px));
}
body.has-helpcho.has-cookie-banner-visible #scroll-top,
body.has-helpcho.has-messaging-widgets.has-cookie-banner-visible #scroll-top{
  bottom:calc(248px + env(safe-area-inset-bottom,0px));
}
body.has-cart-open.has-helpcho #scroll-top,
body.modal-open.has-helpcho #scroll-top,
body.ecl-checkout-open.has-helpcho #scroll-top{
  bottom:calc(28px + env(safe-area-inset-bottom,0px));
}

.helpcho-teaser{
  max-width:min(280px,calc(100vw - 40px));
  padding:12px 14px;border-radius:18px;
  background:var(--lg-capsule,rgba(255,255,255,.94));
  border:1px solid var(--lg-stroke,rgba(15,15,20,.12));
  box-shadow:var(--lg-shadow,0 12px 40px rgba(15,15,20,.14)), inset 0 1px 0 rgba(255,255,255,.55);
  -webkit-backdrop-filter:blur(22px) saturate(210%);backdrop-filter:blur(22px) saturate(210%);
  color:var(--lg-text,var(--text,#1a1a1f));
  font-size:13px;font-weight:700;line-height:1.35;cursor:pointer;
  text-align:left;position:relative;
}
.helpcho-teaser[hidden]{display:none!important}
.helpcho-teaser-x{
  position:absolute;top:4px;right:8px;border:none;background:transparent;
  color:var(--muted,#6b6b76);font-size:16px;line-height:1;cursor:pointer;padding:4px;
}
.helpcho-teaser-text{padding-right:18px;display:block}

.helpcho-fab{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  border:1px solid var(--lg-stroke,rgba(15,15,20,.12));
  border-radius:var(--lg-radius,14px);
  background:var(--lg-capsule,rgba(255,255,255,.94));
  color:var(--lg-text,var(--text,#1a1a1f))!important;
  font-size:13px;font-weight:700;letter-spacing:.03em;
  padding:12px 16px 12px 14px;cursor:pointer;
  box-shadow:var(--lg-shadow,0 12px 40px rgba(15,15,20,.14)), inset 0 1px 0 rgba(255,255,255,.55);
  -webkit-backdrop-filter:blur(22px) saturate(210%);backdrop-filter:blur(22px) saturate(210%);
  transition:transform .25s ease, color .2s ease;
}
.helpcho-fab:hover{transform:translateY(-2px);color:var(--gold-dim,#a8872e)!important}
.helpcho-fab-dot{
  width:8px;height:8px;border-radius:50%;background:#C9A84C;flex-shrink:0;
  box-shadow:0 0 0 3px rgba(201,168,76,.25);
}

.helpcho-panel{
  width:min(380px,calc(100vw - 28px));
  height:min(520px,calc(100vh - 140px));
  display:none;flex-direction:column;overflow:hidden;
  border-radius:22px;
  background:var(--lg-capsule,rgba(255,255,255,.97));
  border:1px solid var(--lg-stroke,rgba(15,15,20,.12));
  box-shadow:0 20px 60px rgba(15,15,20,.22), inset 0 1px 0 rgba(255,255,255,.55);
  -webkit-backdrop-filter:blur(22px) saturate(210%);backdrop-filter:blur(22px) saturate(210%);
}
.helpcho-panel.is-open{display:flex}
.helpcho-panel-head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:14px 14px 12px;border-bottom:1px solid rgba(15,15,20,.08);
}
.helpcho-panel-title{font-size:15px;font-weight:800;letter-spacing:.02em;margin:0}
.helpcho-panel-sub{font-size:11px;color:var(--muted,#6b6b76);font-weight:600;margin:2px 0 0}
.helpcho-panel-close{
  border:none;background:transparent;font-size:22px;line-height:1;cursor:pointer;
  color:var(--muted,#6b6b76);padding:4px 6px;
}
.helpcho-msgs{
  flex:1 1 auto;overflow:auto;padding:12px 14px;display:flex;flex-direction:column;gap:10px;
  background:rgba(248,248,250,.65);
}
body.dark .helpcho-msgs{background:rgba(12,12,16,.55)}
.helpcho-msg{
  max-width:92%;padding:10px 12px;border-radius:14px;font-size:13px;line-height:1.45;
  white-space:pre-wrap;word-break:break-word;
}
.helpcho-msg.user{
  align-self:flex-end;background:linear-gradient(180deg,#d4b65e,#C9A84C);color:#1a1408;font-weight:600;
}
.helpcho-msg.bot{
  align-self:flex-start;background:#fff;border:1px solid rgba(15,15,20,.08);color:var(--text,#1a1a1f);
}
body.dark .helpcho-msg.bot{background:rgba(28,28,34,.95);color:#f2f2f4;border-color:rgba(255,255,255,.1)}
.helpcho-msg.bot .helpcho-msg-links,
.helpcho-msg.bot .helpcho-msg-products{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.helpcho-typing{align-self:flex-start;font-size:12px;color:var(--muted,#6b6b76);font-weight:600}
.helpcho-panel-foot{
  display:flex;gap:8px;padding:10px 12px;border-top:1px solid rgba(15,15,20,.08);
}
.helpcho-panel-input{
  flex:1 1 auto;min-width:0;border:1px solid var(--lg-stroke,rgba(15,15,20,.12));
  border-radius:12px;padding:10px 12px;font:inherit;font-size:14px;outline:none;
  background:#fff;color:var(--text,#1a1a1f);
}
body.dark .helpcho-panel-input{background:rgba(22,22,28,.95);color:#f2f2f4;border-color:rgba(255,255,255,.12)}
.helpcho-panel-send{
  border:1px solid rgba(201,168,76,.4);border-radius:12px;
  background:linear-gradient(180deg,#d4b65e,#C9A84C);
  color:#1a1408;font-weight:800;font-size:13px;padding:0 14px;cursor:pointer;
}
.helpcho-panel-send:disabled{opacity:.55;cursor:wait}

@media(max-width:767px){
  .helpcho-float{
    bottom:calc(84px + env(safe-area-inset-bottom,0px));
    right:max(16px,env(safe-area-inset-right,0px));
  }
  body.has-cookie-banner-visible .helpcho-float{
    bottom:calc(196px + env(safe-area-inset-bottom,0px));
  }
  body.has-helpcho #scroll-top,
  body.has-helpcho.has-messaging-widgets #scroll-top{
    bottom:calc(144px + env(safe-area-inset-bottom,0px));
    right:max(16px,env(safe-area-inset-right,0px));
  }
  body.has-helpcho.has-cookie-banner-visible #scroll-top,
  body.has-helpcho.has-messaging-widgets.has-cookie-banner-visible #scroll-top{
    bottom:calc(256px + env(safe-area-inset-bottom,0px));
  }
  .helpcho-hero-row{flex-direction:column}
  .helpcho-hero-send{padding:12px 16px}
  .helpcho-panel{
    width:calc(100vw - 20px);
    height:min(70vh,560px);
    max-height:calc(100vh - 110px);
  }
  .helpcho-fab .helpcho-fab-label{max-width:42vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
