/* Floating Client Chat Launcher */
.chat-launcher-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 9999;
}
.chat-popup-box {
  display: none;
  position: fixed;
  bottom: 95px;
  right: 24px;
  width: 350px;
  max-width: 90vw;
  height: 460px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  flex-direction: column;
  z-index: 9999;
  border: 1px solid var(--border-color);
  overflow: hidden;
}
.chat-popup-box.active { display: flex; }
.chat-header {
  background: var(--dark);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chat-header small { display: block; color: #22c55e; font-size: 0.75rem; }
.chat-close-btn { background: transparent; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; }
.chat-messages-area {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background: var(--bg-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.msg-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.4;
}
.msg-bubble.agent {
  background: #ffffff;
  color: var(--dark);
  align-self: flex-start;
  border: 1px solid var(--border-color);
}
.msg-bubble.client {
  background: var(--primary);
  color: #ffffff;
  align-self: flex-end;
}
.chat-input-bar {
  display: flex;
  border-top: 1px solid var(--border-color);
  padding: 8px;
  background: #fff;
}
.chat-input-bar input {
  flex: 1;
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 6px;
}
.chat-input-bar button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 14px;
  margin-left: 6px;
  border-radius: 6px;
  cursor: pointer;
}
.chat-footer-action {
  background: #f1f5f9;
  padding: 6px;
  text-align: center;
  font-size: 0.8rem;
}
.chat-wa-direct { color: #15803d; font-weight: 600; text-decoration: none; }