.slc-root {
  --slc-primary: #5f8dff;
  --slc-primary-ink: #4470e0;
  --slc-bg: #ffffff;
  --slc-text: #101a2e;
  --slc-text-dim: #5b6482;
  --slc-bubble-bot: #f1f3f9;
  --slc-radius: 16px;
  font-family: "Outfit", system-ui, sans-serif;
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
}
.slc-root.slc-pos-left { right: auto; left: 24px; }

.slc-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--slc-primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s ease;
}
.slc-toggle:hover { transform: scale(1.05); }
.slc-toggle svg { width: 26px; height: 26px; }

.slc-window {
  position: absolute;
  bottom: 76px;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 140px);
  background: var(--slc-bg);
  border-radius: var(--slc-radius);
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.35);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.slc-root.slc-pos-left .slc-window { right: auto; left: 0; }
.slc-root.slc-open .slc-window { display: flex; }

.slc-header {
  background: var(--slc-primary);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.slc-header-title { font-weight: 600; font-size: 15px; }
.slc-ai-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 6px;
  border-radius: 5px;
  vertical-align: middle;
}
.slc-header-sub { font-size: 12px; opacity: 0.85; }
.slc-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px;
}

.slc-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--slc-bg);
}
.slc-msg {
  max-width: 82%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.slc-msg-bot {
  align-self: flex-start;
  background: var(--slc-bubble-bot);
  color: var(--slc-text);
  border-bottom-left-radius: 4px;
}
.slc-msg-user {
  align-self: flex-end;
  background: var(--slc-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.slc-msg-typing { display: flex; gap: 4px; padding: 12px 14px; }
.slc-msg-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--slc-text-dim);
  animation: slc-bounce 1.2s infinite ease-in-out;
}
.slc-msg-typing span:nth-child(2) { animation-delay: 0.15s; }
.slc-msg-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes slc-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.slc-inputbar {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--slc-bg);
}
.slc-input {
  flex: 1;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--slc-text);
  resize: none;
  max-height: 80px;
}
.slc-input:focus { outline: 2px solid var(--slc-primary); outline-offset: 1px; }
.slc-send {
  background: var(--slc-primary);
  border: none;
  color: #fff;
  border-radius: 10px;
  width: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slc-send:hover { background: var(--slc-primary-ink); }
.slc-send:disabled { opacity: 0.5; cursor: default; }

.slc-footer-note {
  font-size: 10.5px;
  color: var(--slc-text-dim);
  text-align: center;
  padding: 4px 0 8px;
}

@media (max-width: 480px) {
  .slc-window { width: calc(100vw - 32px); }
}
