.slai-toggle {
  position: fixed; right: 20px; bottom: 20px; z-index: 99998;
  width: 58px; height: 58px; border-radius: 50%; border: 0;
  background: #1f7a4d; color: #fff; font-size: 26px; line-height: 58px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); cursor: pointer; padding: 0;
}
.slai-toggle:hover { background: #18633e; }
.slai-hidden { display: none !important; }

.slai-panel {
  position: fixed; right: 20px; bottom: 20px; z-index: 99999;
  width: 370px; max-width: calc(100vw - 24px);
  height: 540px; max-height: calc(100vh - 40px);
  display: none; flex-direction: column;
  background: #fff; color: #222; border-radius: 14px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.slai-panel.slai-open { display: flex; }

.slai-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: #1f7a4d; color: #fff;
}
.slai-title { font-weight: 600; }
.slai-close {
  background: none; border: 0; color: #fff; font-size: 24px; line-height: 1;
  cursor: pointer; padding: 0 4px;
}

.slai-msgs { flex: 1; overflow-y: auto; padding: 12px; background: #f5f7f6; }
.slai-msg {
  max-width: 85%; margin: 0 0 10px; padding: 9px 12px; border-radius: 12px;
  word-wrap: break-word; overflow-wrap: anywhere;
}
.slai-assistant { background: #fff; border: 1px solid #e3e7e5; border-bottom-left-radius: 4px; }
.slai-user { background: #1f7a4d; color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
.slai-error { background: #fdecea; color: #a12622; border: 1px solid #f5c2bd; }
.slai-msg a { color: #1f7a4d; font-weight: 600; text-decoration: underline; }
.slai-user a { color: #fff; }
.slai-typing { color: #888; letter-spacing: 2px; }

.slai-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #e3e7e5; background: #fff; margin: 0; }
.slai-input {
  flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid #cfd6d2; border-radius: 20px;
  font-size: 15px; outline: none; background: #fff; color: #222;
}
.slai-input:focus { border-color: #1f7a4d; }
.slai-send {
  border: 0; border-radius: 20px; padding: 0 16px; background: #1f7a4d; color: #fff;
  font-weight: 600; cursor: pointer;
}
.slai-send:disabled, .slai-input:disabled { opacity: .6; cursor: default; }
.slai-note { font-size: 11px; color: #777; padding: 0 12px 8px; background: #fff; }

@media (max-width: 480px) {
  .slai-panel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  .slai-toggle { right: 14px; bottom: 14px; }
}
