.in-motion-gymbot-chat {
  --imgbc-bg: #ffffff;
  --imgbc-text: #1d252c;
  --imgbc-muted: #5d6b78;
  --imgbc-border: #d7dde3;
  --imgbc-brand: #0f766e;
  --imgbc-brand-dark: #115e59;
  --imgbc-bot: #eef3f7;
  --imgbc-user: #d9f3ee;
  font-family: inherit;
}

.in-motion-gymbot-chat--floating {
  bottom: 18px;
  position: fixed;
  right: 18px;
  z-index: 9999;
}

.in-motion-gymbot-chat__toggle {
  background: var(--imgbc-brand);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 12px 18px;
}

.in-motion-gymbot-chat__toggle:hover,
.in-motion-gymbot-chat__toggle:focus {
  background: var(--imgbc-brand-dark);
}

.in-motion-gymbot-chat__panel {
  background: var(--imgbc-bg);
  border: 1px solid var(--imgbc-border);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.2);
  color: var(--imgbc-text);
  display: flex;
  flex-direction: column;
  max-height: min(680px, calc(100vh - 36px));
  min-height: 420px;
  overflow: hidden;
  width: min(380px, calc(100vw - 36px));
}

.in-motion-gymbot-chat--floating .in-motion-gymbot-chat__panel {
  bottom: 58px;
  display: none;
  position: absolute;
  right: 0;
}

.in-motion-gymbot-chat--floating.is-open .in-motion-gymbot-chat__panel {
  display: flex;
}

.in-motion-gymbot-chat:not(.in-motion-gymbot-chat--floating) .in-motion-gymbot-chat__toggle {
  display: none;
}

.in-motion-gymbot-chat__head {
  align-items: center;
  background: var(--imgbc-brand);
  color: #ffffff;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 16px;
}

.in-motion-gymbot-chat__head strong {
  font-size: 16px;
  line-height: 1.3;
}

.in-motion-gymbot-chat__head button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  font-size: 26px;
  height: 32px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 32px;
}

.in-motion-gymbot-chat:not(.in-motion-gymbot-chat--floating) .in-motion-gymbot-chat__head button {
  visibility: hidden;
}

.in-motion-gymbot-chat__intro,
.in-motion-gymbot-chat__privacy {
  color: var(--imgbc-muted);
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
  padding: 12px 16px;
}

.in-motion-gymbot-chat__intro {
  border-bottom: 1px solid var(--imgbc-border);
}

.in-motion-gymbot-chat__privacy {
  border-top: 1px solid var(--imgbc-border);
  padding-top: 8px;
}

.in-motion-gymbot-chat__messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 14px 16px;
}

.in-motion-gymbot-chat__message {
  display: flex;
  font-size: 14px;
  line-height: 1.45;
}

.in-motion-gymbot-chat__message > div {
  border-radius: 8px;
  max-width: 86%;
  overflow-wrap: anywhere;
  padding: 9px 11px;
  white-space: pre-wrap;
}

.in-motion-gymbot-chat__message--bot,
.in-motion-gymbot-chat__message--bot_error,
.in-motion-gymbot-chat__message--human {
  justify-content: flex-start;
}

.in-motion-gymbot-chat__message--bot > div,
.in-motion-gymbot-chat__message--bot_error > div,
.in-motion-gymbot-chat__message--human > div {
  background: var(--imgbc-bot);
}

.in-motion-gymbot-chat__message--user {
  justify-content: flex-end;
}

.in-motion-gymbot-chat__message--user > div {
  background: var(--imgbc-user);
}

.in-motion-gymbot-chat__form {
  align-items: flex-end;
  border-top: 1px solid var(--imgbc-border);
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 12px 16px;
}

.in-motion-gymbot-chat__form textarea {
  border: 1px solid var(--imgbc-border);
  border-radius: 8px;
  flex: 1;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
  min-height: 44px;
  padding: 10px;
  resize: vertical;
}

.in-motion-gymbot-chat__form button {
  background: var(--imgbc-brand);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 0 16px;
}

.in-motion-gymbot-chat__form button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.in-motion-gymbot-chat__minimise {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--imgbc-border);
  color: var(--imgbc-brand-dark);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  padding: 10px 16px;
  text-align: center;
  width: 100%;
}

.in-motion-gymbot-chat__minimise:hover,
.in-motion-gymbot-chat__minimise:focus {
  background: var(--imgbc-bot);
}

.in-motion-gymbot-chat:not(.in-motion-gymbot-chat--floating) .in-motion-gymbot-chat__minimise {
  display: none;
}

@media (max-width: 480px) {
  .in-motion-gymbot-chat--floating {
    bottom: 12px;
    right: 12px;
  }

  .in-motion-gymbot-chat__panel {
    max-height: calc(100vh - 78px);
    min-height: 360px;
    width: calc(100vw - 24px);
  }

  @supports (height: 100dvh) {
    .in-motion-gymbot-chat__panel {
      max-height: calc(100dvh - 78px);
    }
  }

  .in-motion-gymbot-chat--floating .in-motion-gymbot-chat__panel {
    bottom: 54px;
  }
}
