.m71-chatbot {
  --m71-primary: #3b82f6;
  --m71-send: #242424;
  --m71-bubble: #ec008c;
  position: fixed;
  bottom: 22px;
  z-index: 2147483000;
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
}

.m71-chatbot--left { left: 22px; }
.m71-chatbot--right { right: 22px; }

.m71-chatbot *,
.m71-chatbot *::before,
.m71-chatbot *::after {
  box-sizing: border-box;
}

.m71-chatbot__launcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: var(--m71-bubble);
  color: #fff;
  font-size: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
  cursor: pointer;
}

.m71-chatbot__launcher-chat {
  display: block;
  width: 31px;
  height: 31px;
}

.m71-chatbot__launcher-bubble,
.m71-chatbot__launcher-star {
  fill: currentColor;
}

.m71-chatbot__launcher-close {
  display: none;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.m71-chatbot.is-open .m71-chatbot__launcher-spark {
  display: none;
}

.m71-chatbot.is-open .m71-chatbot__launcher-close {
  display: block;
}

.m71-chatbot__panel {
  display: none;
  flex-direction: column;
  position: absolute;
  bottom: 72px;
  width: min(390px, calc(100vw - 28px));
  height: min(820px, calc(100vh - 88px));
  max-height: calc(100vh - 88px);
  overflow: hidden;
  border: 1px solid #e3e3e3;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 45px rgba(0, 0, 0, .18);
}

.m71-chatbot:not(.is-initial) .m71-chatbot__panel {
  height: min(820px, calc(100vh - 88px));
}

.m71-chatbot--left .m71-chatbot__panel { left: 0; }
.m71-chatbot--right .m71-chatbot__panel { right: 0; }
.m71-chatbot.is-open .m71-chatbot__panel { display: flex; }

.m71-chatbot__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 16px;
  border-bottom: 1px solid #ededed;
  background: #fff;
  color: #1f1f1f;
}

.m71-chatbot__header strong {
  font-size: 15px;
  font-weight: 600;
}

.m71-chatbot__header-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}

.m71-chatbot__menu-toggle,
.m71-chatbot__close {
  border: 0;
  background: transparent;
  color: inherit;
  line-height: 1;
  cursor: pointer;
}

.m71-chatbot__menu-toggle {
  padding: 4px 7px 9px;
  font-size: 24px;
}

.m71-chatbot__menu {
  position: absolute;
  top: 38px;
  right: 32px;
  z-index: 2;
  min-width: 142px;
  padding: 4px;
  border: 1px solid #dedede;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}

.m71-chatbot__menu[hidden] {
  display: none;
}

.m71-chatbot__restart {
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #222;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.m71-chatbot__restart:hover,
.m71-chatbot__restart:focus-visible {
  background: #f3f3f3;
}

.m71-chatbot__close {
  font-size: 28px;
}

.m71-chatbot__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 40px;
  background: #fff;
  scroll-padding-bottom: 40px;
}

.m71-chatbot.is-initial .m71-chatbot__messages {
  flex: 1 1 auto;
  overflow-y: visible;
  padding-bottom: 0;
}

.m71-chatbot__message {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0 0 12px;
}

.m71-chatbot__message > div:first-child {
  max-width: 92%;
  padding: 11px 13px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #fafafa;
  box-shadow: none;
  font-size: 14px;
  line-height: 1.48;
  hyphens: none;
  text-align: left;
  text-align-last: auto;
}

.m71-chatbot__message > div:first-child p {
  margin: 0 0 10px;
}

.m71-chatbot__message > div:first-child p:last-child {
  margin-bottom: 0;
}

.m71-chatbot__heading {
  font-weight: 700;
}

.m71-chatbot__message > div:first-child ul,
.m71-chatbot__message > div:first-child ol {
  margin: 8px 0 10px;
  padding-left: 22px;
}

.m71-chatbot__message > div:first-child li {
  margin: 5px 0;
  padding-left: 2px;
}

.m71-chatbot__message > div:first-child strong {
  font-weight: 700;
}

.m71-chatbot__message > div:first-child a {
  color: var(--m71-primary);
  text-decoration: underline;
  overflow-wrap: anywhere;
}

.m71-chatbot__typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 46px;
  min-height: 18px;
}

