#wm-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

#wm-chat-toggle {
  height: 48px;
  padding: 0 20px;
  border-radius: 24px;
  background: #1a56db;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(26,86,219,0.35);
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
}
#wm-chat-toggle:hover { background: #1447c0; transform: translateY(-1px); }

#wm-chat-box {
  display: none;
  flex-direction: column;
  width: 340px;
  max-height: 520px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  overflow: hidden;
  border: 1px solid #e5e7eb;
}
#wm-chat-box.open { display: flex; }

#wm-chat-header {
  background: #1a56db;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
#wm-chat-avatar {
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
#wm-chat-name { font-weight: 600; font-size: 14px; }
#wm-chat-status {
  font-size: 11px;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 4px;
}
#wm-chat-status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
}
#wm-chat-close {
  margin-left: auto;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  line-height: 1;
}
#wm-chat-close:hover { color: #fff; }

#wm-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 200px;
}

.wm-msg {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.55;
  word-break: break-word;
}
.wm-msg-bot {
  background: #f3f4f6;
  color: #111;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.wm-msg-user {
  background: #1a56db;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.wm-msg-typing {
  background: #f3f4f6;
  align-self: flex-start;
  padding: 12px 16px;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.wm-dots span {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #9ca3af;
  margin: 0 2px;
  animation: wm-bounce 1.2s infinite;
}
.wm-dots span:nth-child(2) { animation-delay: 0.2s; }
.wm-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes wm-bounce {
  0%,80%,100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

.wm-action-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.wm-line-btn {
  display: inline-block;
  padding: 7px 14px;
  background: #06C755;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}
.wm-book-btn {
  display: inline-block;
  padding: 7px 14px;
  background: #f97316;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}

#wm-chat-quick {
  padding: 8px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 1px solid #f0f0f0;
}
.wm-quick-btn {
  padding: 5px 11px;
  background: #eff6ff;
  color: #1a56db;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.wm-quick-btn:hover { background: #dbeafe; }

#wm-chat-input-area {
  display: flex;
  padding: 10px 12px;
  gap: 8px;
  border-top: 1px solid #f0f0f0;
}
#wm-chat-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: border 0.15s;
}
#wm-chat-input:focus { border-color: #1a56db; }
#wm-chat-send {
  padding: 8px 16px;
  background: #1a56db;
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
#wm-chat-send:hover { background: #1447c0; }
#wm-chat-send:disabled { background: #9ca3af; cursor: not-allowed; }

@media (max-width: 400px) {
  #wm-chat-box { width: calc(100vw - 32px); }
  #wm-chat-widget { right: 16px; bottom: 16px; }
}
