#tcs-chat-bubble {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  font-family: Inter, system-ui, sans-serif;
}
.tcs-chat-btn-hint {
  position: absolute;
  right: calc(56px + 20px);
  bottom: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.35;
  color: #222;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  border: 0.5px solid #e8e8e8;
  text-align: left;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px) translateY(50%);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.tcs-chat-btn-hint-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(155deg, #ffb020 0%, #ff7a00 55%, #ff5a00 100%);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(255, 100, 0, 0.45);
}
.tcs-chat-btn-hint-text {
  flex: 0 0 auto;
  white-space: nowrap;
}
.tcs-chat-btn-hint.tcs-chat-btn-hint--show {
  opacity: 1;
  transform: translateX(0) translateY(50%);
}
#tcs-chat-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #2aabee;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}
#tcs-chat-btn svg {
  width: 28px;
  height: 28px;
}
#tcs-chat-popup {
  display: none;
  flex-direction: column;
  position: absolute;
  bottom: 68px;
  right: 0;
  width: min(300px, calc(100vw - 40px));
  border-radius: 16px;
  overflow: hidden;
  border: 0.5px solid #ddd;
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}
#tcs-chat-popup.tcs-chat-open {
  display: flex;
}
.tcs-chat-head {
  background: #2aabee;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tcs-chat-head-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tcs-chat-head-avatar svg {
  width: 20px;
  height: 20px;
}
.tcs-chat-head-name {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.tcs-chat-head-status {
  color: rgba(255, 255, 255, 0.85);
  font-size: 11px;
}
.tcs-chat-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
#tcs-chat-messages {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 200px;
  max-height: min(300px, 40vh);
  overflow-y: auto;
  background: #f5f5f5;
}
.tcs-chat-msg-in {
  background: #fff;
  border-radius: 4px 12px 12px 12px;
  padding: 8px 11px;
  font-size: 13px;
  color: #222;
  max-width: 85%;
  align-self: flex-start;
  border: 0.5px solid #e0e0e0;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.tcs-chat-msg-out {
  background: #2aabee;
  border-radius: 12px 4px 12px 12px;
  padding: 8px 11px;
  font-size: 13px;
  color: #fff;
  max-width: 85%;
  align-self: flex-end;
  white-space: pre-wrap;
  word-break: break-word;
}
.tcs-chat-typing {
  background: #fff;
  border-radius: 4px 12px 12px 12px;
  padding: 8px 14px;
  font-size: 13px;
  color: #999;
  align-self: flex-start;
  border: 0.5px solid #e0e0e0;
}
.tcs-chat-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 0.5px solid #e0e0e0;
  background: #fff;
}
.tcs-chat-input-row input {
  flex: 1;
  border: 0.5px solid #ddd;
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 13px;
  outline: none;
}
.tcs-chat-input-row button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #2aabee;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tcs-chat-input-row button svg {
  width: 16px;
  height: 16px;
}
.tcs-chat-powered {
  text-align: center;
  font-size: 10px;
  color: #aaa;
  padding: 6px;
  background: #fff;
}
