/* Попап «Заказать демонстрацию» — нативные WP-лендинги */

.mg-demo {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.mg-demo[hidden] {
  display: none;
}

.mg-demo__overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.12);
}

.mg-demo__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  max-height: min(92vh, 720px);
  overflow: auto;
  padding: 32px 28px 28px;
  background: var(--mg-white);
  border: 1px solid var(--mg-border);
  border-radius: var(--mg-radius-ui);
}

.mg-demo__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 28px;
  line-height: 1;
  color: var(--mg-black);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.mg-demo__head h2 {
  margin: 0;
  font-size: clamp(24px, 5vw, 32px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.mg-demo__head p {
  margin: 12px 0 0;
  font-size: clamp(16px, 2.2vw, 18px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.03em;
  color: var(--mg-black);
}

.mg-demo__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 22px;
}

.mg-demo__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mg-demo__field span {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--mg-blue);
}

.mg-demo__field input {
  padding: 10px 0 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--mg-black);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #a39f9f;
  border-radius: 0;
}

.mg-demo__field input:focus {
  outline: none;
  border-bottom-color: var(--mg-blue);
}

.mg-demo__check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--mg-black);
  cursor: pointer;
}

.mg-demo__check input {
  margin-top: 3px;
  flex: 0 0 auto;
}

.mg-demo__check a {
  color: var(--mg-blue-link);
}

.mg-demo__submit {
  margin-top: 6px;
  width: 100%;
  color: var(--mg-on-accent, #fff);
}

.mg-demo__status {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.mg-demo__status[data-state="ok"] {
  color: var(--mg-act-ok, #1f8b4c);
}

.mg-demo__status[data-state="err"] {
  color: #c0392b;
}

body.mg-demo-open {
  overflow: hidden;
}
