
:root{
  --chat-bg:#11151a;
  --chat-panel:#171c22;
  --chat-line:rgba(255,255,255,.12);
  --chat-gold:#d8aa54;
  --chat-red:#c92031;
  --chat-text:#f6f3ed;
  --chat-muted:#a8afb8;
}
.jha-chat-launcher{
  position:fixed;
  right:22px;
  bottom:22px;
  z-index:9998;
  border:0;
  border-radius:999px;
  padding:14px 18px;
  background:linear-gradient(135deg,#c92031,#8f1421);
  color:#fff;
  font:800 14px/1 Manrope,Arial,sans-serif;
  box-shadow:0 16px 45px rgba(0,0,0,.42);
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:9px;
}
.jha-chat-launcher .dot{
  width:9px;height:9px;border-radius:50%;
  background:#7ef0ad;
  box-shadow:0 0 0 4px rgba(126,240,173,.13);
}
.jha-chat-panel{
  position:fixed;
  right:22px;
  bottom:82px;
  z-index:9999;
  width:min(390px,calc(100vw - 24px));
  max-height:min(650px,calc(100vh - 110px));
  display:flex;
  flex-direction:column;
  overflow:hidden;
  border:1px solid var(--chat-line);
  border-radius:22px;
  background:linear-gradient(145deg,#171b20,#0f1216);
  color:var(--chat-text);
  box-shadow:0 28px 80px rgba(0,0,0,.55);
}
.jha-chat-panel[hidden]{display:none!important}
.jha-chat-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:17px 18px;
  background:linear-gradient(135deg,#15191f,#0b0e12);
  border-bottom:1px solid var(--chat-line);
}
.jha-chat-head strong{display:block;font-size:1rem}
.jha-chat-head small{display:block;margin-top:4px;color:var(--chat-muted);font-size:.72rem}
.jha-chat-close{
  border:0;background:transparent;color:#fff;font-size:1.6rem;cursor:pointer;
}
.jha-chat-body{
  min-height:260px;
  max-height:390px;
  overflow:auto;
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:11px;
}
.jha-chat-message{
  max-width:86%;
  padding:11px 13px;
  border-radius:16px;
  font-size:.85rem;
  line-height:1.45;
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
.jha-chat-message.agent{
  align-self:flex-start;
  background:#222831;
  border:1px solid rgba(216,170,84,.2);
}
.jha-chat-message.customer{
  align-self:flex-end;
  background:linear-gradient(135deg,#8f1421,#c92031);
  color:#fff;
}
.jha-chat-message time{
  display:block;
  margin-top:6px;
  opacity:.68;
  font-size:.62rem;
}
.jha-chat-intake,.jha-chat-compose{
  padding:14px 16px 16px;
  border-top:1px solid var(--chat-line);
  display:grid;
  gap:9px;
}
.jha-chat-intake input,.jha-chat-intake select,.jha-chat-intake textarea,
.jha-chat-compose textarea{
  width:100%;
  min-height:auto!important;
  border:1px solid #343b45!important;
  border-radius:11px!important;
  padding:10px 11px!important;
  background:#0b0e12!important;
  color:#fff!important;
  font:600 .82rem Manrope,Arial,sans-serif!important;
}
.jha-chat-intake textarea,.jha-chat-compose textarea{min-height:78px!important;resize:vertical}
.jha-chat-send{
  border:0;
  border-radius:11px;
  padding:11px 14px;
  background:var(--chat-gold);
  color:#111;
  font-weight:900;
  cursor:pointer;
}
.jha-chat-status{min-height:18px;color:var(--chat-muted);font-size:.7rem}
.jha-chat-status.error{color:#ff9a9a}
.jha-chat-privacy{color:#89919b;font-size:.62rem;line-height:1.4}
.jha-chat-vehicle{
  padding:8px 10px;
  border:1px solid rgba(216,170,84,.24);
  border-radius:10px;
  background:rgba(216,170,84,.07);
  color:#e8d4aa;
  font-size:.72rem;
}
.jha-chat-unread{
  min-width:19px;height:19px;padding:0 5px;border-radius:999px;
  display:none;align-items:center;justify-content:center;
  background:#fff;color:#9a1724;font-size:.67rem;font-weight:900;
}
.jha-chat-unread.show{display:inline-flex}
@media(max-width:600px){
  .jha-chat-launcher{right:12px;bottom:12px}
  .jha-chat-panel{
    right:8px;left:8px;bottom:70px;
    width:auto;max-height:calc(100vh - 90px);
  }
}
