/* Luma — LEFT fixed live assistant */
.sbt-ai-root { --sbt-ai-orange: #ff8a22; --sbt-ai-orange-deep: #e86f00; --sbt-ai-ink: #1a2332; --sbt-ai-muted: #5c6b7a; --sbt-ai-bg: #f7f8fa; --sbt-ai-wa: #25d366; font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }

.sbt-ai-toggler {
  position: fixed;
  left: 20px;
  bottom: 24px;
  width: 62px;
  height: 62px;
  padding: 0;
  border: 2.5px solid var(--sbt-ai-orange);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 22px rgba(0,0,0,.18);
  cursor: pointer;
  z-index: 1025;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s ease, opacity .2s ease, visibility .2s ease;
}
.sbt-ai-toggler:hover { transform: scale(1.06); }
.sbt-ai-toggler:focus-visible { outline: 3px solid var(--sbt-ai-orange); outline-offset: 3px; }
.sbt-ai-toggler img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.sbt-ai-toggler .sbt-ai-live {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 14px;
  height: 14px;
  background: #22c55e;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(34,197,94,.5);
  animation: sbt-ai-pulse 2s infinite;
}
@keyframes sbt-ai-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,.45); }
  70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.sbt-ai-toggler .sbt-ai-close-ico {
  display: none;
  font-size: 1.55rem;
  color: var(--sbt-ai-orange-deep);
  line-height: 1;
}
body.sbt-ai-open .sbt-ai-toggler img,
body.sbt-ai-open .sbt-ai-toggler .sbt-ai-live { display: none; }
body.sbt-ai-open .sbt-ai-toggler .sbt-ai-close-ico { display: block; }
body.sbt-ai-open .sbt-ai-toggler { background: #fff7ef; }

.sbt-ai-panel {
  position: fixed;
  left: 20px;
  bottom: 98px;
  width: min(380px, calc(100vw - 28px));
  max-height: min(560px, calc(100vh - 120px));
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0,0,0,.18);
  z-index: 1026;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px) scale(.96);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
  transform-origin: bottom left;
  border: 1px solid rgba(255,138,34,.25);
}
body.sbt-ai-open .sbt-ai-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.sbt-ai-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #ff8a22 0%, #ffb347 100%);
  color: #fff;
}
.sbt-ai-header img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.85);
  object-fit: cover;
  flex-shrink: 0;
}
.sbt-ai-header .sbt-ai-title { flex: 1; min-width: 0; }
.sbt-ai-header .sbt-ai-title strong {
  display: block;
  font-size: .98rem;
  font-weight: 650;
  line-height: 1.2;
}
.sbt-ai-header .sbt-ai-title span {
  display: block;
  font-size: .72rem;
  opacity: .92;
  margin-top: 2px;
}
.sbt-ai-header .sbt-ai-status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 5px;
  vertical-align: middle;
}
.sbt-ai-x {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  opacity: .9;
}
.sbt-ai-x:hover { opacity: 1; }

