/* Попап-заявка — та же логика, что у формы #lead */

.mp-pop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .28s ease, visibility .28s;
}

.mp-pop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mp-pop__veil {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(8, 12, 22, .72);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.mp-pop__panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(94vh, 900px);
  overflow: auto;
  border-radius: 28px;
  background:
    radial-gradient(90% 70% at 100% 100%, rgba(124, 92, 220, .12), transparent 50%),
    radial-gradient(120% 70% at 50% 0%, rgba(168, 135, 79, .16), transparent 55%),
    linear-gradient(165deg, #171D2C 0%, #0E1422 60%, #121826 100%);
  box-shadow:
    0 40px 80px -24px rgba(0, 0, 0, .65),
    inset 0 0 0 1px rgba(226, 207, 166, .14);
  color: #F4EFE6;
  padding: 36px 28px 22px;
  transform: translateY(18px) scale(.97);
  transition: transform .32s cubic-bezier(.22, 1, .36, 1);
}

.mp-pop.is-open .mp-pop__panel {
  transform: none;
}

.mp-pop__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(23, 29, 44, .92);
  color: #F4EFE6;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s;
  z-index: 40;
  isolation: isolate;
}

.mp-pop__close:hover {
  background: rgba(255, 255, 255, .12);
}

.mp-pop__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(200px, .85fr);
  gap: 24px 28px;
  align-items: start;
}

.mp-pop__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #E2CFA6;
}

.mp-pop__eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .7;
}

.mp-pop__title {
  margin: 0 48px 10px 0;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 600;
  color: #fff;
}

.mp-pop__text {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(244, 239, 230, .72);
}

.mp-pop__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mp-pop__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mp-pop__grid-simple {
  grid-template-columns: 1fr;
}

.mp-pop__form input[type="text"],
.mp-pop__form input[type="tel"],
.mp-pop__form input[type="email"],
.mp-pop__form input[type="url"],
.mp-pop__form textarea {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 14px 15px;
  border-radius: 14px;
  border: 1px solid rgba(226, 207, 166, .22);
  background: rgba(8, 12, 22, .45);
  color: #F4EFE6;
  font: inherit;
  font-size: 15px;
  line-height: 1.3;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  box-sizing: border-box;
}

.mp-pop__form textarea {
  min-height: 78px;
  resize: vertical;
}

.mp-pop__form input::placeholder,
.mp-pop__form textarea::placeholder {
  color: rgba(244, 239, 230, .42);
}

.mp-pop__form input:focus,
.mp-pop__form textarea:focus {
  border-color: rgba(226, 207, 166, .55);
  background: rgba(8, 12, 22, .62);
  box-shadow: 0 0 0 3px rgba(168, 135, 79, .2);
}

.mp-pop__span-2 { grid-column: 1 / -1; }

.mp-pop__services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mp-pop__chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid rgba(244, 239, 230, .2);
  background: rgba(255, 255, 255, .06);
  color: rgba(244, 239, 230, .9);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: border-color .2s, background .2s;
}

.mp-pop__chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mp-pop__chip:has(input:checked),
.mp-pop__chip.is-on {
  border-color: rgba(226, 207, 166, .65);
  background: rgba(168, 135, 79, .22);
  color: #fff;
}

.mp-pop__bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mp-pop__consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(244, 239, 230, .7);
}

.mp-pop__consent input {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  border-radius: 6px;
  border: 1.5px solid rgba(226, 207, 166, .45);
  background: rgba(8, 12, 22, .55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}
.mp-pop__consent input:hover {
  border-color: rgba(226, 207, 166, .7);
}
.mp-pop__consent input:checked {
  border-color: #CDB07A;
  background-color: #CDB07A;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.2 8.2l3.1 3.2 6.5-6.8' stroke='%2317120A' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 12px 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .35),
    0 0 0 3px rgba(168, 135, 79, .22);
}
.mp-pop__consent input:focus-visible {
  outline: 2px solid rgba(205, 176, 122, .7);
  outline-offset: 2px;
}

.mp-pop__consent a {
  color: #E2CFA6;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mp-pop__submit {
  width: 100%;
  justify-content: center;
  border: 0;
  cursor: pointer;
  min-height: 50px;
  border-radius: 14px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #17120A !important;
  background: linear-gradient(96deg, #E2CFA6 0%, #CDB07A 45%, #A8874F 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .45),
    0 12px 28px -12px rgba(168, 135, 79, .65) !important;
}

.mp-pop__submit:hover {
  filter: brightness(1.06);
  color: #17120A !important;
}

.mp-pop__submit:disabled {
  opacity: .7;
  cursor: wait;
}

.mp-pop__status {
  margin: 0;
  font-size: 13px;
  text-align: center;
  color: rgba(244, 239, 230, .7);
  min-height: 1.2em;
}

.mp-pop__side {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.mp-pop__art {
  display: block;
  width: 100%;
  max-width: 480px;
  margin: auto -24px -18px 0;
  height: auto;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, .45));
  position: relative;
  z-index: 2;
  transform: scale(1.05);
  transform-origin: center bottom;
}

@media (max-width: 760px) {
  .mp-pop__layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .mp-pop__panel {
    padding: 52px 22px 22px;
  }
  .mp-pop__side {
    order: -1;
    padding-right: 0;
    box-sizing: border-box;
  }
  .mp-pop__title { margin-right: 0; }
  .mp-pop__art {
    max-width: 280px;
    margin: 0 auto 16px;
    transform: none;
  }
  .mp-pop__text {
    margin: 0 0 0;
    padding-right: 0;
    max-width: 100%;
  }
}

@media (max-width: 560px) {
  .mp-pop {
    padding: 10px;
    align-items: flex-end;
  }
  .mp-pop__panel {
    width: 100%;
    border-radius: 24px 24px 18px 18px;
    padding: 56px 16px 24px;
    max-height: 94vh;
  }
  .mp-pop__close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
    z-index: 40;
  }
  .mp-pop__side {
    padding-right: 0;
  }
  .mp-pop__title {
    margin-right: 0;
  }
  .mp-pop__grid { grid-template-columns: 1fr; }
  .mp-pop__span-2 { grid-column: auto; }
  .mp-pop__art {
    max-width: 250px;
    margin: 0 auto 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mp-pop,
  .mp-pop__panel {
    transition: none;
  }
}

body.mp-pop-lock {
  overflow: hidden;
}
