.sabi-chatbot {
  --sabi-primary: #001a39;
  --sabi-accent: #fdc800;
  --sabi-surface: #f3f7fa;
  --sabi-ink: #173653;
  --sabi-muted: #5d7184;
  --sabi-border: #d9e3eb;
  bottom: 24px;
  color: var(--sabi-ink);
  font-family: Nunito, "Trebuchet MS", sans-serif;
  position: fixed;
  z-index: 999990;
}

.sabi-chatbot--right { right: 24px; }
.sabi-chatbot--left { left: 24px; }

.sabi-chatbot *,
.sabi-chatbot *::before,
.sabi-chatbot *::after { box-sizing: border-box; }

.sabi-chatbot button,
.sabi-chatbot input { font: inherit; }

.sabi-chatbot .screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.sabi-chatbot button:focus-visible,
.sabi-chatbot input:focus-visible,
.sabi-chatbot a:focus-visible {
  outline: 3px solid #0070e0;
  outline-offset: 3px;
}

.sabi-chatbot__launcher {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
  cursor: pointer;
  display: grid;
  height: 76px;
  justify-content: center;
  margin-left: auto;
  min-height: 76px;
  padding: 0;
  transition: background-color .2s ease, opacity .2s ease, transform .2s ease, visibility .2s ease;
  width: 76px;
}

.sabi-chatbot--left .sabi-chatbot__launcher {
  margin-left: 0;
  margin-right: auto;
}

.sabi-chatbot .sabi-chatbot__launcher:hover {
  background-color: var(--sabi-accent) !important;
  box-shadow: none !important;
  transform: translateY(-2px);
}

.sabi-chatbot__launcher[aria-expanded="true"] {
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px) scale(.92);
  visibility: hidden;
}

.sabi-chatbot__launcher-image {
  filter: drop-shadow(0 8px 13px rgba(0, 26, 57, .2));
  height: 76px;
  object-fit: contain;
  transition: filter .2s ease;
  width: 76px;
}

.sabi-chatbot__launcher:hover .sabi-chatbot__launcher-image {
  filter: drop-shadow(0 10px 16px rgba(0, 26, 57, .27));
}

.sabi-chatbot__panel {
  background: #fff;
  border: 1px solid rgba(0, 26, 57, .14);
  border-radius: 22px;
  bottom: 84px;
  box-shadow: 0 28px 70px rgba(0, 26, 57, .25);
  display: grid;
  grid-template-areas:
    "header"
    "preview"
    "messages"
    "composer"
    "notice"
    "footer";
  grid-template-rows: auto auto minmax(210px, 1fr) auto auto auto;
  height: min(680px, calc(100vh - 130px));
  max-height: 680px;
  overflow: hidden;
  position: absolute;
  right: 0;
  transform-origin: bottom right;
  width: min(420px, calc(100vw - 32px));
}

.sabi-chatbot--left .sabi-chatbot__panel {
  left: 0;
  right: auto;
  transform-origin: bottom left;
}

.sabi-chatbot__panel[hidden] { display: none; }