.m71-chatbot__typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7b7b7b;
  animation: m71-chatbot-typing 1.1s infinite ease-in-out;
}

.m71-chatbot__typing span:nth-child(2) {
  animation-delay: .15s;
}

.m71-chatbot__typing span:nth-child(3) {
  animation-delay: .3s;
}

@keyframes m71-chatbot-typing {
  0%, 80%, 100% {
    opacity: .35;
    transform: translateY(0);
  }

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

.m71-chatbot__message--user {
  align-items: flex-end;
}

.m71-chatbot__message--user > div:first-child {
  border-color: var(--m71-primary);
  border-radius: 12px;
  background: var(--m71-primary);
  color: #fff;
  hyphens: none;
  text-align: left;
}

.m71-chatbot__message.is-pending {
  opacity: .65;
}

.m71-chatbot__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 92%;
  margin-top: 8px;
}

.m71-chatbot__action {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  background: #fff;
  color: #222;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.m71-chatbot__action:hover,
.m71-chatbot__action:focus-visible {
  border-color: #3b82f6;
  background: #3b82f6;
  color: #fff;
  outline: none;
  transform: translateY(-1px);
}

.m71-chatbot__action--appointment {
  border-color: var(--m71-bubble);
  color: #a60062;
}

.m71-chatbot__action--handoff {
  border-color: var(--m71-bubble);
  background: #fff5fb;
  color: #8e0056;
}

.m71-chatbot__feedback {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 5px 0 0 8px;
  color: #6f6f6f;
  font-size: 11px;
}

.m71-chatbot__feedback button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6f6f6f;
  line-height: 1;
  cursor: pointer;
}

.m71-chatbot__feedback button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.m71-chatbot__feedback button:hover,
.m71-chatbot__feedback button.is-selected {
  color: #222;
}

.m71-chatbot__feedback button:disabled {
  cursor: default;
  opacity: .75;
}

.m71-chatbot__handoff {
  width: min(100%, 340px);
  max-width: 100% !important;
}

.m71-chatbot__handoff p {
  margin: 6px 0 10px;
}

.m71-chatbot__handoff-form {
  display: grid;
  gap: 9px;
  margin-top: 8px;
}

.m71-chatbot__handoff-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.m71-chatbot__handoff-form input,
.m71-chatbot__handoff-form textarea {
  width: 100%;
  margin-top: 3px;
  padding: 8px 9px;
  border: 1px solid #c9c9c9;
  border-radius: 8px;
  font: inherit;
  font-weight: 400;
}

.m71-chatbot__handoff-form input.is-invalid {
  border-color: #d93025;
  background: #fff6f5;
  box-shadow: 0 0 0 1px rgba(217, 48, 37, .18);
}

.m71-chatbot__handoff-form textarea {
  min-height: 132px;
  overflow: hidden;
  resize: none;
}

.m71-chatbot__handoff-form button {
  justify-self: start;
  min-height: 34px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: var(--m71-primary);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.m71-chatbot__handoff-form button:disabled {
  cursor: default;
  opacity: .65;
}

.m71-chatbot__consent {
  display: flex !important;
  gap: 7px;
  align-items: flex-start;
  font-weight: 400 !important;
}

.m71-chatbot__consent input {
  width: auto;
  margin-top: 2px;
}

.m71-chatbot__handoff-status {
  display: none;
  margin: 0;
  padding: 10px 11px;
  border-radius: 9px;
  color: #4c5a4c;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 600;
}

.m71-chatbot__handoff-status:not(:empty) {
  display: block;
}

.m71-chatbot__handoff-status.is-success {
  border: 1px solid #b7dfbf;
  background: #eef9f0;
  color: #17662b;
}

.m71-chatbot__handoff-status.is-error {
  border: 1px solid #f0b8b4;
  background: #fff4f3;
  color: #9f241a;
}

.m71-chatbot__suggestions button {
  border: 1px solid #dedede;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.m71-chatbot__suggestions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
  min-width: 0;
  gap: 7px;
  margin-top: auto;
  overflow-x: hidden;
  overflow-y: visible;
  padding: 28px 16px 10px;
  background: #fff;
}

.m71-chatbot__suggestions[hidden] {
  display: none;
  margin-top: 0;
  padding: 0;
}

.m71-chatbot__suggestions button {
  max-width: 92%;
  padding: 9px 14px;
  background: #fff;
  color: #222;
  font-size: 13px;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}

.m71-chatbot__suggestions button:hover,
.m71-chatbot__suggestions button:focus-visible {
  border-color: #3b82f6;
  background: #3b82f6;
  color: #fff;
  outline: none;
  transform: translateY(-1px);
}

.m71-chatbot__form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #ededed;
  background: #fff;
}

