.max-chatbot-widget {
  position: fixed !important;
  right: 22px !important;
  bottom: 22px !important;
  z-index: 2147483647 !important;
  font-family: inherit;
}

.max-chatbot-button {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 0;
  background: #c5162e !important;
  color: #fff !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.max-chatbot-button:hover {
  background: #a81226 !important;
}

.max-chatbot-button svg {
  width: 28px;
  height: 28px;
}

.max-chatbot-panel {
  position: absolute;
  right: 0;
  bottom: 78px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .22);
  display: none;
  border: 1px solid rgba(0, 0, 0, .08);
}

.max-chatbot-widget.is-open .max-chatbot-panel {
  display: flex;
  flex-direction: column;
}

.max-chatbot-header {
  background: #c5162e !important;
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.max-chatbot-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.max-chatbot-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background: #f7f8fb;
}

.max-chatbot-message {
  max-width: 86%;
  padding: 11px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 10px;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: break-word;
}

.max-chatbot-message.bot {
  background: #fff;
  color: #1f2937;
  border: 1px solid rgba(0, 0, 0, .06);
  border-bottom-left-radius: 4px;
}

.max-chatbot-message.user {
  background: #c5162e !important;
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.max-chatbot-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, .08);
}

.max-chatbot-input {
  flex: 1;
  border: 1px solid rgba(0, 0, 0, .14);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
}

.max-chatbot-input:focus {
  border-color: #c5162e;
}

.max-chatbot-send {
  border: 0;
  border-radius: 999px;
  padding: 10px 15px;
  background: #c5162e !important;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}

@media (max-width: 575px) {
  .max-chatbot-widget {
    right: 14px !important;
    bottom: 14px !important;
  }

  .max-chatbot-panel {
    position: fixed;
    right: 10px;
    left: 10px;
    bottom: 88px;
    width: auto;
    height: min(520px, calc(100vh - 115px));
  }
}
