#wpaia-root,
#wpaia-root * {
  box-sizing: border-box;
}

.wpaia-identity-form,.wpaia-privacy-notice{margin:10px;padding:12px;border-radius:12px;background:#f5f5f5;color:#333;font-size:12px}.wpaia-identity-form{display:grid;gap:8px}.wpaia-identity-form input{padding:9px;border:1px solid #ccc;border-radius:8px}.wpaia-identity-form label{display:flex;gap:6px;align-items:flex-start}.wpaia-identity-form button{padding:9px;border:0;border-radius:8px;background:var(--wpaia-accent);color:#fff}

#wpaia-root {
  --wpaia-accent: #1f1720;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999999;
  font-family: inherit;
  color: #241b22;
}

#wpaia-launcher {
  border: 0;
  border-radius: 999px;
  min-height: 54px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  background: var(--wpaia-accent);
  color: #fff;
  box-shadow: 0 10px 32px rgba(25, 15, 24, .22);
  font: inherit;
  font-weight: 700;
}

.wpaia-launcher-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .14);
  font-size: 17px;
}

#wpaia-panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: min(390px, calc(100vw - 28px));
  height: min(610px, calc(100vh - 110px));
  min-height: 430px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(40, 22, 35, .08);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 70px rgba(31, 18, 29, .20);
  transform-origin: bottom right;
  animation: wpaia-in .18s ease-out;
}

#wpaia-panel.wpaia-hidden {
  display: none;
}

@keyframes wpaia-in {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.wpaia-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 17px;
  color: #fff;
  background: var(--wpaia-accent);
}

.wpaia-header strong,
.wpaia-header small {
  display: block;
}

.wpaia-header strong { font-size: 15px; }
.wpaia-header small { margin-top: 3px; opacity: .72; font-size: 11px; }

.wpaia-header-actions { display: flex; gap: 5px; }
.wpaia-header-actions button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255, 255, 255, .10);
  color: #fff;
  font-size: 19px;
  line-height: 1;
}

.wpaia-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 14px;
  background: #fbf9fa;
  scroll-behavior: smooth;
}

.wpaia-message {
  display: flex;
  flex-wrap: wrap;
  margin: 0 0 11px;
}

.wpaia-message .wpaia-bubble {
  max-width: 84%;
  padding: 10px 12px;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.75;
  word-break: break-word;
}

.wpaia-assistant { justify-content: flex-start; }
.wpaia-assistant .wpaia-bubble {
  background: #fff;
  border: 1px solid #eee8eb;
}

#wpaia-root[dir="rtl"] .wpaia-assistant .wpaia-bubble { border-bottom-right-radius: 5px; }
#wpaia-root[dir="ltr"] .wpaia-assistant .wpaia-bubble { border-bottom-left-radius: 5px; }

.wpaia-user { justify-content: flex-end; }
.wpaia-user .wpaia-bubble {
  background: var(--wpaia-accent);
  color: #fff;
}

#wpaia-root[dir="rtl"] .wpaia-user .wpaia-bubble { border-bottom-left-radius: 5px; }
#wpaia-root[dir="ltr"] .wpaia-user .wpaia-bubble { border-bottom-right-radius: 5px; }

.wpaia-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 11px 12px 7px;
  border-top: 1px solid #eee7eb;
  background: #fff;
}

#wpaia-input {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 110px;
  border: 1px solid #e1dadd;
  border-radius: 14px;
  outline: 0;
  padding: 10px 12px;
  font: inherit;
  line-height: 1.55;
  background: #fff;
  color: inherit;
}

#wpaia-input:focus {
  border-color: var(--wpaia-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wpaia-accent) 10%, transparent);
}

#wpaia-send {
  flex: 0 0 44px;
  height: 44px;
  border: 0;
  border-radius: 13px;
  cursor: pointer;
  background: var(--wpaia-accent);
  color: #fff;
  font-size: 18px;
}

