.cc-chatbot-widget,
.cc-chatbot-widget * {
  box-sizing: border-box;
}

.cc-chatbot-widget {
  --cc-chatbot-primary: #2e3091;
  --cc-chatbot-background: #ffffff;
  --cc-chatbot-text: #1a1a1a;
  --cc-chatbot-border: rgba(26, 26, 26, 0.16);
  --cc-chatbot-muted: rgba(26, 26, 26, 0.64);
  --cc-chatbot-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  font-family: 'Montserrat', Arial, sans-serif;
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 99999;
  color: var(--cc-chatbot-text);
  line-height: 1.5;
  text-transform: none;
  letter-spacing: normal;
}

.cc-chatbot-launcher {
  align-items: center;
  background: var(--cc-chatbot-primary);
  border: 0;
  border-radius: 999px;
  box-shadow: var(--cc-chatbot-shadow);
  color: #fff;
  cursor: pointer;
  display: flex;
  font:
    700 14px/1.2 'Montserrat',
    Arial,
    sans-serif;
  gap: 9px;
  min-height: 54px;
  max-width: min(280px, calc(100vw - 32px));
  padding: 0 18px;
  text-align: left;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.cc-chatbot-launcher:hover,
.cc-chatbot-launcher:focus-visible {
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.28);
  outline: 3px solid rgba(46, 48, 145, 0.22);
  outline-offset: 3px;
  transform: translateY(-1px);
}

.cc-chatbot-launcher span[aria-hidden='true'] {
  align-items: center;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 28px;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.cc-chatbot-launcher-text {
  overflow-wrap: anywhere;
}

.cc-chatbot-panel {
  background: var(--cc-chatbot-background);
  border: 1px solid var(--cc-chatbot-border);
  border-radius: 8px;
  bottom: 70px;
  box-shadow: var(--cc-chatbot-shadow);
  display: flex;
  flex-direction: column;
  height: min(620px, calc(100vh - 110px));
  overflow: hidden;
  position: absolute;
  right: 0;
  width: min(400px, calc(100vw - 32px));
}

.cc-chatbot-panel[hidden] {
  display: none;
}

.cc-chatbot-header {
  align-items: center;
  background: var(--cc-chatbot-primary);
  color: #fff;
  display: flex;
  justify-content: space-between;
  min-height: 58px;
  flex: 0 0 auto;
  padding: 14px 14px 14px 18px;
}

.cc-chatbot-header strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}

.cc-chatbot-close {
  align-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font:
    700 24px/1 Arial,
    sans-serif;
  height: 34px;
  justify-content: center;
  margin-left: 12px;
  padding: 0;
  width: 34px;
}

.cc-chatbot-close:hover,
.cc-chatbot-close:focus-visible {
  background: rgba(255, 255, 255, 0.24);
  outline: 2px solid rgba(255, 255, 255, 0.6);
  outline-offset: 2px;
}

.cc-chatbot-messages {
  background:
    linear-gradient(180deg, rgba(46, 48, 145, 0.055), rgba(46, 48, 145, 0)),
    var(--cc-chatbot-background);
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}

.cc-chatbot-message {
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 88%;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  white-space: pre-wrap;
}

.cc-chatbot-message-assistant {
  align-self: flex-start;
  background: #f2f4f7;
  color: var(--cc-chatbot-text);
}

.cc-chatbot-message-welcome {
  align-self: center;
  background: #fff;
  border: 1px solid rgba(46, 48, 145, 0.16);
  box-shadow: 0 8px 22px rgba(46, 48, 145, 0.08);
  color: var(--cc-chatbot-primary);
  font-weight: 700;
  max-width: 94%;
  padding: 14px 16px;
  text-align: center;
}

.cc-chatbot-message-user {
  align-self: flex-end;
  background: var(--cc-chatbot-primary);
  color: #fff;
}

.cc-chatbot-message-loading {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  max-width: 94%;
  white-space: normal;
}

.cc-chatbot-markdown {
  white-space: normal;
}

.cc-chatbot-markdown > *:first-child {
  margin-top: 0;
}

.cc-chatbot-markdown > *:last-child {
  margin-bottom: 0;
}

.cc-chatbot-markdown p {
  margin: 0 0 10px;
}

.cc-chatbot-markdown h3,
.cc-chatbot-markdown h4,
.cc-chatbot-markdown h5,
.cc-chatbot-markdown h6 {
  color: var(--cc-chatbot-primary);
  font-weight: 800;
  line-height: 1.25;
  margin: 12px 0 8px;
}

.cc-chatbot-markdown h3 {
  font-size: 17px;
}

.cc-chatbot-markdown h4,
.cc-chatbot-markdown h5,
.cc-chatbot-markdown h6 {
  font-size: 15px;
}

.cc-chatbot-markdown ul,
.cc-chatbot-markdown ol {
  margin: 0 0 10px 18px;
  padding: 0;
}

.cc-chatbot-markdown ul {
  list-style: disc;
}

.cc-chatbot-markdown ol {
  list-style: decimal;
}

.cc-chatbot-markdown li {
  margin: 5px 0;
  padding-left: 2px;
}

