/* Floating button */
.chat-widget-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  background: #0b66d1;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 600;
  z-index: 999999;
}

/* Panel */
.chat-widget-panel {
  position: fixed;
  right: 16px;
  bottom: 70px;
  width: 320px;
  height: 420px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 999999;
}

.chat-widget-panel.open {
  display: flex;
}

.chat-widget-header {
  padding: 10px 12px;
  background: #0b66d1;
  color: #fff;
  font-weight: 600;
}

.chat-widget-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Form */
.chat-widget-form {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-widget-form input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.chat-widget-form button {
  padding: 10px;
  border: none;
  border-radius: 6px;
  background: #0b66d1;
  color: #fff;
  cursor: pointer;
}

/* Messages */
.chat-messages {
  /* flex: 1; */
  padding: 10px;
  overflow-y: auto;
  font-size: 14px;
  height: 300px;
}

.chat-msg {
  margin-bottom: 8px;
}

.chat-msg.visitor {
  text-align: right;
}

.chat-msg.agent {
  text-align: left;
}

.chat-msg .bubble {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 10px;
  max-width: 80%;
}

.chat-msg.visitor .bubble {
  background: #0b66d1;
  color: #fff;
}

.chat-msg.agent .bubble {
  background: #f1f1f1;
  color: #000;
}

/* Composer */
.chat-composer {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid #eee;
}

.chat-composer input {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.chat-composer button {
  padding: 8px 12px;
  border-radius: 6px;
  border: none;
  background: #0b66d1;
  color: #fff;
  cursor: pointer;
}