.woo-ai-chatbot {
  --woo-ai-chatbot-panel-bg: #ffffff;
  --woo-ai-chatbot-header-start: #5f46ff;
  --woo-ai-chatbot-header-end: #7447f7;
  --woo-ai-chatbot-ink: #171a29;
  --woo-ai-chatbot-muted: #6f7288;
  --woo-ai-chatbot-border: rgba(97, 82, 168, 0.14);
  --woo-ai-chatbot-shadow: 0 30px 80px rgba(31, 24, 67, 0.22);
  --woo-ai-chatbot-chip: #f4f0ff;
  --woo-ai-chatbot-user-start: #6c59ff;
  --woo-ai-chatbot-user-end: #8d71ff;
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 9999;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
}

.woo-ai-chatbot__toggle {
  align-items: center !important;
  background: #ffffff !important;
  border: 2px solid #000000 !important;
  border-radius: 999px !important;
  color: #000000 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  justify-content: center !important;
  overflow: hidden !important;
  padding: 0 !important;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
  height: 64px !important;
  width: 64px !important;
}

.woo-ai-chatbot__toggle:hover {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.woo-ai-chatbot__toggle.is-attention {
  animation: woo-ai-chatbot-toggle-attention 1.2s ease-in-out 0s 2;
}

.woo-ai-chatbot__toggle-icon,
.woo-ai-chatbot__brand-icon {
  align-items: center;
  display: inline-flex;
  font-size: 17px;
  font-weight: 800;
  justify-content: center;
  letter-spacing: -0.04em;
  text-transform: lowercase;
}

.woo-ai-chatbot__toggle-icon--image,
.woo-ai-chatbot__brand-icon--image {
  box-sizing: border-box;
  display: block !important;
  height: 100% !important;
  object-fit: contain;
  width: 100% !important;
}

.woo-ai-chatbot__toggle-icon--image {
  padding: 8px;
}

.woo-ai-chatbot__toggle-icon--fallback,
.woo-ai-chatbot__brand-icon--fallback {
  align-items: center;
  color: #ffffff;
  display: inline-flex;
  font-size: 17px;
  font-weight: 800;
  height: 100%;
  justify-content: center;
  letter-spacing: -0.04em;
  width: 100%;
}

.woo-ai-chatbot__toggle .woo-ai-chatbot__toggle-icon--fallback {
  color: #000000;
}

.woo-ai-chatbot__panel {
  background: var(--woo-ai-chatbot-panel-bg);
  border: 1px solid var(--woo-ai-chatbot-border);
  border-radius: 24px;
  bottom: 82px;
  box-shadow: var(--woo-ai-chatbot-shadow);
  color: var(--woo-ai-chatbot-ink);
  left: 0;
  max-height: min(720px, calc(100vh - 110px));
  overflow: hidden;
  position: absolute;
  width: min(410px, calc(100vw - 24px));
}

.woo-ai-chatbot__header {
  align-items: center;
  background: linear-gradient(
    135deg,
    var(--woo-ai-chatbot-header-start),
    var(--woo-ai-chatbot-header-end)
  );
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  padding: 16px 18px;
}

.woo-ai-chatbot__brand {
  align-items: center;
  display: flex;
  gap: 12px;
}

.woo-ai-chatbot__brand-icon-wrap {
  height: 45px;
  overflow: hidden;
  width: 45px;
  background: #fff;
  border-radius: 999px;
  padding: 5px;
  border: 2px solid #000;
}

.woo-ai-chatbot__sub {
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  margin-top: 3px;
}

.woo-ai-chatbot__header-actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.woo-ai-chatbot__close {
  background: transparent !important;
  border: 0 !important;
  color: #ffffff !important;
  cursor: pointer !important;
  font-size: 28px !important;
  line-height: 1 !important;
  padding: 0 !important;
}

.woo-ai-chatbot__messages {
  background:
    radial-gradient(
      circle at top left,
      rgba(108, 89, 255, 0.08),
      transparent 38%
    ),
    linear-gradient(180deg, #ffffff, #fbfaff);
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 360px;
  min-height: 320px;
  overflow-y: auto;
  padding: 18px 16px 14px;
}

.woo-ai-chatbot__messages-wrap {
  position: relative;
}

.woo-ai-chatbot__messages-wrap .woo-ai-chatbot__messages {
  padding-top: 36px;
}

.woo-ai-chatbot__message {
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.55;
  max-width: 88%;
  padding: 14px 15px;
  position: relative;
}

.woo-ai-chatbot__message--assistant {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid rgba(117, 98, 194, 0.12);
  box-shadow: 0 14px 28px rgba(41, 33, 79, 0.08);
}

.woo-ai-chatbot__message--user {
  align-self: flex-end;
  background: linear-gradient(
    135deg,
    var(--woo-ai-chatbot-user-start),
    var(--woo-ai-chatbot-user-end)
  );
  box-shadow: 0 14px 26px rgba(109, 89, 255, 0.22);
  color: #ffffff;
}

.woo-ai-chatbot__message--user .woo-ai-chatbot__message-meta {
  color: rgba(255, 255, 255, 0.92);
}

.woo-ai-chatbot__message--user .woo-ai-chatbot__message-name,
.woo-ai-chatbot__message--user .woo-ai-chatbot__message-time {
  color: rgba(255, 255, 255, 0.9);
}

.woo-ai-chatbot__message--user .woo-ai-chatbot__message-time {
  color: rgba(255, 255, 255, 0.78);
}

.woo-ai-chatbot__message-meta {
  align-items: center;
  color: var(--woo-ai-chatbot-muted);
  display: flex;
  font-size: 11px;
  font-weight: 600;
  justify-content: space-between;
  margin-bottom: 6px;
}

.woo-ai-chatbot__message-name {
  color: #313550;
}

.woo-ai-chatbot__message-time {
  color: #8a8ea7;
}

.woo-ai-chatbot__message-body {
  white-space: pre-line;
}

.woo-ai-chatbot__message--typing .woo-ai-chatbot__message-body {
  white-space: normal;
}

.woo-ai-chatbot__typing {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  min-height: 12px;
}

.woo-ai-chatbot__typing > span {
  animation: woo-ai-chatbot-typing-dots 1.15s ease-in-out infinite;
  background: #7c739e;
  border-radius: 999px;
  display: inline-block;
  height: 7px;
  opacity: 0.35;
  width: 7px;
}

.woo-ai-chatbot__typing > span:nth-child(2) {
  animation-delay: 0.15s;
}

.woo-ai-chatbot__typing > span:nth-child(3) {
  animation-delay: 0.3s;
}

.woo-ai-chatbot__message-link {
  color: var(--woo-ai-chatbot-accent, #5c44ff);
  font-weight: 700;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.woo-ai-chatbot__message-link:hover,
.woo-ai-chatbot__message-link:focus {
  color: var(--woo-ai-chatbot-accent-end, #3f2fd4);
}

.woo-ai-chatbot__quick-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 14px 0;
}

.woo-ai-chatbot__quick {
  align-items: center;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    var(--woo-ai-chatbot-chip)
  );
  border: 1px solid var(--woo-ai-chatbot-border);
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(71, 58, 138, 0.07);
  color: #2a2450;
  cursor: pointer;
  display: flex;
  justify-content: center;
  min-height: 50px;
  padding: 10px 12px;
  text-align: center;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.woo-ai-chatbot__quick:hover {
  border-color: rgba(108, 89, 255, 0.28);
  box-shadow: 0 14px 28px rgba(71, 58, 138, 0.12);
  transform: translateY(-1px);
}

.woo-ai-chatbot__quick-title {
  color: #2d235d;
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.woo-ai-chatbot__clear {
  background: transparent !important;
  border: 0 !important;
  color: #6c6494 !important;
  cursor: pointer !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  padding: 0 !important;
  text-decoration: underline !important;
  text-decoration-color: rgba(108, 100, 148, 0.35) !important;
  text-underline-offset: 2px !important;
  transition:
    color 180ms ease,
    text-decoration-color 180ms ease !important;
}

.woo-ai-chatbot__clear--messages {
  position: absolute !important;
  right: 20px;
  top: 0;
  z-index: 2;
}

.woo-ai-chatbot__clear:hover,
.woo-ai-chatbot__clear:focus {
  color: #2f2851 !important;
  text-decoration-color: currentColor;
}

.woo-ai-chatbot__form {
  border-top: 1px solid #f0eef8;
  padding: 10px 16px 10px;
}

.woo-ai-chatbot__composer {
  align-items: flex-end;
  display: flex;
  gap: 10px;
}

.woo-ai-chatbot__input {
  background: #ffffff;
  border: 1px solid rgba(95, 80, 165, 0.16);
  border-radius: 18px;
  box-sizing: border-box;
  color: var(--woo-ai-chatbot-ink);
  flex: 1 1 auto;
  font: inherit;
  max-height: 130px;
  min-height: 40px;
  padding: 8px;
  resize: none;
  width: auto;
}

.woo-ai-chatbot__input:focus {
  border-color: rgba(108, 89, 255, 0.4);
  box-shadow: 0 0 0 4px rgba(108, 89, 255, 0.1);
  outline: none;
}

.woo-ai-chatbot__hp {
  height: 0;
  left: -9999px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  top: auto;
  width: 1px;
}

.woo-ai-chatbot__submit {
  align-items: center;
  align-self: flex-end;
  background: linear-gradient(
    135deg,
    var(--woo-ai-chatbot-user-start),
    var(--woo-ai-chatbot-user-end)
  );
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(109, 89, 255, 0.22);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  height: 44px;
  justify-content: center;
  transition:
    transform 180ms ease,
    opacity 180ms ease;
  width: 44px;
}

.woo-ai-chatbot__submit:hover {
  transform: translateY(-1px);
}

.woo-ai-chatbot__submit:disabled {
  cursor: wait;
  opacity: 0.85;
}

.woo-ai-chatbot__submit.is-loading .woo-ai-chatbot__submit-icon {
  animation: woo-ai-chatbot-pulse 0.9s ease-in-out infinite;
  color: #fff !important;
}

.woo-ai-chatbot__submit-icon {
  color: #fff !important;
}
.woo-ai-chatbot__footer-note {
  color: #8a8ea7;
  font-size: 12px;
  padding: 0 18px 16px;
  text-align: center;
}

.woo-ai-chatbot__footer-note a {
  color: #4d3bf0;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.woo-ai-chatbot__order-status {
  display: grid;
  gap: 10px;
}

.woo-ai-chatbot__order-meta {
  color: #7b7498;
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  font-weight: 600;
  gap: 8px;
}

.woo-ai-chatbot__order-meta-item {
  background: #f6f3ff;
  border-radius: 999px;
  padding: 6px 10px;
}

.woo-ai-chatbot__order-status-label {
  color: #32297b;
  font-size: 17px;
  font-weight: 800;
}

.woo-ai-chatbot__order-status-text {
  color: #2f3348;
}

.woo-ai-chatbot__tracking-wrap {
  background: #f6f3ff;
  border-radius: 14px;
  display: grid;
  gap: 6px;
  margin-top: 2px;
  padding: 12px 13px;
}

.woo-ai-chatbot__tracking-kicker {
  color: #6f649a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.woo-ai-chatbot__tracking-link {
  color: #5c44ff;
  font-weight: 700;
  text-decoration: none;
  word-break: break-word;
}

.woo-ai-chatbot__tracking-link:hover {
  text-decoration: underline;
}

.woo-ai-chatbot__product-response {
  display: grid;
  gap: 14px;
}

.woo-ai-chatbot__product-intro {
  color: #2f3348;
}

.woo-ai-chatbot__product-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.woo-ai-chatbot__product-card {
  background: linear-gradient(180deg, #ffffff, #f9f7ff);
  border: 1px solid rgba(108, 89, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(52, 41, 106, 0.08);
  color: inherit;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.woo-ai-chatbot__product-card:hover {
  border-color: rgba(108, 89, 255, 0.26);
  box-shadow: 0 18px 34px rgba(52, 41, 106, 0.14);
  transform: translateY(-2px);
}

.woo-ai-chatbot__product-image-wrap {
  aspect-ratio: 1 / 1;
  background:
    radial-gradient(
      circle at top left,
      rgba(108, 89, 255, 0.12),
      transparent 42%
    ),
    linear-gradient(180deg, #f7f3ff, #ffffff);
  overflow: hidden;
}

.woo-ai-chatbot__product-image {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.woo-ai-chatbot__product-body {
  display: grid;
  gap: 9px;
  padding: 12px 12px 14px;
}

.woo-ai-chatbot__product-title {
  color: #221a4a;
  display: -webkit-box;
  font-size: 14px;
  font-weight: 800;
  line-clamp: 2;
  line-height: 1.35;
  min-height: 38px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.woo-ai-chatbot__product-summary {
  color: #6c6885;
  display: -webkit-box;
  font-size: 12px;
  line-clamp: 3;
  line-height: 1.5;
  min-height: 54px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.woo-ai-chatbot__product-price {
  color: #2d235d;
  font-size: 15px;
  font-weight: 800;
}

.woo-ai-chatbot__product-price ins {
  text-decoration: none;
}

.woo-ai-chatbot__product-price del {
  color: #8f89aa;
  font-size: 12px;
  font-weight: 500;
  margin-right: 6px;
}

.woo-ai-chatbot__product-cta {
  align-items: center;
  background: linear-gradient(
    135deg,
    var(--woo-ai-chatbot-user-start),
    var(--woo-ai-chatbot-user-end)
  );
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  margin-top: 2px;
  min-height: 34px;
  padding: 0 12px;
}

@keyframes woo-ai-chatbot-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.55;
    transform: scale(0.92);
  }
}

@keyframes woo-ai-chatbot-toggle-attention {
  0% {
    box-shadow: 0 0 0 0 var(--woo-ai-chatbot-border);
    transform: translateY(0) scale(1);
  }

  40% {
    box-shadow:
      0 0 0 14px var(--woo-ai-chatbot-border),
      0 18px 36px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px) scale(1.03);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    transform: translateY(0) scale(1);
  }
}

@keyframes woo-ai-chatbot-typing-dots {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@media (max-width: 640px) {
  .woo-ai-chatbot {
    bottom: 12px;
    left: 12px;
  }

  .woo-ai-chatbot__panel {
    bottom: 76px;
    width: min(390px, calc(100vw - 18px));
  }

  .woo-ai-chatbot__messages {
    max-height: 320px;
    min-height: 280px;
  }

  .woo-ai-chatbot__quick-actions {
    grid-template-columns: 1fr;
  }

  .woo-ai-chatbot__product-grid {
    grid-template-columns: 1fr;
  }
  .woo-ai-chatbot__toggle {
    height: 50px !important;
    width: 50px !important;
    background: #ffffffa7 !important;
  }
}
