/* Zandi Chat Widget — panel opened by clicking the existing robot icon */
.zht-chat-panel {
  position: fixed;
  left: 20px;
  bottom: 100px;
  width: 340px;
  max-width: 92vw;
  height: 460px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9998;
  font-family: Arial, sans-serif;
}
.zht-chat-panel.open {
  display: flex;
}
.zht-chat-head {
  background: #171b2c;
  color: #fff;
  padding: 12px 12px 12px 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.zht-chat-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.zht-chat-close:hover {
  background: rgba(255, 255, 255, 0.12);
}
.zht-chat-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: #f7f8fa;
}
.zht-chat-msg {
  max-width: 82%;
  padding: 8px 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
}
.zht-chat-msg.user {
  background: #171b2c;
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 2px;
}
.zht-chat-msg.bot {
  background: #e9eaee;
  color: #111;
  margin-right: auto;
  border-bottom-left-radius: 2px;
}
.zht-chat-questions {
  border-top: 1px solid #eee;
  padding: 8px;
  max-height: 160px;
  overflow-y: auto;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.zht-chat-qbtn {
  text-align: left;
  background: #fff;
  border: 1px solid #171b2c;
  color: #171b2c;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 13px;
  cursor: pointer;
}
.zht-chat-qbtn:hover {
  background: #171b2c;
  color: #fff;
}

@media (max-width: 768px) {
  .zht-chat-panel {
    left: 14px;
    bottom: 84px;
  }
}

/* ---- free-text AI input ---- */
.zht-chat-inputrow {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid #eee;
  background: #fff;
}
.zht-chat-input {
  flex: 1;
  min-width: 0;
  border: 1px solid #c9ccd6;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  color: #111;
  background: #fff;
}
.zht-chat-input:focus {
  outline: 2px solid #171b2c;
  outline-offset: 0;
}
.zht-chat-send {
  flex: 0 0 auto;
  width: 40px;
  border: 0;
  border-radius: 8px;
  background: #171b2c;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
.zht-chat-send:disabled { opacity: 0.5; cursor: default; }
.zht-chat-msg.typing { opacity: 0.6; font-style: italic; }
.zht-chat-panel:has(.zht-chat-inputrow) { height: 520px; }
.zht-chat-panel:has(.zht-chat-inputrow) .zht-chat-questions { max-height: 110px; }