.sbt-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: var(--sbt-ai-bg);
  min-height: 220px;
  max-height: 340px;
}
.sbt-ai-msg { display: flex; margin-bottom: 10px; }
.sbt-ai-msg.bot { justify-content: flex-start; }
.sbt-ai-msg.user { justify-content: flex-end; }
.sbt-ai-bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: .9rem;
  line-height: 1.45;
  color: var(--sbt-ai-ink);
  word-wrap: break-word;
}
.sbt-ai-msg.bot .sbt-ai-bubble {
  background: #fff;
  border: 1px solid #e8ecf0;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.sbt-ai-msg.user .sbt-ai-bubble {
  background: var(--sbt-ai-orange);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.sbt-ai-bubble a {
  color: #0b6bcb;
  font-weight: 600;
  text-decoration: underline;
}
.sbt-ai-msg.user .sbt-ai-bubble a { color: #fff; }

.sbt-ai-typing {
  display: inline-flex;
  gap: 4px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e8ecf0;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.sbt-ai-typing i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9aa6b2;
  display: block;
  animation: sbt-ai-dot 1s infinite ease-in-out;
}
.sbt-ai-typing i:nth-child(2) { animation-delay: .15s; }
.sbt-ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes sbt-ai-dot {
  0%, 80%, 100% { opacity: .35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.sbt-ai-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
  background: var(--sbt-ai-bg);
}
.sbt-ai-chip {
  border: 1px solid rgba(255,138,34,.45);
  background: #fff;
  color: var(--sbt-ai-orange-deep);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.sbt-ai-chip:hover {
  background: var(--sbt-ai-orange);
  color: #fff;
  border-color: var(--sbt-ai-orange);
}

.sbt-ai-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--sbt-ai-wa);
  color: #fff !important;
  border-radius: 10px;
  font-weight: 650;
  font-size: .85rem;
  text-decoration: none !important;
  border: 0;
  cursor: pointer;
}
.sbt-ai-wa-btn:hover { filter: brightness(.95); color: #fff !important; }

.sbt-ai-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #e8ecf0;
  background: #fff;
}
.sbt-ai-input-row input {
  flex: 1;
  border: 1px solid #d5dbe3;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: .9rem;
  outline: none;
  min-width: 0;
}
.sbt-ai-input-row input:focus { border-color: var(--sbt-ai-orange); box-shadow: 0 0 0 3px rgba(255,138,34,.18); }
.sbt-ai-send {
  border: 0;
  border-radius: 10px;
  background: var(--sbt-ai-orange);
  color: #fff;
  padding: 0 14px;
  font-weight: 650;
  font-size: .88rem;
  cursor: pointer;
  white-space: nowrap;
}
.sbt-ai-send:hover { background: var(--sbt-ai-orange-deep); }
.sbt-ai-send:disabled { opacity: .55; cursor: not-allowed; }

/* Hide when hamburger open — same pattern as WhatsApp FAB */
@media (max-width: 991.98px) {
  body:has(.navbar-collapse.show) .sbt-ai-toggler,
  body:has(.navbar-collapse.show) .sbt-ai-panel {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }
}
@media (max-width: 575.98px) {
  .sbt-ai-toggler { left: 14px; bottom: 16px; width: 56px; height: 56px; }
  .sbt-ai-panel { left: 10px; bottom: 82px; width: calc(100vw - 20px); max-height: calc(100vh - 100px); }
  .sbt-ai-messages { max-height: 280px; }
}

/* Keep right WhatsApp clear; agent is left */
.whatsapp_float,
.whatsapp-float { z-index: 1020; }


/* Luma auto-greeting bubble (near left FAB; session once) */
.sbt-ai-greet {
  position: fixed;
  left: 20px;
  bottom: 96px;
  z-index: 1027;
  max-width: min(220px, calc(100vw - 100px));
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(255,138,34,.45);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
  background: #fff;
  color: var(--sbt-ai-ink);
  font: 650 .82rem/1.35 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(232,111,0,.22), 0 0 0 0 rgba(255,138,34,.35);
  opacity: 0;
  transform: translateY(8px) scale(.96);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease, box-shadow .3s ease;
  animation: sbt-ai-greet-pulse 1.6s ease-out 2;
}
.sbt-ai-greet::after {
  content: "";
  position: absolute;
  left: 18px;
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-right: 1px solid rgba(255,138,34,.45);
  border-bottom: 1px solid rgba(255,138,34,.45);
  transform: rotate(45deg);
}
.sbt-ai-greet.sbt-ai-greet-show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.sbt-ai-greet.sbt-ai-greet-hide {
  opacity: 0;
  transform: translateY(6px) scale(.96);
  pointer-events: none;
}
.sbt-ai-greet:hover {
  background: #fff7ef;
  border-color: var(--sbt-ai-orange);
}
.sbt-ai-greet:focus-visible {
  outline: 3px solid var(--sbt-ai-orange);
  outline-offset: 2px;
}
@keyframes sbt-ai-greet-pulse {
  0% { box-shadow: 0 8px 24px rgba(232,111,0,.22), 0 0 0 0 rgba(255,138,34,.4); }
  50% { box-shadow: 0 8px 24px rgba(232,111,0,.28), 0 0 0 10px rgba(255,138,34,0); }
  100% { box-shadow: 0 8px 24px rgba(232,111,0,.22), 0 0 0 0 rgba(255,138,34,0); }
}
body.sbt-ai-open .sbt-ai-greet {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
@media (max-width: 991.98px) {
  body:has(.navbar-collapse.show) .sbt-ai-greet {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
  }
}
@media (max-width: 575.98px) {
  .sbt-ai-greet { left: 14px; bottom: 84px; max-width: min(200px, calc(100vw - 90px)); font-size: .78rem; }
}
