#mwai-chat-id {
  --mwai-background-color-dark: #343541;
  --mwai-background-color-light: #454654;
  --mwai-font-color: white;
  --mwai-border-radius: 10px;
}

#mwai-chat-id .mwai-open-button {
  position: absolute;
  right: 0;
  bottom: 0;
  transition: all 0.2s ease-out;
  z-index: 9999;
}

#mwai-chat-id .mwai-open-button:hover {
  cursor: pointer;
  filter: hue-rotate(100deg);
}

#mwai-chat-id .mwai-content {
  background: var(--mwai-background-color-dark);
  color: var(--mwai-font-color);
  font-size: 15px;
  border-radius: var(--mwai-border-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#mwai-chat-id .mwai-conversation {
  overflow: auto;
}

#mwai-chat-id * {
  box-sizing: border-box;
}

#mwai-chat-id a {
  color: #2196f3;
}

#mwai-chat-id h1 {
  font-size: 200%;
}

#mwai-chat-id h2 {
  font-size: 160%;
}

#mwai-chat-id h3 {
  font-size: 140%;
}

#mwai-chat-id h4 {
  font-size: 120%;
}

#mwai-chat-id pre {
  color: var(--mwai-font-color);
  border-radius: var(--mwai-border-radius);
  padding: 10px 15px;
  break-after: auto;
  font-size: 95%;
  font-family: system-ui;
  background: #343541;
}

#mwai-chat-id pre code {
  padding: 0 !important;
  font-family: system-ui;
  background: #343541;
}

#mwai-chat-id ol {
  padding: 0;
  margin: 0 0 0 20px;
}

#mwai-chat-id .mwai-reply {
  display: flex;
  padding: 15px;
}

#mwai-chat-id .mwai-ai {
  background: var(--mwai-background-color-light);
}

#mwai-chat-id .mwai-name {
  color: #a0a0a0;
  margin-right: 20px;
}

#mwai-chat-id .mwai-text {
  flex: auto;
}

#mwai-chat-id .mwai-text > *:first-child {
  margin-top: 0;
}

#mwai-chat-id .mwai-text > *:last-child {
  margin-bottom: 0;
}

#mwai-chat-id .mwai-input {
  display: flex;
  padding: 15px;
  border-top: 1px solid var(--mwai-background-color-light);
}

#mwai-chat-id .mwai-input textarea {
  background: #40414f;
  color: var(--mwai-font-color);
  flex: auto;
  padding: 8px 15px;
  border: none;
  border-radius: 5px;
  font-size: 15px;
  resize: none;
  font-family: inherit;
  line-height: 30px;
}

#mwai-chat-id .mwai-input textarea:focus {
  outline: none;
}

#mwai-chat-id .mwai-input button {
  background: none;
  color: var(--mwai-font-color);
  border: 1px solid #40414f;
  margin-left: 15px;
  width: 80px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s ease-out;
  max-height: 60px;
}

#mwai-chat-id .mwai-input button:hover {
  background: var(--mwai-background-color-light);
}

#mwai-chat-id button {
  position: relative;
}

#mwai-chat-id button[disabled] span {
  display: none;
}

#mwai-chat-id button[disabled]::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  border: 3px solid transparent;
  border-top-color: var(--mwai-font-color);
  border-radius: 50%;
  animation: mwai-button-spinner 1s ease infinite;
}

#mwai-chat-id.mwai-window {
  position: fixed;
  right: 30px;
  bottom: 30px;
  width: 460px;
  z-index: 9999;
}

#mwai-chat-id.mwai-window .mwai-header {
  display: none;
  justify-content: flex-end;
  align-items: center;
}

#mwai-chat-id.mwai-window .mwai-header .mwai-resize-button {
  justify-content: center;
  height: 40px;
  width: 36px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

#mwai-chat-id.mwai-window .mwai-header .mwai-resize-button:before {
  transition: all 0.2s ease-out;
  content: ' ';
  cursor: pointer;
  position: absolute;
  height: 15px;
  width: 15px;
  opacity: 0.75;
  border: 2px solid var(--mwai-font-color);
}