.cc-chatbot-markdown a {
  color: var(--cc-chatbot-primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-chatbot-markdown a.cc-chatbot-citation {
  font-size: 0.85em;
  font-weight: 800;
  text-decoration: none;
  vertical-align: super;
}

.cc-chatbot-markdown code {
  background: rgba(46, 48, 145, 0.08);
  border-radius: 4px;
  font-family: Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 1px 4px;
}

.cc-chatbot-markdown pre {
  background: #172033;
  border-radius: 6px;
  color: #fff;
  margin: 0 0 10px;
  max-width: 100%;
  overflow-x: auto;
  padding: 10px;
}

.cc-chatbot-markdown pre code {
  background: transparent;
  color: inherit;
  display: block;
  padding: 0;
  white-space: pre;
}

.cc-chatbot-markdown .cc-chatbot-table-wrap {
  margin: 0 0 10px;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cc-chatbot-markdown table {
  border-collapse: collapse;
  font-size: 13px;
  margin: 0;
  min-width: 100%;
  width: max-content;
}

.cc-chatbot-markdown th,
.cc-chatbot-markdown td {
  border: 1px solid rgba(46, 48, 145, 0.18);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}

.cc-chatbot-markdown th {
  background: rgba(46, 48, 145, 0.08);
  color: var(--cc-chatbot-primary);
  font-weight: 700;
  white-space: nowrap;
}

.cc-chatbot-markdown tbody tr:nth-child(even) {
  background: rgba(46, 48, 145, 0.03);
}

.cc-chatbot-dots {
  display: inline-flex;
  gap: 3px;
}

.cc-chatbot-dots i {
  animation: cc-chatbot-dot 1s infinite ease-in-out;
  background: var(--cc-chatbot-muted);
  border-radius: 50%;
  display: block;
  height: 5px;
  width: 5px;
}

.cc-chatbot-dots i:nth-child(2) {
  animation-delay: 120ms;
}

.cc-chatbot-dots i:nth-child(3) {
  animation-delay: 240ms;
}

.cc-chatbot-form {
  align-items: flex-end;
  border-top: 1px solid var(--cc-chatbot-border);
  display: flex;
  gap: 10px;
  padding: 12px;
  margin: 0;
  flex: 0 0 auto;
}

.cc-chatbot-form textarea {
  background: #fff;
  border: 1px solid var(--cc-chatbot-border);
  border-radius: 8px;
  color: var(--cc-chatbot-text);
  flex: 1 1 auto;
  font:
    400 14px/1.45 'Montserrat',
    Arial,
    sans-serif;
  max-height: 120px;
  min-height: 46px;
  min-width: 0;
  padding: 11px 12px;
  resize: none;
}

.cc-chatbot-form textarea:focus {
  border-color: var(--cc-chatbot-primary);
  outline: 3px solid rgba(46, 48, 145, 0.16);
}

.cc-chatbot-submit {
  background: var(--cc-chatbot-primary);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  flex: 0 0 auto;
  font:
    700 13px/1 'Montserrat',
    Arial,
    sans-serif;
  min-height: 46px;
  padding: 0 14px;
}

.cc-chatbot-submit:hover,
.cc-chatbot-submit:focus-visible {
  filter: brightness(0.92);
  outline: 3px solid rgba(46, 48, 145, 0.16);
  outline-offset: 2px;
}

.cc-chatbot-form.is-loading .cc-chatbot-submit,
.cc-chatbot-form.is-loading textarea {
  opacity: 0.68;
  pointer-events: none;
}

.cc-chatbot-branding {
  background: #fff;
  color: #27272a;
  flex: 0 0 auto;
  padding: 5px 12px 8px;
  text-align: center;
}

.cc-chatbot-branding a {
  align-items: center;
  color: #27272a;
  display: inline-flex;
  font:
    500 10px/1.2 'Montserrat',
    Arial,
    sans-serif;
  gap: 4px;
  text-decoration: none;
}

.cc-chatbot-branding img {
  display: block;
  flex: 0 0 19px;
  height: 15px;
  width: 19px;
}

.cc-chatbot-branding strong {
  color: #27272a;
  font-weight: 800;
}

.cc-chatbot-branding a:hover strong,
.cc-chatbot-branding a:focus-visible strong {
  color: #22c55d;
}

.cc-chatbot-branding a:focus-visible {
  border-radius: 3px;
  outline: 2px solid #22c55d;
  outline-offset: 2px;
}

.cc-chatbot-honeypot,
.cc-chatbot-screen-reader {
  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;
}

@keyframes cc-chatbot-dot {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-chatbot-widget *,
  .cc-chatbot-widget *::before,
  .cc-chatbot-widget *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media screen and (max-width: 640px),
  screen and (max-width: 900px) and (max-height: 500px) {
  html.cc-chatbot-chat-open,
  body.cc-chatbot-chat-open {
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  .cc-chatbot-widget {
    bottom: max(12px, env(safe-area-inset-bottom));
    right: max(12px, env(safe-area-inset-right));
  }

  .cc-chatbot-panel {
    border-radius: 0;
    border-width: 0;
    bottom: auto;
    height: var(--cc-chatbot-viewport-height, 100dvh);
    left: 0;
    max-height: none;
    position: fixed;
    right: 0;
    top: var(--cc-chatbot-viewport-top, 0);
    width: 100%;
  }

  .cc-chatbot-widget.is-open .cc-chatbot-launcher {
    visibility: hidden;
  }

  .cc-chatbot-header {
    min-height: calc(58px + env(safe-area-inset-top));
    padding: calc(10px + env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right)) 10px
      max(16px, env(safe-area-inset-left));
  }

  .cc-chatbot-close {
    height: 44px;
    width: 44px;
  }

  .cc-chatbot-messages {
    padding: 14px max(14px, env(safe-area-inset-right)) 14px
      max(14px, env(safe-area-inset-left));
  }

  .cc-chatbot-message {
    max-width: 92%;
  }

  .cc-chatbot-form {
    padding: 10px max(10px, env(safe-area-inset-right)) 10px
      max(10px, env(safe-area-inset-left));
  }

  .cc-chatbot-branding {
    padding-bottom: calc(7px + env(safe-area-inset-bottom));
  }

  .cc-chatbot-form textarea {
    font-size: 16px;
  }

  .cc-chatbot-launcher {
    min-height: 52px;
    padding: 0 16px;
  }
}
