#hh-chat-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  background: #3b82f6;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
  z-index: 9998;
  transition: transform 0.2s, background 0.2s;
}

#hh-chat-btn:hover {
  transform: scale(1.1);
  background: #2563eb;
}

#hh-chat-window {
  position: fixed;
  bottom: 96px;
  right: 28px;
  width: 360px;
  max-height: 520px;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 9999;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.18s ease;
}

#hh-chat-window.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}

.hh-header {
  background: #1e293b;
  border-bottom: 1px solid #334155;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.hh-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hh-avatar {
  width: 36px;
  height: 36px;
  background: #1e3a5f;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.hh-header-info h4 {
  color: #f1f5f9;
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.hh-status {
  color: #64748b;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.hh-status::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
  display: inline-block;
}

.hh-close {
  background: transparent;
  border: none;
  color: #475569;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s;
}

.hh-close:hover { color: #94a3b8; }

.hh-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: #334155 transparent;
}

.hh-msg {
  display: flex;
  gap: 8px;
  animation: hhFadeIn 0.2s ease;
}

@keyframes hhFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hh-msg.user { flex-direction: row-reverse; }

.hh-msg-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin-top: 2px;
}

.hh-msg.bot .hh-msg-icon  { background: #1e3a5f; }
.hh-msg.user .hh-msg-icon { background: #1e40af; }

.hh-bubble {
  max-width: 82%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.55;
}

.hh-msg.bot .hh-bubble {
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
  border-bottom-left-radius: 4px;
}

.hh-msg.user .hh-bubble {
  background: #3b82f6;
  color: white;
  border-bottom-right-radius: 4px;
}

.hh-typing {
  display: flex;
  gap: 4px;
  padding: 10px 13px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  width: fit-content;
}

.hh-typing span {
  width: 6px;
  height: 6px;
  background: #3b82f6;
  border-radius: 50%;
  animation: hhBounce 1.2s infinite;
}

.hh-typing span:nth-child(2) { animation-delay: 0.2s; }
.hh-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes hhBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30%            { transform: translateY(-5px); opacity: 1; }
}

.hh-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 0 16px 10px;
  flex-shrink: 0;
}

.hh-sugg {
  background: transparent;
  border: 1px solid #334155;
  color: #93c5fd;
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}

.hh-sugg:hover {
  background: #1e3a5f;
  border-color: #3b82f6;
}

.hh-input-area {
  border-top: 1px solid #1e293b;
  padding: 12px 14px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
  background: #0f172a;
}

.hh-input {
  flex: 1;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 9px 12px;
  color: #f1f5f9;
  font-size: 13px;
  resize: none;
  outline: none;
  min-height: 38px;
  max-height: 90px;
  font-family: inherit;
  line-height: 1.4;
  transition: border-color 0.15s;
}

.hh-input:focus  { border-color: #3b82f6; }
.hh-input::placeholder { color: #475569; }

.hh-send {
  width: 38px;
  height: 38px;
  background: #3b82f6;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  transition: background 0.15s;
  flex-shrink: 0;
}

.hh-send:hover    { background: #2563eb; }
.hh-send:disabled { background: #334155; cursor: not-allowed; }

.hh-footer {
  text-align: center;
  padding: 6px;
  color: #334155;
  font-size: 10px;
  background: #0f172a;
  flex-shrink: 0;
}

@media (max-width: 420px) {
  #hh-chat-window {
    width: calc(100vw - 24px);
    right: 12px;
    bottom: 80px;
  }
  #hh-chat-btn {
    right: 16px;
    bottom: 16px;
  }
}
