.ehd-chat{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:12000;
  font-family:Inter,Arial,sans-serif;
}

.ehd-chat *{box-sizing:border-box;}

.ehd-chat-toggle{
  min-height:48px;
  padding:0 16px;
  border:1px solid #353535;
  border-radius:999px;
  background:#0b0b0b;
  color:#fff;
  display:flex;
  align-items:center;
  gap:9px;
  font:inherit;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  box-shadow:0 12px 35px rgba(0,0,0,.38);
}

.ehd-chat-toggle:hover{background:#151515;border-color:#555;}
.ehd-chat-toggle-dot{width:9px;height:9px;border-radius:50%;background:#7ee787;box-shadow:0 0 0 3px rgba(126,231,135,.12);}

.ehd-chat-panel{
  position:absolute;
  right:0;
  bottom:60px;
  width:min(370px,calc(100vw - 28px));
  height:min(560px,calc(100vh - 120px));
  min-height:430px;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid #2d2d2d;
  border-radius:16px;
  background:#080808;
  color:#f5f5f5;
  box-shadow:0 20px 65px rgba(0,0,0,.58);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(8px) scale(.985);
  transition:opacity .16s ease,transform .16s ease,visibility .16s ease;
}

.ehd-chat.is-open .ehd-chat-panel{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0) scale(1);
}

.ehd-chat-head{
  min-height:62px;
  padding:12px 13px 12px 15px;
  display:flex;
  align-items:center;
  gap:12px;
  background:#0e0e0e;
  border-bottom:1px solid #242424;
}

.ehd-chat-head-copy{min-width:0;flex:1;display:grid;gap:3px;}
.ehd-chat-title{font-size:14px;color:#fff;}
.ehd-chat-subtitle{font-size:10px;color:#777;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}

.ehd-chat-close{
  width:30px;height:30px;border:1px solid #303030;border-radius:50%;
  background:#151515;color:#bbb;font:inherit;font-size:18px;line-height:1;cursor:pointer;
}
.ehd-chat-close:hover{color:#fff;background:#202020;}

.ehd-chat-messages{
  flex:1;
  overflow-y:auto;
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:10px;
  scrollbar-width:thin;
  scrollbar-color:#555 #111;
}

.ehd-chat-msg{max-width:88%;display:grid;gap:6px;}
.ehd-chat-msg--user{align-self:flex-end;}
.ehd-chat-msg--bot{align-self:flex-start;}

.ehd-chat-bubble{
  padding:10px 12px;
  border-radius:12px;
  font-size:12px;
  line-height:1.55;
  white-space:pre-wrap;
}

.ehd-chat-msg--bot .ehd-chat-bubble{background:#141414;border:1px solid #282828;color:#e9e9e9;}
.ehd-chat-msg--user .ehd-chat-bubble{background:#f1f1f1;color:#080808;}

.ehd-chat-links{display:flex;flex-wrap:wrap;gap:6px;}
.ehd-chat-link{
  display:inline-flex;align-items:center;min-height:30px;padding:5px 9px;
  border:1px solid #343434;border-radius:999px;background:#101010;color:#ddd;
  text-decoration:none;font-size:10px;font-weight:600;
}
.ehd-chat-link:hover{background:#1a1a1a;color:#fff;border-color:#555;}

.ehd-chat-suggestions{
  padding:0 12px 10px;
  display:flex;
  gap:6px;
  overflow-x:auto;
  scrollbar-width:none;
}
.ehd-chat-suggestions::-webkit-scrollbar{display:none;}
.ehd-chat-suggestion{
  flex:0 0 auto;
  min-height:30px;
  padding:5px 9px;
  border:1px solid #303030;
  border-radius:999px;
  background:#101010;
  color:#aaa;
  font:inherit;
  font-size:10px;
  cursor:pointer;
}
.ehd-chat-suggestion:hover{color:#fff;border-color:#555;}

.ehd-chat-form{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  padding:11px;
  border-top:1px solid #242424;
  background:#0d0d0d;
}

.ehd-chat-input{
  width:100%;min-width:0;height:39px;padding:0 11px;
  border:1px solid #303030;border-radius:9px;background:#080808;color:#fff;
  font:inherit;font-size:12px;outline:none;
}
.ehd-chat-input:focus{border-color:#666;}

.ehd-chat-send{
  height:39px;padding:0 13px;border:1px solid #ededed;border-radius:9px;
  background:#ededed;color:#090909;font:inherit;font-size:11px;font-weight:800;cursor:pointer;
}
.ehd-chat-send:hover{background:#fff;}
.ehd-chat-send:disabled,.ehd-chat-input:disabled{opacity:.55;cursor:wait;}

@media(max-width:700px){
  .ehd-chat{right:10px;bottom:10px;}
  .ehd-chat-panel{
    position:fixed;
    right:10px;
    left:10px;
    bottom:68px;
    width:auto;
    height:min(72vh,560px);
    min-height:390px;
  }
  .ehd-chat-toggle{min-height:44px;padding:0 14px;font-size:12px;}
}
