#add-ai-chatbot {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99999;
  pointer-events: none;
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.add-ai-chatbot__panel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(360px, calc(100vw - 24px));
  height: 550px;
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  background: #f9f9f9;
  border: 1px solid #d8dee7;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(16, 24, 40, 0.2);
  overflow: hidden;
  pointer-events: auto;
}

.add-ai-chatbot__launcher {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 100px;
  height: 100px;
  padding: 8px 8px 8px;
  border: 0;
  border-radius: 10px;
  background: #004470;
  box-shadow: 0 12px 40px rgba(16, 24, 40, 0.24);
  color: #ffffff;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1px;
  pointer-events: auto;
}

.add-ai-chatbot__panel,
.add-ai-chatbot__launcher {
  transition: opacity 0.32s ease, transform 0.32s ease;
}

#add-ai-chatbot:not(.add-ai-chatbot--visible) .add-ai-chatbot__panel,
#add-ai-chatbot:not(.add-ai-chatbot--visible) .add-ai-chatbot__launcher {
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
}

#add-ai-chatbot.add-ai-chatbot--state-open .add-ai-chatbot__panel {
  opacity: 1;
  transform: translateY(0);
}

#add-ai-chatbot.add-ai-chatbot--state-open .add-ai-chatbot__launcher {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

#add-ai-chatbot.add-ai-chatbot--state-closed .add-ai-chatbot__panel {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

#add-ai-chatbot.add-ai-chatbot--state-closed .add-ai-chatbot__launcher {
  opacity: 1;
  transform: translateY(0);
}

.add-ai-chatbot__launcher:focus-visible {
  outline: 2px solid #ffb808;
  outline-offset: 3px;
}

.add-ai-chatbot__launcher-icon {
  position: absolute;
  top: 15px;
  right: 8px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.add-ai-chatbot__launcher-icon::after {
  content: none;
}

.add-ai-chatbot__launcher-icon-image {
  width: 100%;
  height: 100%;
  display: block;
}

.add-ai-chatbot__launcher-line {
  display: block;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  font-family: "Roboto Condensed", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.add-ai-chatbot__launcher-line--ask,
.add-ai-chatbot__launcher-line--highlight {
  color: #ffbf00;
}

.add-ai-chatbot__launcher-line--highlight {
  font-size: 14px;
}

.add-ai-chatbot__launcher-line--ask {
  font-size: 24px;
  line-height: 0.95;
  letter-spacing: 0;
  padding-right: 22px;
}

.add-ai-chatbot__header {
  padding: 12px 14px;
  border-bottom: 2px solid #ffb808;
  background: #004470;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Roboto Condensed", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.add-ai-chatbot__header--with-bg-image {
  background-color: #004470;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.add-ai-chatbot__header-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  box-sizing: border-box;
  padding: 4px;
  border: 1px solid #ffb808;
  background: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.add-ai-chatbot__header-avatar-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.add-ai-chatbot__header-title {
  min-width: 0;
  flex: 1;
}

.add-ai-chatbot__close {
  border: 0;
  background: transparent;
  color: #ffffff;
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 2px;
}

.add-ai-chatbot__close:hover,
.add-ai-chatbot__close:focus {
  color: #ffffff;
}

.add-ai-chatbot__close:focus-visible {
  outline: 2px solid #ffb808;
  outline-offset: 2px;
}

.add-ai-chatbot__messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  background: #f9f9f9;
}

.add-ai-chatbot__message {
  display: flex;
  margin-bottom: 10px;
}

.add-ai-chatbot__message--user {
  justify-content: flex-end;
}

.add-ai-chatbot__message--assistant {
  justify-content: flex-start;
}

.add-ai-chatbot__message--clear {
  justify-content: flex-end;
}

.add-ai-chatbot__quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 2px 0 10px;
}

button.add-ai-chatbot__quick-action {
  border: 1px solid #0f6db0;
  border-radius: 16px;
  background: transparent;
  color: #0f6db0;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.05;
  cursor: pointer;
}

.add-ai-chatbot__quick-action:hover,
.add-ai-chatbot__quick-action:focus {
  background: #f2f8fe;
}

.add-ai-chatbot__quick-action:focus-visible {
  outline: 2px solid rgba(15, 109, 176, 0.35);
  outline-offset: 2px;
}

.add-ai-chatbot__bubble {
  max-width: 90%;
  padding: 10px 12px;
  border-radius: 10px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.4;
  font-size: 14px;
}

.add-ai-chatbot__avatar {
  width: 28px;
  cursor: pointer;
  font-family: "Roboto Condensed", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  flex: 0 0 28px;
  margin-right: 10px;
  border-radius: 50%;
  padding: 4px;
  box-sizing: border-box;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #004470;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-end;
}

.add-ai-chatbot__avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.add-ai-chatbot__bubble a {
  color: inherit;
  text-decoration: underline;
}

.add-ai-chatbot__bubble code {
  padding: 0.1em 0.3em;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.08);
  font-size: 0.92em;
}

