.mrc-chatbot {
  bottom: 22px;
  direction: ltr;
  font-family: inherit;
  position: fixed;
  right: 22px;
  text-align: right;
  z-index: 2147483000;
}

.mrc-chatbot--rtl {
  direction: rtl;
}

.mrc-chatbot * {
  box-sizing: border-box;
}

.mrc-chatbot__launcher {
  align-items: center;
  background: #ef1f26;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 15px;
  font-weight: 800;
  gap: 9px;
  min-height: 48px;
  padding: 0 18px;
}

.mrc-chatbot__pulse {
  background: #fff;
  border-radius: 50%;
  display: inline-block;
  height: 9px;
  position: relative;
  width: 9px;
}

.mrc-chatbot__pulse::after {
  animation: mrc-chatbot-pulse 1.8s ease-out infinite;
  border: 1px solid #fff;
  border-radius: 50%;
  content: "";
  inset: -7px;
  opacity: 0.6;
  position: absolute;
}

.mrc-chatbot__panel {
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 20px;
  bottom: 62px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  max-height: min(680px, calc(100vh - 110px));
  overflow: hidden;
  position: absolute;
  right: 0;
  text-align: initial;
  width: min(410px, calc(100vw - 28px));
}

.mrc-chatbot__panel[hidden] {
  display: none;
}

.mrc-chatbot__header {
  align-items: center;
  background: linear-gradient(135deg, #111 0%, #1d1d1d 58%, #3a1113 100%);
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 16px 16px 14px;
}

.mrc-chatbot__header strong,
.mrc-chatbot__header span {
  display: block;
}

.mrc-chatbot__header strong {
  font-size: 15px;
}

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

.mrc-chatbot__header button {
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  height: 34px;
  line-height: 1;
  width: 34px;
}

.mrc-chatbot__messages {
  background: #fafafa;
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  overscroll-behavior: contain;
  overflow-y: auto;
  padding: 14px;
  -webkit-overflow-scrolling: touch;
}

.mrc-chatbot__message {
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.65;
  max-width: 88%;
  padding: 10px 12px;
  white-space: pre-wrap;
}

.mrc-chatbot__message p {
  margin: 0;
}

.mrc-chatbot__message--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
  color: #202020;
  direction: auto;
}

.mrc-chatbot__message--user {
  align-self: flex-end;
  background: #ef1f26;
  color: #fff;
  direction: auto;
}

.mrc-chatbot__chips {
  background: #fff;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 168px;
  overflow-y: auto;
  padding: 10px 12px;
  -webkit-overflow-scrolling: touch;
}

.mrc-chatbot__chips--main {
  grid-template-columns: 1fr;
  max-height: none;
}

.mrc-chatbot__chips button {
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.14);
  border-radius: 999px;
  color: #111;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  min-height: 36px;
  padding: 8px 10px;
  text-align: center;
  white-space: normal;
}

.mrc-chatbot__chips--main button {
  grid-column: auto;
  min-height: 40px;
}

.mrc-chatbot__chips:not(.mrc-chatbot__chips--main) button:last-child:nth-child(odd) {
  grid-column: span 2;
}

.mrc-chatbot__typing {
  align-items: center;
  display: inline-flex;
  gap: 9px;
}

.mrc-chatbot__typing-dots {
  display: inline-flex;
  gap: 4px;
}

.mrc-chatbot__typing-dots i {
  animation: mrc-chatbot-typing 0.9s ease-in-out infinite;
  background: #ef1f26;
  border-radius: 999px;
  display: block;
  height: 5px;
  opacity: 0.35;
  width: 14px;
}

.mrc-chatbot__typing-dots i:nth-child(2) {
  animation-delay: 0.12s;
}

.mrc-chatbot__typing-dots i:nth-child(3) {
  animation-delay: 0.24s;
}

.mrc-chatbot__actions {
  align-self: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 92%;
}

.mrc-chatbot__actions a {
  background: #111;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 11px;
  text-decoration: none;
}

.mrc-chatbot__actions a:first-child {
  background: #ef1f26;
}

.mrc-chatbot__form {
  align-items: end;
  background: #fff;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  display: grid;
  gap: 9px;
  grid-template-columns: 1fr auto;
  padding: 12px;
}

.mrc-chatbot__form[hidden] {
  display: none;
}

.mrc-chatbot__form textarea {
  border: 1px solid rgba(17, 24, 39, 0.16);
  border-radius: 12px;
  color: #111;
  font: inherit;
  max-height: 110px;
  min-height: 44px;
  outline: 0;
  padding: 10px 11px;
  resize: vertical;
}

.mrc-chatbot__form textarea:focus {
  border-color: #ef1f26;
  box-shadow: 0 0 0 3px rgba(239, 31, 38, 0.13);
}

.mrc-chatbot__form button {
  background: #111;
  border: 0;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  min-height: 44px;
  padding: 0 14px;
}

.mrc-chatbot__footer {
  align-items: center;
  background: #fff;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 10px 12px 12px;
}

.mrc-chatbot__footer a {
  color: #ef1f26;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

@keyframes mrc-chatbot-pulse {
  to {
    opacity: 0;
    transform: scale(2.4);
  }
}

@keyframes mrc-chatbot-typing {
  0%,
  100% {
    opacity: 0.25;
    transform: scaleX(0.7);
  }

  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@media (max-width: 640px) {
  .mrc-chatbot {
    bottom: max(14px, env(safe-area-inset-bottom));
    left: 14px;
    right: 14px;
  }

  .mrc-chatbot__launcher {
    min-height: 46px;
    padding: 0 15px;
  }

  .mrc-chatbot__panel {
    bottom: 58px;
    left: 0;
    max-height: calc(100dvh - 92px);
    right: 0;
    width: auto;
  }

  .mrc-chatbot__messages {
    min-height: 190px;
  }

  .mrc-chatbot__chips {
    max-height: 192px;
  }
}
