/* SmartSales AI Lite – minimal, modern widget */
#smartsales-ai.ssai {
  position: fixed;
  bottom: 18px;
  z-index: 999999;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}

#smartsales-ai.ssai.ssai--right { right: 18px; }
#smartsales-ai.ssai.ssai--left { left: 18px; }

#smartsales-ai .ssai__fab {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  display: grid;
  place-items: center;
  position: relative;
  background: var(--ssai-accent, #2563eb);
  color: #fff;
}

#smartsales-ai .ssai__fabIcon { font-size: 22px; line-height: 1; }
#smartsales-ai .ssai__fabDot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.9);
}

#smartsales-ai .ssai__panel {
  width: min(380px, calc(100vw - 36px));
  height: min(540px, calc(100vh - 120px));
  position: absolute;
  bottom: 70px;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0,0,0,0.24);
  border: 1px solid rgba(0,0,0,0.08);
  display: none;
}

#smartsales-ai.ssai.ssai--right .ssai__panel { right: 0; }
#smartsales-ai.ssai.ssai--left .ssai__panel { left: 0; }

#smartsales-ai .ssai__header {
  padding: 14px 14px;
  background: linear-gradient(120deg, var(--ssai-accent, #2563eb), #111827);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#smartsales-ai .ssai__brand { font-weight: 800; letter-spacing: 0.2px; }
#smartsales-ai .ssai__subtitle { opacity: 0.9; font-size: 12px; }

#smartsales-ai .ssai__close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
}

#smartsales-ai .ssai__body {
  padding: 14px;
  height: calc(100% - 140px);
  overflow: auto;
  background: #f8fafc;
}

#smartsales-ai .ssai__msg { display: flex; margin: 10px 0; }
#smartsales-ai .ssai__msg--bot { justify-content: flex-start; }
#smartsales-ai .ssai__msg--user { justify-content: flex-end; }

#smartsales-ai .ssai__bubble {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  border: 1px solid rgba(0,0,0,0.06);
  background: #fff;
}

#smartsales-ai .ssai__msg--user .ssai__bubble {
  background: rgba(37,99,235,0.10);
  border-color: rgba(37,99,235,0.18);
}

#smartsales-ai .ssai__products {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}

#smartsales-ai .ssai__card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
}

#smartsales-ai .ssai__img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #e5e7eb;
  object-fit: cover;
}

#smartsales-ai .ssai__cardTitle { font-weight: 700; font-size: 13px; }
#smartsales-ai .ssai__cardMeta { font-size: 12px; opacity: 0.85; margin-top: 2px; }
#smartsales-ai .ssai__cardActions { margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; }
#smartsales-ai .ssai__btn {
  font-size: 12px;
  padding: 7px 10px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff;
  cursor: pointer;
  text-decoration: none;
  color: #111827;
}
#smartsales-ai .ssai__btn--primary {
  border-color: rgba(37,99,235,0.35);
  background: rgba(37,99,235,0.10);
}

#smartsales-ai .ssai__footer {
  padding: 12px;
  border-top: 1px solid rgba(0,0,0,0.08);
  background: #fff;
}

#smartsales-ai .ssai__hint {
  font-size: 12px;
  opacity: 0.75;
  margin-bottom: 10px;
}

#smartsales-ai .ssai__form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
#smartsales-ai .ssai__input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.12);
  outline: none;
}
#smartsales-ai .ssai__send {
  padding: 10px 14px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  background: var(--ssai-accent, #2563eb);
  color: #fff;
  font-weight: 700;
}

#smartsales-ai .ssai__typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  opacity: 0.8;
  font-size: 12px;
}
#smartsales-ai .ssai__dot {
  width: 6px;
  height: 6px;
  border-radius: 50px;
  background: #94a3b8;
  animation: ssaiBlink 1.2s infinite ease-in-out;
}
#smartsales-ai .ssai__dot:nth-child(2) { animation-delay: 0.15s; }
#smartsales-ai .ssai__dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes ssaiBlink {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40% { transform: translateY(-3px); opacity: 0.95; }
}


/* Open/close state */
.ssai__panel--open{display:flex;flex-direction:column;}
.ssai--open .ssai__panel{display:flex;flex-direction:column;}
