:root {
  --website-chatbot-bg: #ffffff;
  --website-chatbot-fg: #111827;
  --website-chatbot-muted: rgba(17, 24, 39, 0.65);
  --website-chatbot-border: rgba(17, 24, 39, 0.12);
  --website-chatbot-primary: #111827;
  --website-chatbot-primary-fg: #ffffff;
  --website-chatbot-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
}

#website-chatbot-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2147483000;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--website-chatbot-fg);
}

#website-chatbot-toggle {
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  border: 1px solid var(--website-chatbot-border);
  background: var(--website-chatbot-primary);
  color: var(--website-chatbot-primary-fg);
  box-shadow: var(--website-chatbot-shadow);
  display: grid;
  place-items: center;
  cursor: pointer;
}

#website-chatbot-toggle:focus {
  outline: 2px solid rgba(59, 130, 246, 0.6);
  outline-offset: 2px;
}

#website-chatbot-popup {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(360px, calc(100vw - 36px));
  height: min(520px, calc(100vh - 120px));
  background: var(--website-chatbot-bg);
  border: 1px solid var(--website-chatbot-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--website-chatbot-shadow);
  display: flex;
  flex-direction: column;
}

#website-chatbot-popup[hidden] {
  display: none;
}

.website-chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px;
  border-bottom: 1px solid var(--website-chatbot-border);
  background: rgba(17, 24, 39, 0.02);
}

.website-chatbot-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 18px;
}

.website-chatbot-close {
  border: 1px solid var(--website-chatbot-border);
  background: #fff;
  border-radius: 10px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.website-chatbot-messages {
  padding: 12px;
  flex: 1;
  overflow: auto;
  background: #fff;
}

.website-chatbot-row {
  display: flex;
  margin: 10px 0;
}

.website-chatbot-row.user {
  justify-content: flex-end;
}

.website-chatbot-row.assistant {
  justify-content: flex-start;
}

.website-chatbot-bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--website-chatbot-border);
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 18px;
}

.website-chatbot-row.user .website-chatbot-bubble {
  background: var(--website-chatbot-primary);
  color: var(--website-chatbot-primary-fg);
  border-color: rgba(255, 255, 255, 0.15);
}

.website-chatbot-row.assistant .website-chatbot-bubble {
  background: rgba(17, 24, 39, 0.03);
  color: var(--website-chatbot-fg);
}

.website-chatbot-footer {
  border-top: 1px solid var(--website-chatbot-border);
  padding: 10px;
  background: #fff;
}

.website-chatbot-lead {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.website-chatbot-lead input {
  width: 100%;
  padding: 10px 10px;
  border: 1px solid var(--website-chatbot-border);
  border-radius: 10px;
  font-size: 13px;
}

.website-chatbot-lead button {
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid var(--website-chatbot-border);
  background: rgba(17, 24, 39, 0.06);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}

.website-chatbot-compose {
  display: grid;
  grid-template-columns: 1fr 44px;
  gap: 8px;
  align-items: end;
}

.website-chatbot-compose textarea {
  resize: none;
  width: 100%;
  min-height: 44px;
  max-height: 120px;
  padding: 10px 10px;
  border: 1px solid var(--website-chatbot-border);
  border-radius: 12px;
  font-size: 13px;
  line-height: 18px;
}

.website-chatbot-send {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--website-chatbot-border);
  background: var(--website-chatbot-primary);
  color: var(--website-chatbot-primary-fg);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.website-chatbot-hint {
  margin: 0 0 10px 0;
  color: var(--website-chatbot-muted);
  font-size: 12px;
  line-height: 16px;
}

.website-chatbot-send[disabled],
.website-chatbot-lead button[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