.add-ai-chatbot__bubble--loading {
  min-width: 54px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.add-ai-chatbot__loading-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #64748b;
  display: inline-block;
  animation: add-ai-chatbot-pulse 1s infinite ease-in-out;
}

.add-ai-chatbot__loading-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.add-ai-chatbot__loading-dot:nth-child(3) {
  animation-delay: 0.3s;
}

.add-ai-chatbot__message--user .add-ai-chatbot__bubble {
  background: #006bb3;
  color: #ffffff;
}

.add-ai-chatbot__message--assistant .add-ai-chatbot__bubble {
  background: #ffffff;
  color: #111827;
  border: 1px solid #d8dee7;
}

.add-ai-chatbot__message--assistant.add-ai-chatbot__message--loading {
  align-items: flex-end;
}

.add-ai-chatbot__message--assistant .add-ai-chatbot__avatar,
.add-ai-chatbot__message--assistant.add-ai-chatbot__message--loading .add-ai-chatbot__avatar {
  margin-right: 10px;
}

.add-ai-chatbot__form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e5e9f0;
  background: #ffffff;
  align-items: stretch;
}

.add-ai-chatbot__form--with-footer {
  padding-bottom: 0;
}

.add-ai-chatbot__input {
  flex: 1;
  min-width: 0;
  height: 40px;
  margin-bottom: 0 !important;
  box-sizing: border-box;
  border: 1px solid #c4ccd8;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 14px;
}

.add-ai-chatbot__input:focus {
  outline: none;
  border-color: #006bb3;
  box-shadow: 0 0 0 2px rgba(0, 107, 179, 0.15);
}

.add-ai-chatbot__button {
  border: 0;
  border-radius: 8px;
  height: 40px;
  box-sizing: border-box;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #006bb3;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.add-ai-chatbot__button[disabled] {
  opacity: 0.7;
  cursor: default;
}

.add-ai-chatbot__clear-row {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.add-ai-chatbot__clear {
  display: inline-flex;
  align-items: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.add-ai-chatbot__clear:hover {
  color: #004470;
  text-decoration: underline;
}

.add-ai-chatbot__clear:focus {
  outline: none;
  color: #004470;
  text-decoration: underline;
}

.add-ai-chatbot__clear:focus-visible {
  outline: 2px solid rgba(15, 23, 42, 0.25);
  outline-offset: 3px;
}

.add-ai-chatbot__footer {
  padding: 8px 12px 12px;
  background: #ffffff;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
  color: #62696f;
}

.add-ai-chatbot__footer-link {
  color: #62696f;
  text-decoration: underline;
}

.add-ai-chatbot__footer-link:hover,
.add-ai-chatbot__footer-link:focus {
  color: #004470;
}

.add-ai-chatbot__footer-separator {
  color: #9ca3af;
}

@media (max-width: 640px) {
  #add-ai-chatbot {
    right: 8px;
    bottom: 8px;
  }

  .add-ai-chatbot__panel {
    width: calc(100vw - 16px);
    height: min(520px, calc(100vh - 16px));
    max-height: calc(100vh - 16px);
  }

  .add-ai-chatbot__launcher {
    width: 100px;
    height: 100px;
  }
}

@keyframes add-ai-chatbot-pulse {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }

  40% {
    transform: translateY(-3px);
    opacity: 1;
  }
}
