.wg-ai-shop-chatbot {
  position: fixed;
  right: 30px;
  bottom: 90px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.4;
}

.wg-ai-shop-chatbot--right {
  right: 30x;
  left: auto;
}

.wg-ai-shop-chatbot--left {
  left: 24px;
  right: auto;
}

.wg-ai-shop-chatbot.is-open {
  bottom: 24px;
}

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

.wg-ai-shop-chatbot__toggle {
  width: 60px !important;
  height: 60px !important;
  min-width: 60px !important;
  min-height: 60px !important;
  max-width: 60px !important;
  max-height: 60px !important;
  border-radius: 999px !important;
  border: 0 !important;
  background: var(--wg-ai-shop-primary, #111827) !important;
  color: #fff !important;
  font-size: 25px !important;
  line-height: 1 !important;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.26);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  appearance: none;
  -webkit-appearance: none;
}

.wg-ai-shop-chatbot--right .wg-ai-shop-chatbot__toggle {
  margin-left: auto !important;
}

.wg-ai-shop-chatbot--left .wg-ai-shop-chatbot__toggle {
  margin-right: auto !important;
}

.wg-ai-shop-chatbot.is-open .wg-ai-shop-chatbot__toggle,
.wg-ai-shop-chatbot__toggle[hidden] {
  display: none !important;
}

.wg-ai-shop-chatbot__panel {
  width: 360px;
  max-width: calc(100vw - 48px);
  height: 520px;
  max-height: calc(100vh - 48px);
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.95);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.20);
  display: flex;
  flex-direction: column;
}

.wg-ai-shop-chatbot__panel[hidden] {
  display: none !important;
}

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

.wg-ai-shop-chatbot__title {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.wg-ai-shop-chatbot__close {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.10) !important;
  color: #fff !important;
  font-size: 26px !important;
  line-height: 1 !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  appearance: none;
  -webkit-appearance: none;
}

.wg-ai-shop-chatbot__close:hover {
  background: rgba(255, 255, 255, 0.18) !important;
}

.wg-ai-shop-chatbot__messages {
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 14px;
  overflow-y: auto;
  background: #f7f8fb;
}

.wg-ai-shop-chatbot__message {
  max-width: 88%;
  margin: 0 0 10px;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.wg-ai-shop-chatbot__message--bot {
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  margin-right: auto;
  border-bottom-left-radius: 6px;
}

.wg-ai-shop-chatbot__message--user {
  background: var(--wg-ai-shop-primary, #111827);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 6px;
}

.wg-ai-shop-chatbot__form {
  height: 76px !important;
  min-height: 76px !important;
  max-height: 76px !important;
  padding: 14px !important;
  border-top: 1px solid #e5e7eb;
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  background: #fff;
  flex: 0 0 76px !important;
  margin: 0 !important;
}

.wg-ai-shop-chatbot__input {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  resize: none !important;
  overflow-y: auto !important;
  border: 1px solid #d8dde6 !important;
  border-radius: 14px !important;
  padding: 13px 14px !important;
  margin: 0 !important;
  font: inherit !important;
  font-size: 14px !important;
  line-height: 20px !important;
  background: #fff !important;
  color: #111827 !important;
  box-shadow: none !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.wg-ai-shop-chatbot__input:focus {
  border-color: var(--wg-ai-shop-primary, #111827) !important;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.10) !important;
}

.wg-ai-shop-chatbot__send {
  flex: 0 0 auto !important;
  width: 74px !important;
  min-width: 74px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  border: 0 !important;
  border-radius: 14px !important;
  padding: 0 14px !important;
  margin: 0 !important;
  background: var(--wg-ai-shop-primary, #111827) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  line-height: 1 !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

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

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

  .wg-ai-shop-chatbot.is-open {
    bottom: 12px;
  }

  .wg-ai-shop-chatbot__panel {
    width: 100%;
    max-width: 100%;
    height: min(520px, calc(100vh - 24px));
    max-height: calc(100vh - 24px);
    border-radius: 18px;
  }

  .wg-ai-shop-chatbot__toggle {
    margin-left: auto !important;
  }
}

.wg-ai-shop-chatbot__message a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.wg-ai-shop-chatbot__message--bot a {
  color: var(--wg-ai-shop-primary, #111827);
}
