.su-chatbot {
  --su-red: #9d2235;
  --su-ink: #242424;
  --su-border: #d8d8d8;
  font: 16px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: fixed;
  z-index: 99999;
  right: 1.25rem;
  bottom: 1.25rem;
}

.su-chatbot__toggle {
  width: 3.5rem;
  height: 3.5rem;
  border: 0;
  border-radius: 50%;
  background: var(--su-red);
  color: #fff;
  box-shadow: 0 0.4rem 1.25rem rgb(0 0 0 / 24%);
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 700;
}

.su-chatbot__panel {
  position: absolute;
  right: 0;
  bottom: 4.25rem;
  display: grid;
  grid-template-rows: auto minmax(15rem, 1fr) auto;
  width: min(24rem, calc(100vw - 2rem));
  height: min(34rem, calc(100vh - 7rem));
  overflow: hidden;
  border: 1px solid var(--su-border);
  border-radius: 0.8rem;
  background: #fff;
  color: var(--su-ink);
  box-shadow: 0 0.6rem 2rem rgb(0 0 0 / 20%);
}

.su-chatbot__panel[hidden] {
  display: none;
}

.su-chatbot__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  background: var(--su-red);
  color: #fff;
}

.su-chatbot__close {
  padding: 0 0.25rem;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1.5rem;
}

.su-chatbot__messages {
  overflow-y: auto;
  padding: 1rem;
  background: #f7f7f7;
}

.su-chatbot__message {
  max-width: 88%;
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.75rem;
  background: #fff;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.su-chatbot__message--user {
  margin-left: auto;
  background: var(--su-red);
  color: #fff;
}

.su-chatbot__sources {
  margin: 0.7rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.82rem;
  white-space: normal;
}

.su-chatbot__sources a {
  color: var(--su-red);
}

.su-chatbot__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid var(--su-border);
}

.su-chatbot__form input,
.su-chatbot__form button {
  min-height: 2.75rem;
  border-radius: 0.4rem;
  font: inherit;
}

.su-chatbot__form input {
  min-width: 0;
  padding: 0 0.7rem;
  border: 1px solid var(--su-border);
}

.su-chatbot__form button {
  padding: 0 0.9rem;
  border: 0;
  background: var(--su-red);
  color: #fff;
  cursor: pointer;
}

.su-chatbot button:focus-visible,
.su-chatbot input:focus-visible,
.su-chatbot a:focus-visible {
  outline: 3px solid #f3be26;
  outline-offset: 2px;
}

@media (max-width: 30rem) {
  .su-chatbot {
    right: 1rem;
    bottom: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .su-chatbot *,
  .su-chatbot *::before,
  .su-chatbot *::after {
    scroll-behavior: auto !important;
  }
}

