.mm-site-chat {
  --mm-chat-green: #4f9a4f;
  --mm-chat-green-dark: #3f7e3f;
  --mm-chat-ink: #1f2a1f;
  --mm-chat-muted: #5c6b5c;
  --mm-chat-line: #d7e0d7;
  --mm-chat-bg: #f7faf7;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99990;
  font-family: Georgia, "Times New Roman", serif;
}

.mm-site-chat__fab {
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: var(--mm-chat-green);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(31, 42, 31, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.mm-site-chat__fab:hover {
  background: var(--mm-chat-green-dark);
  transform: translateY(-1px);
}

.mm-site-chat__icon-close {
  display: none;
}

.mm-site-chat.is-open .mm-site-chat__icon-open {
  display: none;
}

.mm-site-chat.is-open .mm-site-chat__icon-close {
  display: block;
}

.mm-site-chat__panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(360px, calc(100vw - 32px));
  background: #fff;
  border: 1px solid var(--mm-chat-line);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(31, 42, 31, 0.18);
  overflow: hidden;
  transform-origin: bottom right;
  animation: mm-chat-in 0.22s ease;
}

@keyframes mm-chat-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.mm-site-chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #5bb75b, #3f7e3f);
  color: #fff;
}

.mm-site-chat__head strong {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.mm-site-chat__x {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.9;
}

.mm-site-chat__intro {
  margin: 0;
  padding: 12px 16px 0;
  color: var(--mm-chat-muted);
  font-size: 14px;
  line-height: 1.45;
  font-family: Arial, Helvetica, sans-serif;
}

#mm-site-chat-form {
  padding: 12px 16px 16px;
}

.mm-site-chat__field {
  margin-bottom: 12px;
}

.mm-site-chat__field label {
  display: block;
  margin-bottom: 6px;
  color: var(--mm-chat-ink);
  font-size: 13px;
  font-family: Arial, Helvetica, sans-serif;
}

.mm-site-chat__field label span {
  color: #c0392b;
}

.mm-site-chat__input {
  width: 100%;
  border: 1px solid var(--mm-chat-line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
  color: var(--mm-chat-ink);
  background: var(--mm-chat-bg);
  outline: none;
  font-family: Arial, Helvetica, sans-serif;
  box-sizing: border-box;
}

.mm-site-chat__input:focus {
  border-color: var(--mm-chat-green);
  background: #fff;
}

.mm-site-chat__textarea {
  resize: vertical;
  min-height: 96px;
}

.mm-site-chat__err {
  min-height: 16px;
  margin-top: 4px;
  color: #c0392b;
  font-size: 12px;
  font-family: Arial, Helvetica, sans-serif;
}

.mm-site-chat__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.mm-site-chat__alert {
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.4;
}

.mm-site-chat__alert--ok {
  background: #e8f6e8;
  color: #216321;
}

.mm-site-chat__alert--bad {
  background: #fdecea;
  color: #8a1f11;
}

.mm-site-chat__submit {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--mm-chat-green);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
}

.mm-site-chat__submit:hover {
  background: var(--mm-chat-green-dark);
}

.mm-site-chat__submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

@media (max-width: 480px) {
  .mm-site-chat {
    right: 14px;
    bottom: 14px;
  }

  .mm-site-chat__panel {
    bottom: 68px;
  }
}
