.wpaicdb-bubble {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: none;
  background: #111827;
  color: #fff;
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
  cursor: pointer;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 14px/1 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.wpaicdb-panel {
  position: fixed;
  right: 18px;
  bottom: 86px;
  width: min(360px, calc(100vw - 36px));
  max-height: min(520px, calc(100vh - 120px));
  display: none;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 18px 40px rgba(0,0,0,0.28);
  z-index: 2147483646;
  overflow: hidden;
}

.wpaicdb-panel.wpaicdb-open {
  display: flex;
}

.wpaicdb-header {
  padding: 12px 14px;
  background: #111827;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.wpaicdb-title {
  font: 700 13px/1.2 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.wpaicdb-close {
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: 700 14px/1 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.wpaicdb-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wpaicdb-log {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  padding: 10px;
  background: rgba(17, 24, 39, 0.02);
  height: 180px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wpaicdb-msg {
  display: flex;
}

.wpaicdb-msg.wpaicdb-me {
  justify-content: flex-end;
}

.wpaicdb-bubblemsg {
  max-width: 85%;
  padding: 8px 10px;
  border-radius: 10px;
  background: #eef2ff;
  color: #111827;
  font: 13px/1.35 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  white-space: pre-wrap;
  word-break: break-word;
}

.wpaicdb-msg.wpaicdb-them .wpaicdb-bubblemsg {
  background: #f3f4f6;
}

.wpaicdb-meta {
  font: 11px/1.2 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: rgba(0,0,0,0.55);
  margin-top: 4px;
}

.wpaicdb-input, .wpaicdb-textarea {
  width: 100%;
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.14);
  font: 14px/1.35 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.wpaicdb-textarea {
  resize: vertical;
  min-height: 92px;
  max-height: 240px;
}

.wpaicdb-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.wpaicdb-send {
  border: none;
  background: #2563eb;
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font: 700 13px/1 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

.wpaicdb-status {
  font: 12px/1.2 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: rgba(0,0,0,0.65);
  min-height: 14px;
}
