body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f2f2f2;
}
#chatWidgetBtn {
  position: fixed; bottom: 20px; right: 20px;
  background: #007bff;
  border: none; border-radius: 50%;
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  z-index: 1000;
  transition: background 0.3s;
}
#chatWidgetBtn:hover { background: #0056b3; }
#chatWidgetBtn svg { width: 28px; height: 28px; }
#chatWidget {
  position: fixed; bottom: 90px; right: 20px; width: 380px; height: 70vh;
  max-height: 720px;
  background: #fff; border: 1px solid #e3e3e3; border-radius: 14px;
  display: none; flex-direction: column; box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  z-index: 1000;
}
#chatHeader {
  background: #0b7dda;
  color: white;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 14px 14px 0 0;
}
#chatBox {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  font-size: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fafafa;
}
.message {
  padding: 10px 14px;
  border-radius: 16px;
  max-width: 80%;
  word-wrap: break-word;
  line-height: 1.5;
  white-space: pre-wrap;
}
.message.user {
  align-self: flex-end;
  background-color: #f1f0f0;
  color: #111;
}
.message.bot {
  align-self: flex-start;
  background-color: #0b7dda;
  color: #fff;
}
.message p { margin: 0 0 6px; }
.message p:last-child { margin: 0; }
.message ul, .message ol { margin: 0 0 6px 20px; padding: 0; }
.message a { color: #fff; text-decoration: underline; }
#chatInput {
  display: flex;
  border-top: 1px solid #e3e3e3;
}
#userMessage {
  flex: 1;
  border: none;
  padding: 12px;
  font-size: 14px;
  outline: none;
}
#sendBtn {
  background: #0b7dda;
  color: white;
  border: none;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 600;
  border-radius: 0 0 14px 0;
}
#quickReplies {
  margin: 8px 12px;
  display: none;
  flex-wrap: wrap;
  gap: 8px;
}
#quickReplies button {
  background: #e6f0ff;
  border: 1px solid #d0e2ff;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  color: #0b7dda;
}

/* Typing indicator */
.typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.typing .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  animation: bounce 1.2s infinite ease-in-out;
}
.typing .dot:nth-child(2) { animation-delay: .15s; }
.typing .dot:nth-child(3) { animation-delay: .3s; }
.message.user .dot { background: #888; }
@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: .7; }
  40% { transform: scale(1); opacity: 1; }
}
@media (max-width: 600px) {
  #chatWidget {
    width: 100vw;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100vh - 20px);
    max-height: none;
    border-radius: 14px 14px 0 0;
  }
  #chatWidgetBtn {
    bottom: 16px; right: 16px;
    width: 56px; height: 56px;
  }
  #sendBtn {
    padding: 14px 16px;
  }
}