#wpaia-root[dir="rtl"] #wpaia-send { transform: rotate(180deg); }
#wpaia-send:disabled { opacity: .45; cursor: default; }

.wpaia-disclaimer {
  padding: 0 12px 9px;
  text-align: center;
  font-size: 9px;
  color: #91868c;
  background: #fff;
}

.wpaia-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  min-height: 36px;
}

.wpaia-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8f848a;
  animation: wpaia-dot 1.1s infinite ease-in-out;
}

.wpaia-typing span:nth-child(2) { animation-delay: .14s; }
.wpaia-typing span:nth-child(3) { animation-delay: .28s; }

@keyframes wpaia-dot {
  0%, 60%, 100% { opacity: .32; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.wpaia-bubble a {
  color: var(--wpaia-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wpaia-actions {
  display: flex;
  flex: 0 0 100%;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
}

.wpaia-action {
  min-height: 38px;
  max-width: 100%;
  padding: 7px 12px;
  border: 1px solid var(--wpaia-accent);
  border-radius: 11px;
  background: #fff;
  color: var(--wpaia-accent);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.wpaia-action:hover { background: #f5f1f3; }
.wpaia-action:disabled { cursor: default; opacity: .65; }
.wpaia-action-success { border-color: #278449; color: #278449; opacity: 1 !important; }
.wpaia-action-feedback {
  flex: 0 0 100%;
  color: #a12622;
  font-size: 12px;
  line-height: 1.5;
}

.wpaia-products {
  display: grid;
  flex: 0 0 100%;
  gap: 9px;
  width: 100%;
  margin-top: 8px;
}

.wpaia-product-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #e8e0e4;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(31, 18, 29, .06);
}

.wpaia-product-card.wpaia-product-no-image { grid-template-columns: 1fr; }
.wpaia-product-image-wrap { width: 92px; min-width: 0; min-height: 124px; background: #f4f1f2; }
.wpaia-product-image { display: block; width: 100%; max-width: 100%; height: 100%; min-height: 124px; object-fit: cover; }
.wpaia-product-body { min-width: 0; padding: 10px; }
.wpaia-product-name { display: block; font-size: 13px; line-height: 1.55; }
.wpaia-product-price { margin-top: 5px; color: var(--wpaia-accent); font-size: 13px; font-weight: 700; }
.wpaia-product-price del { margin-inline-end: 5px; color: #8d8388; font-weight: 400; }
.wpaia-product-price ins { text-decoration: none; }
.wpaia-product-regular-price { margin-inline-end: 5px; color: #8d8388; font-weight: 400; text-decoration: line-through; }
.wpaia-product-sale-price { color: var(--wpaia-accent); font-weight: 700; }
.wpaia-product-stock { margin-top: 4px; font-size: 12px; }
.wpaia-product-stock.is-in-stock { color: #257542; }
.wpaia-product-stock.is-out-of-stock { color: #a12622; }
.wpaia-product-controls { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.wpaia-product-link,
.wpaia-product-add {
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid var(--wpaia-accent);
  border-radius: 9px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
  cursor: pointer;
}
.wpaia-product-link { background: #fff; color: var(--wpaia-accent); }
.wpaia-product-add { background: var(--wpaia-accent); color: #fff; }
.wpaia-product-add:disabled { cursor: default; opacity: .65; }

@media (max-width: 520px) {
  #wpaia-root { right: 12px; bottom: 12px; }
  #wpaia-panel {
    position: fixed;
    inset: 10px;
    width: auto;
    height: auto;
    max-height: none;
    border-radius: 18px;
  }
  .wpaia-launcher-label { display: none; }
  #wpaia-launcher { width: 56px; height: 56px; padding: 0; justify-content: center; }
  .wpaia-launcher-icon { background: transparent; }
  .wpaia-product-card { grid-template-columns: 82px minmax(0, 1fr); }
  .wpaia-product-image-wrap { width: 82px; }
}
