.ai-shop-chatbot {
  position: fixed;
  bottom: 20px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ai-shop-chatbot--right {
  right: 20px;
}

.ai-shop-chatbot--left {
  left: 20px;
}

.ai-shop-chatbot * {
  box-sizing: border-box;
}

.ai-shop-chatbot__toggle {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border: 0;
  background: var(--ai-shop-primary, #111827);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.ai-shop-chatbot__panel {
  width: 350px;
  max-width: calc(100vw - 32px);
  height: 480px;
  max-height: calc(100vh - 40px);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}

.ai-shop-chatbot__header {
  min-height: 56px;
  padding: 14px 16px;
  background: var(--ai-shop-primary, #111827);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-shop-chatbot__title {
  font-size: 16px;
  line-height: 1.2;
}

.ai-shop-chatbot__close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.ai-shop-chatbot__messages {
  height: 328px;
  padding: 14px;
  overflow-y: auto;
  background: #f9fafb;
}

.ai-shop-chatbot__message {
  max-width: 86%;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.ai-shop-chatbot__message--bot {
  background: #fff;
  color: #111827;
  border: 1px solid #e5e7eb;
  margin-right: auto;
}

.ai-shop-chatbot__message--user {
  background: var(--ai-shop-primary, #111827);
  color: #fff;
  margin-left: auto;
}

.ai-shop-chatbot__form {
  height: 96px;
  padding: 12px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 8px;
  background: #fff;
}

.ai-shop-chatbot__input {
  flex: 1;
  min-width: 0;
  resize: none;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 10px;
  font: inherit;
}

.ai-shop-chatbot__send {
  border: 0;
  border-radius: 12px;
  padding: 0 14px;
  background: var(--ai-shop-primary, #111827);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.ai-shop-chatbot__send:disabled,
.ai-shop-chatbot__input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .ai-shop-chatbot {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .ai-shop-chatbot__panel {
    width: 100%;
  }

  .ai-shop-chatbot__toggle {
    margin-left: auto;
    display: block;
  }
}
