.mrt-ai-chatbot {
  --mrt-chat-bg: #ffffff;
  --mrt-chat-text: #17202a;
  --mrt-chat-muted: #667085;
  --mrt-chat-line: #d7dde5;
  --mrt-chat-primary: #0b7a75;
  --mrt-chat-primary-dark: #075d59;
  --mrt-chat-user: #e8f7f5;
  --mrt-chat-assistant: #f2f4f7;
  color: var(--mrt-chat-text);
  font-family: inherit;
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99999;
}

.mrt-ai-chatbot[hidden] {
  display: none;
}

.mrt-ai-chatbot-inline {
  position: relative;
  right: auto;
  bottom: auto;
  z-index: 1;
}

.mrt-ai-chatbot__launcher {
  align-items: center;
  background: var(--mrt-chat-primary);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  min-height: 52px;
  min-width: 92px;
  padding: 0 18px;
}

.mrt-ai-chatbot__launcher:hover,
.mrt-ai-chatbot__launcher:focus {
  background: var(--mrt-chat-primary-dark);
}

.mrt-ai-chatbot__panel {
  background: var(--mrt-chat-bg);
  border: 1px solid var(--mrt-chat-line);
  border-radius: 8px;
  bottom: 68px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
  display: none;
  flex-direction: column;
  height: min(620px, calc(100vh - 104px));
  overflow: hidden;
  position: absolute;
  right: 0;
  width: min(390px, calc(100vw - 28px));
}

.mrt-ai-chatbot-inline .mrt-ai-chatbot__launcher {
  display: none;
}

.mrt-ai-chatbot-inline .mrt-ai-chatbot__panel {
  bottom: auto;
  display: flex;
  height: 560px;
  position: relative;
  right: auto;
  width: 100%;
}

.mrt-ai-chatbot--open .mrt-ai-chatbot__panel {
  display: flex;
}

.mrt-ai-chatbot__header {
  align-items: center;
  background: #111827;
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.mrt-ai-chatbot__header strong,
.mrt-ai-chatbot__header small {
  display: block;
}

.mrt-ai-chatbot__header strong {
  font-size: 15px;
  line-height: 1.2;
}

.mrt-ai-chatbot__header small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  margin-top: 3px;
}

.mrt-ai-chatbot__header button {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  height: 32px;
  line-height: 1;
  width: 32px;
}

.mrt-ai-chatbot__messages {
  background: #fbfcfd;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 14px;
}

.mrt-ai-chatbot__message {
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
  max-width: 88%;
  padding: 10px 12px;
  white-space: pre-wrap;
}

.mrt-ai-chatbot__message--assistant {
  align-self: flex-start;
  background: var(--mrt-chat-assistant);
}

.mrt-ai-chatbot__message--user {
  align-self: flex-end;
  background: var(--mrt-chat-user);
}

.mrt-ai-chatbot__form {
  align-items: flex-end;
  border-top: 1px solid var(--mrt-chat-line);
  display: flex;
  gap: 8px;
  padding: 12px;
}

.mrt-ai-chatbot__form textarea {
  border: 1px solid var(--mrt-chat-line);
  border-radius: 8px;
  box-sizing: border-box;
  flex: 1;
  font: inherit;
  max-height: 120px;
  min-height: 44px;
  padding: 10px;
  resize: vertical;
}

.mrt-ai-chatbot__form button {
  background: var(--mrt-chat-primary);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  min-height: 44px;
  padding: 0 14px;
}

.mrt-ai-chatbot__form button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.mrt-ai-chatbot__privacy {
  border-top: 1px solid var(--mrt-chat-line);
  color: var(--mrt-chat-muted);
  font-size: 11px;
  line-height: 1.35;
  margin: 0;
  padding: 9px 12px;
}

@media (max-width: 520px) {
  .mrt-ai-chatbot {
    bottom: 12px;
    left: 12px;
    right: 12px;
  }

  .mrt-ai-chatbot__launcher {
    float: right;
  }

  .mrt-ai-chatbot__panel {
    bottom: 66px;
    left: 0;
    right: 0;
    width: 100%;
  }
}