.sabi-chatbot__panel.is-opening {
  animation: sabi-panel-in .24s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes sabi-panel-in {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.sabi-chatbot__header {
  align-items: center;
  background: linear-gradient(125deg, var(--sabi-primary) 0%, #082b55 100%);
  color: #fff;
  display: grid;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 86px;
  overflow: hidden;
  padding: 16px 16px 15px;
  position: relative;
  grid-area: header;
}

.sabi-chatbot__brand-mark {
  border: 18px solid transparent;
  border-left-color: rgba(253, 200, 0, .16);
  border-top-color: rgba(255, 255, 255, .09);
  height: 110px;
  position: absolute;
  right: 28px;
  top: -46px;
  transform: rotate(13deg);
  width: 110px;
}

.sabi-chatbot__avatar,
.sabi-chatbot__message-avatar img {
  background: #fff;
  object-fit: contain;
}

.sabi-chatbot__avatar-wrap {
  display: grid;
  height: 56px;
  place-items: center;
  position: relative;
  width: 56px;
  z-index: 1;
}

.sabi-chatbot .sabi-chatbot__avatar {
  border: 0 !important;
  border-radius: 50% !important;
  clip-path: circle(50% at 50% 50%);
  height: 54px;
  width: 54px;
}

.sabi-chatbot__status-badge {
  background: #45d483;
  border: 2px solid #082b55;
  border-radius: 50%;
  bottom: -1px;
  height: 17px;
  position: absolute;
  right: -1px;
  width: 17px;
}

.sabi-chatbot__identity {
  display: grid;
  gap: 2px;
  position: relative;
  z-index: 1;
}

.sabi-chatbot__identity strong {
  font-size: 18px;
  letter-spacing: .01em;
}

.sabi-chatbot__identity span {
  align-items: center;
  color: #dbe8f4;
  display: flex;
  font-size: 12px;
}

.sabi-chatbot__close {
  align-items: center;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  height: 40px;
  justify-content: center;
  padding: 0;
  position: relative;
  transition: background .2s ease;
  width: 40px;
  z-index: 1;
}

.sabi-chatbot__close:hover { background: rgba(255, 255, 255, .22); }

.sabi-chatbot__close svg,
.sabi-chatbot__composer button svg {
  fill: currentColor;
  height: 19px;
  width: 19px;
}

.sabi-chatbot__preview-banner {
  background: #fff5c2;
  border-bottom: 1px solid #ead77d;
  color: #644a00;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .03em;
  padding: 7px 12px;
  text-align: center;
  text-transform: uppercase;
  grid-area: preview;
}

.sabi-chatbot__messages {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .9), rgba(243, 247, 250, .94)),
    radial-gradient(circle at 90% 12%, rgba(253, 200, 0, .2), transparent 32%);
  overflow-y: auto;
  padding: 24px 18px;
  grid-area: messages;
}

.sabi-chatbot__welcome,
.sabi-chatbot__message {
  align-items: flex-start;
  display: flex;
  gap: 9px;
}

.sabi-chatbot__message + .sabi-chatbot__message { margin-top: 14px; }

.sabi-chatbot__message--user {
  justify-content: flex-end;
  margin-left: 40px;
}

.sabi-chatbot__message--user .sabi-chatbot__bubble {
  background: var(--sabi-primary);
  border-color: var(--sabi-primary);
  border-radius: 16px 4px 16px 16px;
  box-shadow: 0 7px 20px rgba(0, 26, 57, .14);
}

.sabi-chatbot__message--user .sabi-chatbot__bubble p { color: #fff; }
.sabi-chatbot__message--user .sabi-chatbot__bubble time { color: #c6d7e5; text-align: right; }

.sabi-chatbot .sabi-chatbot__message-avatar {
  border: 1px solid #d7e1e8;
  border-radius: 50%;
  display: grid;
  flex: 0 0 34px;
  height: 34px;
  overflow: hidden;
  place-items: center;
  width: 34px;
}

.sabi-chatbot .sabi-chatbot__message-avatar img {
  border-radius: 50% !important;
  clip-path: circle(50% at 50% 50%);
  height: 32px;
  width: 32px;
}

.sabi-chatbot__bubble {
  background: #fff;
  border: 1px solid #e1e9ef;
  border-radius: 4px 16px 16px 16px;
  box-shadow: 0 7px 20px rgba(0, 26, 57, .07);
  max-width: 86%;
  padding: 13px 14px 9px;
}

.sabi-chatbot__bubble p {
  color: var(--sabi-ink);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

.sabi-chatbot__message-copy {
  color: var(--sabi-ink);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.sabi-chatbot__message-copy p + p,
.sabi-chatbot__message-copy p + ul,
.sabi-chatbot__message-copy ul + p {
  margin-top: 10px;
}

.sabi-chatbot__message-copy ul {
  display: grid;
  gap: 7px;
  margin: 9px 0 0;
  padding-left: 19px;
}

.sabi-chatbot__message-copy li {
  padding-left: 2px;
}

.sabi-chatbot__message-copy li::marker {
  color: #d2a900;
  font-size: 1.08em;
}

.sabi-chatbot__inline-link {
  color: #075fba;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.sabi-chatbot__inline-link:hover {
  color: #003f7d;
  text-decoration-thickness: 2px;
}

.sabi-chatbot__bubble time {
  color: #75899a;
  display: block;
  font-size: 10px;
  margin-top: 6px;
}

.sabi-chatbot__actions {
  display: grid;
  gap: 7px;
  margin-top: 11px;
}

.sabi-chatbot__actions a {
  align-items: center;
  background: #f5f8fb;
  border: 1px solid #cfdae3;
  border-radius: 9px;
  color: #075fba;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: space-between;
  line-height: 1.25;
  padding: 9px 10px;
  text-decoration: none;
}

.sabi-chatbot__actions a::after {
  content: '\2192';
  font-size: 15px;
  margin-left: 8px;
}

.sabi-chatbot__actions a:hover {
  background: #eaf2f8;
  border-color: #aabfce;
}

.sabi-chatbot__quick-replies { margin: 17px 0 2px 43px; }

.sabi-chatbot__quick-replies > p {
  color: var(--sabi-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  margin: 0 0 7px;
  text-transform: uppercase;
}

.sabi-chatbot__quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.sabi-chatbot__quick-list button {
  background: #fff;
  border: 1px solid #aebfcd;
  border-radius: 999px;
  color: var(--sabi-primary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  padding: 8px 10px;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.sabi-chatbot .sabi-chatbot__quick-list button:hover,
.sabi-chatbot .sabi-chatbot__quick-list button:focus-visible {
  background-color: var(--sabi-accent) !important;
  border-color: #9b7900 !important;
  color: var(--sabi-primary) !important;
  transform: translateY(-1px);
}

.sabi-chatbot .sabi-chatbot__quick-list button:focus-visible {
  outline-color: var(--sabi-primary);
}

.sabi-chatbot__quick-list--lead button:first-child {
  background: #fff7cd;
  border-color: #d7b500;
}

.sabi-chatbot__state {
  display: none;
  margin: 13px 0 0 43px;
}

.sabi-chatbot[data-chat-state="typing"] .sabi-chatbot__state--typing,
.sabi-chatbot[data-chat-state="loading"] .sabi-chatbot__state--loading,
.sabi-chatbot[data-chat-state="error"] .sabi-chatbot__state--error { display: flex; }

.sabi-chatbot__state--typing {
  align-items: center;
  background: #fff;
  border: 1px solid #e1e9ef;
  border-radius: 4px 13px 13px 13px;
  gap: 4px;
  padding: 11px 13px;
  width: max-content;
}

.sabi-chatbot__state--typing span {
  animation: sabi-typing 1.1s infinite ease-in-out;
  background: #668097;
  border-radius: 50%;
  height: 6px;
  width: 6px;
}

.sabi-chatbot__state--typing span:nth-child(2) { animation-delay: .14s; }
.sabi-chatbot__state--typing span:nth-child(3) { animation-delay: .28s; }

@keyframes sabi-typing {
  0%, 60%, 100% { opacity: .35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.sabi-chatbot__state--loading {
  align-items: center;
  color: var(--sabi-muted);
  font-size: 12px;
  gap: 8px;
}

.sabi-chatbot__spinner {
  animation: sabi-spin .75s linear infinite;
  border: 2px solid #d1dce5;
  border-radius: 50%;
  border-top-color: var(--sabi-primary);
  height: 16px;
  width: 16px;
}

@keyframes sabi-spin { to { transform: rotate(360deg); } }

.sabi-chatbot__state--error {
  background: #fff2f2;
  border: 1px solid #f0caca;
  border-radius: 12px;
  color: #8c2525;
  flex-direction: column;
  font-size: 12px;
  gap: 3px;
  padding: 11px 12px;
}

.sabi-chatbot__composer {
  align-items: center;
  background: #fff;
  border-top: 1px solid var(--sabi-border);
  display: grid;
  gap: 9px;
  grid-template-columns: 1fr auto;
  padding: 13px 14px 10px;
  grid-area: composer;
}

.sabi-chatbot__composer input {
  background: #f8fafc;
  border: 1px solid #afc0ce;
  border-radius: 12px;
  color: var(--sabi-ink);
  min-height: 44px;
  min-width: 0;
  padding: 10px 12px;
  width: 100%;
}

.sabi-chatbot__composer input:focus {
  background: #fff;
  border-color: #1b6cae;
  box-shadow: 0 0 0 3px rgba(27, 108, 174, .12);
}

.sabi-chatbot__composer button {
  align-items: center;
  background: var(--sabi-accent);
  border: 0;
  border-radius: 12px;
  color: var(--sabi-primary);
  display: flex;
  height: 44px;
  justify-content: center;
  padding: 0;
  transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
  width: 44px;
}

.sabi-chatbot__composer button:not(:disabled) {
  box-shadow: 0 5px 14px rgba(253, 200, 0, .26);
  cursor: pointer;
}

.sabi-chatbot .sabi-chatbot__composer button:not(:disabled):hover,
.sabi-chatbot .sabi-chatbot__composer button:not(:disabled):focus-visible {
  background-color: var(--sabi-accent) !important;
  box-shadow: 0 7px 18px rgba(0, 26, 57, .18) !important;
  color: var(--sabi-primary) !important;
  transform: translateY(-1px);
}

.sabi-chatbot__composer :disabled {
  cursor: not-allowed;
  opacity: .68;
}

.sabi-chatbot__notice {
  background: #fff;
  color: var(--sabi-muted);
  font-size: 10px;
  line-height: 1.4;
  margin: 0;
  padding: 0 16px 10px;
  grid-area: notice;
}

.sabi-chatbot__footer {
  align-items: center;
  background: #f8fafc;
  border-top: 1px solid #edf1f4;
  color: #687d8e;
  display: flex;
  font-size: 10px;
  gap: 8px;
  justify-content: space-between;
  padding: 8px 16px;
  grid-area: footer;
}

.sabi-chatbot__footer-actions {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: 2px;
}

.sabi-chatbot__footer a,
.sabi-chatbot__footer button {
  align-items: center;
  color: #075fba;
  display: inline-flex;
  font: inherit;
  justify-content: center;
  min-height: 28px;
  padding: 4px 5px;
  transition: background-color .18s ease, color .18s ease;
}

.sabi-chatbot__footer button {
  background: transparent;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
}

.sabi-chatbot .sabi-chatbot__footer a:hover,
.sabi-chatbot .sabi-chatbot__footer button:hover,
.sabi-chatbot .sabi-chatbot__footer a:focus-visible,
.sabi-chatbot .sabi-chatbot__footer button:focus-visible {
  background-color: var(--sabi-accent) !important;
  border-radius: 6px;
  color: var(--sabi-primary) !important;
  text-decoration-color: var(--sabi-primary) !important;
}

.sabi-chatbot .sabi-chatbot__footer a:focus-visible,
.sabi-chatbot .sabi-chatbot__footer button:focus-visible {
  outline-color: var(--sabi-primary);
}

.sabi-chatbot__demo-controls {
  align-items: center;
  background: #fff;
  border: 1px solid var(--sabi-border);
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  padding: 10px;
}

.sabi-chatbot__demo-controls > span {
  color: var(--sabi-muted);
  font-size: 12px;
  font-weight: 700;
  margin-right: 4px;
}

.sabi-chatbot__demo-controls button {
  background: #fff;
  border: 1px solid #b7c5d0;
  border-radius: 999px;
  color: var(--sabi-ink);
  cursor: pointer;
  font-size: 12px;
  padding: 6px 10px;
}

.sabi-chatbot__demo-controls button.is-active {
  background: var(--sabi-primary);
  border-color: var(--sabi-primary);
  color: #fff;
}

.sabi-chatbot--embedded {
  bottom: auto;
  left: auto;
  max-width: 520px;
  position: relative;
  right: auto;
}

.sabi-chatbot--embedded .sabi-chatbot__launcher { display: none; }

.sabi-chatbot--embedded .sabi-chatbot__panel {
  bottom: auto;
  height: 620px;
  max-height: none;
  position: relative;
  right: auto;
  transform: none;
  width: min(420px, 100%);
}

.sabi-chatbot--embedded .sabi-chatbot__close { visibility: hidden; }

@media (min-width: 641px) {
  .sabi-chatbot:not(.sabi-chatbot--embedded) .sabi-chatbot__panel {
    bottom: 24px;
    left: auto;
    position: fixed;
    right: 24px;
    transform-origin: bottom right;
  }
}

@media (max-width: 640px) {
  .sabi-chatbot:not(.sabi-chatbot--embedded) {
    bottom: 14px;
    left: 12px;
    right: 12px;
  }

  .sabi-chatbot:not(.sabi-chatbot--embedded) .sabi-chatbot__launcher { margin-left: auto; }
  .sabi-chatbot:not(.sabi-chatbot--embedded) .sabi-chatbot__launcher {
    height: 70px;
    min-height: 70px;
    width: 70px;
  }

  .sabi-chatbot:not(.sabi-chatbot--embedded) .sabi-chatbot__launcher-image {
    height: 70px;
    width: 70px;
  }

  .sabi-chatbot:not(.sabi-chatbot--embedded) .sabi-chatbot__panel {
    border-radius: 20px 20px 0 0;
    bottom: -14px;
    height: min(720px, calc(100dvh - 18px));
    left: -12px;
    max-height: none;
    right: -12px;
    transform-origin: bottom center;
    width: auto;
  }

  .sabi-chatbot__header { min-height: 82px; }
  .sabi-chatbot__header { gap: 8px; padding-inline: 12px; }
  .sabi-chatbot__avatar-wrap { height: 50px; width: 50px; }
  .sabi-chatbot .sabi-chatbot__avatar { height: 48px; width: 48px; }
  .sabi-chatbot__status-badge { height: 16px; width: 16px; }
  .sabi-chatbot__identity strong { font-size: 16px; }
  .sabi-chatbot__identity span { font-size: 10px; }
  .sabi-chatbot__close { height: 36px; width: 36px; }
  .sabi-chatbot__quick-replies { margin-left: 0; }
  .sabi-chatbot--embedded .sabi-chatbot__panel { height: 600px; }
}

@media (max-width: 360px) {
  .sabi-chatbot__footer {
    align-items: stretch;
    flex-direction: column;
    gap: 2px;
  }

  .sabi-chatbot__footer-actions {
    justify-content: space-between;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sabi-chatbot *,
  .sabi-chatbot *::before,
  .sabi-chatbot *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

