.mlc-widget {
  --mlc-red: #007bcf;
  --mlc-ink: #171717;
  --mlc-soft: #f4f6f8;
  --mlc-line: #d9dde3;
  color: var(--mlc-ink);
  font-family: Arial, Helvetica, sans-serif;
  position: fixed;
  z-index: 99999;
  right: 18px;
  bottom: 18px;
}

.mlc-launcher {
  align-items: center;
  background: var(--mlc-red);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 15px;
  font-weight: 700;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
}

.mlc-launcher-dot {
  background: #fff;
  border-radius: 50%;
  display: block;
  height: 9px;
  width: 9px;
}

.mlc-panel {
  background: #fff;
  border: 1px solid var(--mlc-line);
  border-radius: 8px;
  bottom: 64px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
  display: none;
  overflow: hidden;
  position: absolute;
  right: 0;
  width: min(370px, calc(100vw - 28px));
}

.mlc-widget.is-open .mlc-panel {
  display: block;
}

.mlc-panel-head {
  align-items: center;
  background: var(--mlc-ink);
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
}

.mlc-panel-head strong,
.mlc-panel-head span {
  display: block;
}

.mlc-panel-head span {
  color: #cfd3d8;
  font-size: 12px;
  margin-top: 2px;
}

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

.mlc-messages {
  background: var(--mlc-soft);
  height: 300px;
  overflow-y: auto;
  padding: 14px;
}

.mlc-note,
.mlc-error {
  background: #fff;
  border: 1px solid var(--mlc-line);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  padding: 10px 12px;
}

.mlc-error {
  border-color: #b8ddf7;
  color: #00558f;
  margin-top: 8px;
}

.mlc-message {
  display: flex;
  flex-direction: column;
  margin: 8px 0;
  max-width: 88%;
}

.mlc-message span {
  border-radius: 8px;
  line-height: 1.4;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.mlc-message small {
  color: #606873;
  font-size: 11px;
  margin-top: 3px;
}

.mlc-message-visitor {
  align-items: flex-end;
  margin-left: auto;
}

.mlc-message-visitor span {
  background: var(--mlc-red);
  color: #fff;
}

.mlc-message-admin span {
  background: #fff;
  border: 1px solid var(--mlc-line);
}

.mlc-start-form,
.mlc-send-form {
  background: #fff;
  border-top: 1px solid var(--mlc-line);
  display: grid;
  gap: 8px;
  padding: 12px;
}

.mlc-send-form {
  grid-template-columns: 1fr auto;
}

.mlc-start-form[hidden],
.mlc-send-form[hidden] {
  display: none;
}

.mlc-start-form input,
.mlc-start-form textarea,
.mlc-send-form textarea {
  border: 1px solid var(--mlc-line);
  border-radius: 6px;
  box-sizing: border-box;
  font: inherit;
  min-width: 0;
  padding: 10px;
  resize: vertical;
  width: 100%;
}

.mlc-start-form button,
.mlc-send-form button {
  background: var(--mlc-red);
  border: 0;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 10px 14px;
}

.mlc-start-form button:disabled,
.mlc-send-form button:disabled {
  opacity: .55;
}

.mlc-small {
  color: #606873;
  font-size: 11px;
  margin: 0;
}

@media (max-width: 480px) {
  .mlc-widget {
    bottom: 12px;
    left: 12px;
    right: 12px;
  }

  .mlc-launcher {
    margin-left: auto;
  }

  .mlc-panel {
    bottom: 60px;
    left: 0;
    right: 0;
    width: auto;
  }
}
