/* Havenzi support-chat widget — plain CSS, no framework. */
#hs-chat-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #0e6b3e, #07271c);
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(11, 61, 42, 0.35);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
#hs-chat-btn:hover { transform: scale(1.06); }

#hs-chat-win {
  position: fixed;
  right: 20px;
  bottom: 92px;
  width: min(370px, calc(100vw - 32px));
  height: min(520px, calc(100dvh - 130px));
  min-height: 320px;
  background: #fff;
  border: 1px solid #e7ece9;
  border-radius: 18px;
  box-shadow: 0 20px 48px rgba(11, 61, 42, 0.25);
  z-index: 9999;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: Inter, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
#hs-chat-win.open { display: flex; }

#hs-chat-head {
  background: linear-gradient(135deg, #0b3d2a, #0e6b3e);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#hs-chat-head strong { font-size: 15px; }
#hs-chat-head small { display: block; font-size: 11.5px; opacity: 0.8; font-weight: 400; }
#hs-chat-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
}

#hs-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f7f8f4;
}
.hs-msg {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  overflow-wrap: break-word;
}
.hs-msg.bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e7ece9;
  color: #101828;
  border-bottom-left-radius: 4px;
}
.hs-msg.user {
  align-self: flex-end;
  background: #0e6b3e;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.hs-msg.typing span {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 50%;
  background: #98a2b3;
  animation: hs-blink 1.2s infinite;
}
.hs-msg.typing span:nth-child(2) { animation-delay: 0.2s; }
.hs-msg.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes hs-blink {
  0%, 80%, 100% { opacity: 0.25; }
  40% { opacity: 1; }
}

#hs-chat-form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e7ece9;
  background: #fff;
}
#hs-chat-input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid #e7ece9;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 14px;
  outline: none;
}
#hs-chat-input:focus { border-color: #0e6b3e; }
#hs-chat-send {
  flex-shrink: 0;
  border: none;
  border-radius: 12px;
  background: #0e6b3e;
  color: #fff;
  font-weight: 700;
  padding: 0 16px;
  cursor: pointer;
}
#hs-chat-send:disabled { background: #98a2b3; cursor: wait; }

@media (max-width: 480px) {
  #hs-chat-btn { right: 14px; bottom: 14px; width: 56px; height: 56px; }
  #hs-chat-win { right: 12px; bottom: 82px; }
}
