/* ИИ-ассистент HS — чёрно-белый, острые углы, как сайт */
html.hsai-lock, html.hsai-lock body { overflow: hidden; }
.hsai { position: fixed; inset: 0; z-index: 100000; display: none; font-family: TildaSans, Arial, sans-serif; }
.hsai.on { display: block; }
.hsai-bg { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.hsai-box {
  position: absolute; right: 24px; bottom: 24px; width: 420px; max-width: calc(100vw - 48px);
  height: min(640px, calc(100vh - 48px)); background: #000; color: #fff;
  border: 1px solid rgba(255,255,255,.28); display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.6); animation: hsaiIn .22s ease-out;
}
@keyframes hsaiIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hsai-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 12px 16px 20px; border-bottom: 1px solid rgba(255,255,255,.18);
}
.hsai-hd span { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; }
.hsai-x { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; color: #fff; padding: 0; }
.hsai-x svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.hsai-list { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.hsai-m { max-width: 86%; padding: 12px 14px; font-size: 16px; line-height: 1.45; word-wrap: break-word; }
.hsai-m.b { align-self: flex-start; background: #141414; border: 1px solid rgba(255,255,255,.12); }
.hsai-m.u { align-self: flex-end; background: #fff; color: #000; }
.hsai-m.e a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.hsai-m.t { display: flex; gap: 5px; align-items: center; padding: 16px 14px; }
.hsai-m.t i { width: 6px; height: 6px; background: #fff; border-radius: 50%; opacity: .3; animation: hsaiDot 1s infinite; }
.hsai-m.t i:nth-child(2) { animation-delay: .15s; } .hsai-m.t i:nth-child(3) { animation-delay: .3s; }
@keyframes hsaiDot { 50% { opacity: 1; } }
.hsai-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.hsai-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hsai-chips button {
  background: none; color: #fff; border: 1px solid rgba(255,255,255,.4); padding: 10px 14px; min-height: 44px;
  font: inherit; font-size: 15px; cursor: pointer; border-radius: 0;
}
.hsai-chips button:hover { background: #fff; color: #000; }
.hsai-card { border: 1px solid #fff; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.hsai-cap { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.hsai-req { font-size: 15px; line-height: 1.5; }
.hsai-wa {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 20px;
  background: #fff; color: #000 !important; text-decoration: none !important;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
}
.hsai-wa svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.hsai-ed { background: none; border: 0; color: #fff; font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px 0; align-self: center; min-height: 44px; }
.hsai-in { display: flex; align-items: flex-end; gap: 8px; padding: 12px 12px 8px 20px; border-top: 1px solid rgba(255,255,255,.18); }
.hsai-in textarea {
  flex: 1; resize: none; background: transparent; color: #fff; border: 0; border-bottom: 1px solid rgba(255,255,255,.4);
  font: inherit; font-size: 16px; line-height: 1.4; padding: 10px 0; max-height: 120px; outline: none; border-radius: 0;
}
.hsai-in textarea::placeholder { color: rgba(255,255,255,.5); }
.hsai-in textarea:focus { border-bottom-color: #fff; }
.hsai-in button { width: 48px; height: 48px; flex: none; background: #fff; color: #000; border: 0; cursor: pointer; display: grid; place-items: center; border-radius: 0; }
.hsai-in button:disabled { opacity: .4; cursor: default; }
.hsai-in button svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.8; fill: none; }
.hsai-note { margin: 0; padding: 0 20px 14px; font-size: 12px; line-height: 1.4; color: rgba(255,255,255,.6); }
.hsai-note a { color: rgba(255,255,255,.85); text-decoration: underline; }
@media (max-width: 600px) {
  .hsai-box { inset: 0; right: 0; bottom: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; border: 0; }
  .hsai-list { padding: 16px; }
  .hsai-in { padding: 10px 10px 6px 16px; }
  .hsai-note { padding: 0 16px calc(10px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .hsai-box { animation: none; } .hsai-m.t i { animation: none; opacity: .7; } }
/* поле ввода: перебиваем стили темы Kadence (текст был тёмным на чёрном) */
.hsai .hsai-in textarea, .hsai .hsai-in textarea:focus, .hsai .hsai-in textarea:hover {
  color: #fff !important; -webkit-text-fill-color: #fff; caret-color: #fff;
  background: transparent !important; box-shadow: none !important; outline: none !important;
  border: 0 !important; border-bottom: 1px solid rgba(255,255,255,.4) !important; border-radius: 0 !important;
  padding: 10px 0 !important; font-size: 16px !important; min-height: 0 !important;
}
.hsai .hsai-in textarea:focus { border-bottom-color: #fff !important; }
.hsai .hsai-in textarea::placeholder { color: rgba(255,255,255,.5) !important; -webkit-text-fill-color: rgba(255,255,255,.5); opacity: 1; }
.hsai-time{margin:0;font-size:13px;line-height:1.45;color:rgba(255,255,255,.6);text-align:center}
