#woo-ai-chat-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #534ab7;
  border: none;
  cursor: pointer;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
#woo-ai-chat-btn:hover {
  background: #3c3489;
}
#woo-ai-chat-btn svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

#woo-ai-chat-box {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 360px;
  max-height: 560px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  z-index: 99998;
  overflow: hidden;
  transition:
    opacity 0.2s,
    transform 0.2s;
}
#woo-ai-chat-box.wac-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

#wac-header {
  background: #534ab7;
  color: #fff;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#wac-header button {
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

#wac-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wac-msg {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}
.wac-msg.wac-bot {
  background: #f1f0fe;
  color: #26215c;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.wac-msg.wac-user {
  background: #534ab7;
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.wac-typing {
  align-self: flex-start;
  background: #f1f0fe;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  padding: 12px 16px;
  display: flex;
  gap: 5px;
}
.wac-typing span {
  width: 7px;
  height: 7px;
  background: #534ab7;
  border-radius: 50%;
  animation: wac-bounce 0.9s infinite;
}
.wac-typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.wac-typing span:nth-child(3) {
  animation-delay: 0.3s;
}
@keyframes wac-bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-6px);
  }
}

.wac-products {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.wac-product-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.wac-product-card img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}
.wac-product-info {
  flex: 1;
}
.wac-product-name {
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 2px;
}
.wac-product-price {
  font-size: 13px;
  color: #534ab7;
  font-weight: 500;
}
.wac-add-btn {
  background: #534ab7;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 11px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.wac-add-btn:hover {
  background: #3c3489;
}
.wac-add-btn.wac-added {
  background: #3b6d11;
}

#wac-input-row {
  padding: 10px 12px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 8px;
}
#wac-input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  outline: none;
}
#wac-input:focus {
  border-color: #534ab7;
}
#wac-send {
  background: #534ab7;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s;
}
#wac-send:hover {
  background: #3c3489;
}
#wac-send:disabled {
  background: #aaa;
  cursor: default;
}

@media (max-width: 480px) {
  #woo-ai-chat-box {
    width: calc(100vw - 24px);
    right: 12px;
    bottom: 80px;
  }
}