.m71-chatbot__composer {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 0 7px 0 14px;
  border: 1px solid #9b9b9b;
  border-radius: 999px;
  background: #fff;
}

.m71-chatbot__form textarea {
  flex: 1;
  height: 22px;
  min-height: 22px;
  max-height: 72px;
  resize: none;
  overflow: hidden;
  padding: 2px 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.3;
}

.m71-chatbot__form textarea:focus,
.m71-chatbot__form textarea:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.m71-chatbot__composer:focus-within {
  border-color: #4c4c4c;
  box-shadow: 0 0 0 2px rgba(43, 43, 43, .12);
}

.m71-chatbot__voice,
.m71-chatbot__send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.m71-chatbot__voice {
  width: 32px;
  height: 32px;
  background: transparent;
  color: #777;
}

.m71-chatbot__voice svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.m71-chatbot__voice:disabled {
  cursor: default;
  opacity: .45;
}

.m71-chatbot__voice.is-listening {
  color: var(--m71-bubble);
}

.m71-chatbot__send {
  width: 38px;
  height: 38px;
  background: rgba(36, 36, 36, .06);
  color: rgba(36, 36, 36, .14);
  transition: background .16s ease, color .16s ease, opacity .16s ease;
}

.m71-chatbot__send svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.m71-chatbot__send:disabled {
  cursor: default;
}

.m71-chatbot__send.is-ready {
  background: var(--m71-send);
  color: #fff;
}

.m71-chatbot footer {
  padding: 0 18px 12px;
  background: #fff;
  color: #6d746e;
  font-size: 10px;
  text-align: center;
}

.m71-chatbot footer a {
  color: inherit;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 640px) {
  .m71-chatbot--left {
    right: 0;
    bottom: 0;
    left: 0;
  }

  .m71-chatbot--right {
    right: 0;
    bottom: 0;
    left: 0;
  }

  .m71-chatbot__panel {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .m71-chatbot:not(.is-initial) .m71-chatbot__panel {
    height: 100vh;
    height: 100dvh;
  }

  .m71-chatbot--left .m71-chatbot__panel {
    right: 0;
    left: 0;
  }

  .m71-chatbot--right .m71-chatbot__panel {
    right: 0;
    left: 0;
  }

  .m71-chatbot__launcher {
    position: fixed;
    bottom: max(14px, env(safe-area-inset-bottom));
    left: max(14px, env(safe-area-inset-left));
  }
}

@media (max-height: 500px) and (min-width: 641px) {
  .m71-chatbot__panel {
    bottom: 66px;
    max-height: calc(100vh - 98px);
    max-height: calc(100dvh - 98px - env(safe-area-inset-bottom));
  }

  .m71-chatbot:not(.is-initial) .m71-chatbot__panel {
    height: calc(100vh - 98px);
    height: calc(100dvh - 98px - env(safe-area-inset-bottom));
  }

  .m71-chatbot__header {
    min-height: 42px;
    padding: 8px 12px;
  }

  .m71-chatbot__messages {
    min-height: 32px;
    padding: 8px 10px;
  }

  .m71-chatbot__message {
    margin-bottom: 7px;
  }

  .m71-chatbot__message > div:first-child {
    padding: 7px 10px;
    font-size: 12px;
    line-height: 1.35;
  }

  .m71-chatbot__suggestions {
    max-height: 90px;
    overflow-y: auto;
    padding: 4px 10px 6px;
  }

  .m71-chatbot__suggestions button {
    padding: 5px 10px;
    font-size: 12px;
  }

  .m71-chatbot__form {
    padding: 6px 10px;
  }

  .m71-chatbot__form textarea {
    min-height: 38px;
    padding: 8px 11px;
  }

  .m71-chatbot__form button {
    width: 38px;
    height: 38px;
  }

  .m71-chatbot footer {
    padding: 0 10px 6px;
    font-size: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .m71-chatbot * {
    scroll-behavior: auto !important;
  }
}