#mwai-chat-id.mwai-window .mwai-header .mwai-resize-button:hover:before {
  width: 20px;
  height: 20px;
}

#mwai-chat-id.mwai-window .mwai-header .mwai-close-button {
  justify-content: center;
  height: 40px;
  width: 35px;
  cursor: pointer;
}

#mwai-chat-id.mwai-window .mwai-header .mwai-close-button:before, #mwai-chat-id.mwai-window .mwai-header .mwai-close-button:after {
  content: ' ';
  cursor: pointer;
  position: absolute;
  height: 30px;
  width: 2px;
  background-color: var(--mwai-font-color);
  opacity: 0.75;
}

#mwai-chat-id.mwai-window .mwai-header .mwai-close-button:before {
  transition: all 0.2s ease-out;
  transform: translate(16px, 5px) rotate(45deg);
}

#mwai-chat-id.mwai-window .mwai-header .mwai-close-button:after {
  transition: all 0.2s ease-out;
  transform: translate(16px, 5px) rotate(-45deg);
}

#mwai-chat-id.mwai-window .mwai-header .mwai-close-button:hover:before {
  opacity: 1;
  transform: translate(16px, 5px) rotate(135deg);
}

#mwai-chat-id.mwai-window .mwai-header .mwai-close-button:hover:after {
  opacity: 1;
  transform: translate(16px, 5px) rotate(45deg);
}

#mwai-chat-id.mwai-window .mwai-content {
  display: flex;
  opacity: 0;
  max-height: 40vh;
}

#mwai-chat-id.mwai-window.mwai-fullscreen .mwai-resize-button:before {
  width: 20px;
  height: 20px;
}

#mwai-chat-id.mwai-window.mwai-fullscreen .mwai-resize-button:hover:before {
  width: 15px;
  height: 15px;
}

#mwai-chat-id.mwai-fullscreen:not(.mwai-window), #mwai-chat-id.mwai-fullscreen.mwai-window.mwai-open {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  width: inherit;
  height: inherit;
  max-height: inherit;
  max-width: inherit;
  display: flex;
  flex-direction: column;
  margin: 0;
}

#mwai-chat-id.mwai-fullscreen:not(.mwai-window) .mwai-content, #mwai-chat-id.mwai-fullscreen.mwai-window.mwai-open .mwai-content {
  height: 100%;
  max-height: inherit;
  border-radius: inherit;
}

#mwai-chat-id.mwai-fullscreen:not(.mwai-window) .mwai-content .mwai-conversation, #mwai-chat-id.mwai-fullscreen.mwai-window.mwai-open .mwai-content .mwai-conversation {
  flex: auto;
}

#mwai-chat-id.mwai-window.mwai-open .mwai-header {
  display: flex;
}

#mwai-chat-id.mwai-window.mwai-open .mwai-content {
  display: flex;
  transition: opacity 200ms ease-in-out 0s;
  opacity: 1;
}

#mwai-chat-id.mwai-window.mwai-open .mwai-open-button {
  display: none;
}

@media (max-width: 760px) {
  #mwai-chat-id.mwai-window {
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: inherit;
  }
  #mwai-chat-id .mwai-reply {
    flex-direction: column;
  }
  #mwai-chat-id .mwai-input {
    flex-direction: column;
  }
  #mwai-chat-id .mwai-input button {
    margin: 15px 0 0 0;
    height: 40px;
    width: inherit;
  }
  #mwai-chat-id .mwai-name {
    margin-right: 0;
  }
}

@keyframes mwai-button-spinner {
  from {
    transform: rotate(0turn);
  }
  to {
    transform: rotate(1turn);
  }
}

.admin-bar #mwai-chat-id.mwai-fullscreen:not(.mwai-window),
.admin-bar #mwai-chat-id.mwai-fullscreen.mwai-window.mwai-open {
  top: 32px;
}
