#sa-widget{
  opacity: 1;
  pointer-events: auto;
  transition: opacity .12s ease;
}

.sa-widget { position: fixed; right: 18px; bottom: 18px; z-index: 9999; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
.sa-bubble{
  border: none;
  background: transparent;
  padding: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateZ(0);
}

.sa-bubble:hover { transform: translateY(-2px); }
.sa-bubble .sa-logo{
  width: 80px;
  height: 80px;

}
.sa-bubble:hover .sa-logo{ transform: translateY(-2px); }
.sa-icon{ line-height: 0; display: inline-flex; }

.sa-dot{
  position: absolute;
  right: 10px;
  top: 10px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #02f25b;
  box-shadow: 0 0 0 0 rgba(2,242,91,.6);
  animation: saPulse 1.7s infinite;
}

@keyframes saPulse { 0%{box-shadow:0 0 0 0 rgba(34,197,94,.55)} 70%{box-shadow:0 0 0 12px rgba(34,197,94,0)} 100%{box-shadow:0 0 0 0 rgba(34,197,94,0)} }

.sa-panel {
display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 24px));
  height: min(540px, calc(100vh - 120px));
  position: absolute; right: 0; bottom: 76px;
  background: rgba(16,16,22,.92);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(.92);
  opacity: 0;
  pointer-events: none;
  transition: transform .18s ease, opacity .18s ease;
  backdrop-filter: blur(10px);
}
.sa-panel.is-open { transform: scale(1); opacity: 1; pointer-events: auto; }

.sa-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.sa-title { display: flex; gap: 10px; align-items: center; }
.sa-avatar{
  width: auto;
  height: auto;
  background: transparent;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.sa-name { color: rgba(255,255,255,.96); font-weight: 750; font-size: 14px; line-height: 1.1; }
.sa-sub { color: rgba(255,255,255,.65); font-size: 12px; margin-top: 2px; }
.sa-close { background: transparent; border: none; color: rgba(255,255,255,.75); cursor: pointer; font-size: 16px; padding: 8px; border-radius: 10px; }
.sa-close:hover { background: rgba(255,255,255,.08); color: white; }

.sa-messages {
  padding: 14px;
  flex: 1 1 auto;
  min-height: 0; /* critical for flex + overflow */
  overflow: auto;
}
.sa-msg { display: flex; margin: 10px 0; }
.sa-msg--bot { justify-content: flex-start; }
.sa-msg--me { justify-content: flex-end; }
.sa-bubblemsg {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.35;
  
}

/* Links inside messages */
.sa-bubblemsg .sa-link{
  color: #ffd84d;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}
.sa-msg--me .sa-bubblemsg .sa-link{
  color: #1b102e;
}
.sa-bubblemsg .sa-link:hover{ opacity: .92; }

.sa-msg--bot .sa-bubblemsg { background: rgba(255,255,255,.10); color: rgba(255,255,255,.92); border: 1px solid rgba(255,255,255,.08); }
.sa-msg--me .sa-bubblemsg { background: rgba(255,216,77,.92); color: #1b102e; }

.sa-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sa-chip {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.90);
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
}
.sa-chip:hover { background: rgba(255,255,255,.10); }

.sa-footer { padding: 10px 12px 12px; border-top: 1px solid rgba(255,255,255,.10); }
.sa-form { display: flex; gap: 8px; align-items: flex-end; }
.sa-input {
  flex: 1;
  resize: none;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.92);
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
}
.sa-input:focus { border-color: rgba(255,216,77,.65); }
.sa-send {
  width: 42px; height: 42px; border-radius: 14px; border: none;
  background: rgba(255,216,77,.92);
  color: #1b102e;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}
.sa-send:disabled { opacity: .55; cursor: not-allowed; }
.sa-note { margin-top: 8px; font-size: 11px; color: rgba(255,255,255,.55); }
.sa-note a { color: rgba(255,216,77,.92); text-decoration: none; }
.sa-note a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  .sa-dot { animation: none; }
  .sa-panel { transition: none; }
  .sa-bubble:hover { transform: none; }
}
/* unified logo */
.sa-logo { width: 22px; height: 22px; display: inline-block; vertical-align: middle; }
.sa-logo--sm { width: 20px; height: 20px; }
/* Bigger in the floating bubble */


/* Bigger in the header avatar */
.sa-avatar .sa-logo { width: 26px; height: 26px; }

/* Hide only the top-level background circles of the SVG (keep cheeks inside the face) */


/* ensure chips stack nicely */
#sa-chips.sa-chips{
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:stretch;
  margin-top:10px;
}
#sa-chips .sa-chip{
  width:100%;
  text-align:left;
  white-space:normal;
}

/* footer note should wrap */
.sa-note{
  white-space: normal;
  font-size: 11px;
  line-height: 1.25;
  opacity: .75;
}

/* nicer typing indicator */
.sa-typing{
  display:inline-flex;
  gap:4px;
  align-items:center;
}
.sa-typing span{
  width:6px;
  height:6px;
  border-radius:999px;
  background: rgba(255,255,255,.65);
  display:inline-block;
  animation: saDot 1.1s infinite ease-in-out;
}
.sa-typing span:nth-child(2){ animation-delay:.15s; }
.sa-typing span:nth-child(3){ animation-delay:.30s; }
@keyframes saDot{
  0%,80%,100%{ transform:translateY(0); opacity:.55; }
  40%{ transform:translateY(-4px); opacity:1; }
}
.sa-welcome{
  display:flex;
  flex-direction:column;
  gap:12px;
}

/* Ensure the buttons sit under the intro (not in a right column) */
.sa-welcome-right{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  width:100%;
}

.sa-quicklist{
  align-items:flex-start;
  justify-content:flex-start;
}

.sa-quick{
  appearance:none;
  border:1px solid rgba(0,0,0,.12);
  background:#fff;
  border-radius:999px;
  padding:8px 12px;
  font:inherit;
  cursor:pointer;
  transition:transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
.sa-quick:hover{ transform:translateY(-1px); }
.sa-quick:active{ transform:translateY(0); }
.sa-quick[disabled]{ opacity:.5; cursor:not-allowed; transform:none; }

/* Chat links (look like nice buttons, not ugly blue anchors) */
.sa-bubblemsg a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(124,58,237,.55);
}
.sa-bubblemsg a:hover {
  background: rgba(124,58,237,.10);
  border-radius: 6px;
}

.sa-bubblemsg a.sa-linkbtn {
  display: inline-block;
  margin: 2px 6px 2px 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.10);
  text-decoration: none;
  font-weight: 750;
}
.sa-bubblemsg a.sa-linkbtn:hover {
  background: rgba(255,255,255,.16);
}

/* Logo face animations */
.sa-logo .sa-eye,
.sa-logo .sa-mouth,
.sa-logo .sa-face {
  transform-box: fill-box;
  transform-origin: center;
}

/* subtle blink always */
.sa-logo .sa-eye--l { animation: saEyeL 6.5s ease-in-out infinite; }
.sa-logo .sa-eye--r { animation: saEyeR 6.5s ease-in-out infinite; }

/* more expressive when open or hovered */
.sa-open .sa-logo .sa-mouth,
.sa-bubble:hover .sa-logo .sa-mouth { animation: saMouth 2.8s ease-in-out infinite; }

.sa-open .sa-logo .sa-face,
.sa-bubble:hover .sa-logo .sa-face { animation: saBob 3.2s ease-in-out infinite; }

@keyframes saEyeL {
  0%,68%,100% { transform: translateX(0) scaleY(1); }
  72% { transform: translateX(1.4px) scaleY(1); }     /* eyes come together */
  74% { transform: translateX(1.4px) scaleY(0.12); }  /* blink */
  76% { transform: translateX(1.4px) scaleY(1); }
  82% { transform: translateX(0) scaleY(1); }
}

@keyframes saEyeR {
  0%,68%,100% { transform: translateX(0) scaleY(1); }
  72% { transform: translateX(-1.4px) scaleY(1); }
  74% { transform: translateX(-1.4px) scaleY(0.12); }
  76% { transform: translateX(-1.4px) scaleY(1); }
  82% { transform: translateX(0) scaleY(1); }
}

@keyframes saMouth {
  0%,70%,100% { transform: translateY(0) scaleY(1); }
  74% { transform: translateY(-0.6px) scaleY(1.25); } /* smile a bit more */
  82% { transform: translateY(0) scaleY(1); }
}

@keyframes saBob {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-0.6px); }
}

@media (prefers-reduced-motion: reduce) {
  .sa-logo .sa-eye,
  .sa-logo .sa-mouth,
  .sa-logo .sa-face { animation: none !important; }
}
.sa-welcome-head{
  display:block;
  font-weight: 600;
  font-size: 1.10em;
  line-height: 1.25;
  margin-bottom: 4px;
}


