/* CTA / Расчёт индивидуальной формы */

body:has(.sp-mold-cta) .page,
body:has(.sp-mold-cta) .content {
  overflow: visible;
}

.sp-mold-cta {
  box-sizing: border-box;
  width: 100vw;
  max-width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 0 20px;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

.sp-mold-cta *,
.sp-mold-cta *::before,
.sp-mold-cta *::after {
  box-sizing: border-box;
}

.sp-mold-cta__shell {
  width: 100%;
  max-width: 1880px;
  margin: 0 auto;
}

.sp-mold-cta__panel {
  position: relative;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 0;
  height: 448px;
  min-height: 448px;
  max-height: 448px;
  padding: 0 220px;
  background: #022945;
  border-radius: 32px;
  overflow: hidden;
}

.sp-mold-cta__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  width: 467px;
  max-width: 467px;
  height: 448px;
  padding: 80px 0;
  flex: 0 0 467px;
  position: relative;
  z-index: 1;
}

.sp-mold-cta__title {
  margin: 0;
  padding: 0;
  font-weight: 500;
  font-size: 48px;
  line-height: 52px;
  color: #fff;
}

.sp-mold-cta__text {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 467px;
  font-weight: 400;
  font-size: 18px;
  line-height: 28px;
  color: rgba(255, 255, 255, 0.8);
}

.sp-mold-cta__media {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 0;
  width: 506px;
  height: 448px;
  margin: 0 auto;
  overflow: hidden;
  pointer-events: none;
}

.sp-mold-cta__img {
  position: absolute;
  left: 0;
  bottom: 0;
  top: auto;
  width: 506px;
  height: 448px;
  max-width: none;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
  user-select: none;
}

.sp-mold-cta__form-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  width: 467px;
  max-width: 467px;
  height: 448px;
  padding: 80px 0;
  flex: 0 0 467px;
  position: relative;
  z-index: 1;
}

.sp-mold-cta__form-wrap form {
  display: block;
  width: 100%;
  margin: 0;
}

.sp-mold-cta__form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  width: 100%;
}

.sp-mold-cta__fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.sp-mold-cta__field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}

.sp-mold-cta__field input[type="text"],
.sp-mold-cta__field input[type="tel"],
.sp-mold-cta__field input[type="email"],
.sp-mold-cta__field input.inputtext,
.sp-mold-cta__field textarea {
  display: block;
  width: 100%;
  height: 52px;
  margin: 0;
  padding: 14px 18px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: #f5f6f8;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 24px;
  color: #131927;
  outline: none;
  box-shadow: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.sp-mold-cta__field textarea {
  height: auto;
  min-height: 104px;
  resize: vertical;
}

.sp-mold-cta__field input::placeholder,
.sp-mold-cta__field textarea::placeholder {
  color: #4d5461;
  opacity: 1;
}

.sp-mold-cta__field input:focus::placeholder,
.sp-mold-cta__field textarea:focus::placeholder {
  color: transparent;
  opacity: 0;
}

.sp-mold-cta__field.is-phone input::placeholder {
  opacity: 1;
}

.sp-mold-cta__field.is-phone input:focus::placeholder {
  opacity: 0;
}

.sp-mold-cta__field input:hover:not(:disabled):not(:focus),
.sp-mold-cta__field textarea:hover:not(:disabled):not(:focus) {
  background: #ebedf0;
  border-color: transparent;
}

.sp-mold-cta__field input:focus,
.sp-mold-cta__field input:active,
.sp-mold-cta__field textarea:focus,
.sp-mold-cta__field textarea:active {
  background: #fff;
  border-color: #006ab5;
}

.sp-mold-cta__field.has-error input,
.sp-mold-cta__field.has-error textarea,
.sp-mold-cta__field input.is-error,
.sp-mold-cta__field textarea.is-error {
  border-color: #ee443f !important;
  background: #fdecec;
}

.sp-mold-cta__field-error,
.sp-mold-cta__agree-error {
  margin: 0;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #ee443f;
}

.sp-mold-cta__field-error[hidden],
.sp-mold-cta__agree-error[hidden] {
  display: none !important;
}

.sp-mold-cta__footer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  width: 100%;
}

.sp-mold-cta__actions {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: 100%;
}

.sp-mold-cta__check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  cursor: pointer;
}

.sp-mold-cta__check input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.sp-mold-cta__check-box {
  box-sizing: border-box;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  margin-top: 0;
  border: 2px solid #d2d5db;
  border-radius: 4px;
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sp-mold-cta__check:hover .sp-mold-cta__check-box {
  border-color: #9ea2ae;
  background: center / 9px 7px no-repeat
    url("data:image/svg+xml,%3Csvg width='9' height='7' viewBox='0 0 9 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3 6L8 1' stroke='%23D2D5DB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.sp-mold-cta__check input:checked + .sp-mold-cta__check-box {
  border-color: #006ab5;
  background: #006ab5 center / 9px 7px no-repeat
    url("data:image/svg+xml,%3Csvg width='9' height='7' viewBox='0 0 9 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3 6L8 1' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.sp-mold-cta__check:hover input:checked + .sp-mold-cta__check-box {
  border-color: #00528c;
  background-color: #00528c;
}

.sp-mold-cta__check input:disabled + .sp-mold-cta__check-box {
  border-color: transparent;
  background: #ebedf0;
}

.sp-mold-cta__check input:disabled:checked + .sp-mold-cta__check-box {
  border-color: transparent;
  background-color: #9ea2ae;
  background-image: url("data:image/svg+xml,%3Csvg width='9' height='7' viewBox='0 0 9 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 4L3 6L8 1' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center;
  background-size: 9px 7px;
  background-repeat: no-repeat;
}

.sp-mold-cta__check-text {
  flex: 1 1 auto;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #fff;
}

.sp-mold-cta__check-text a {
  color: #127be9;
  text-decoration: none;
  font-weight: 500;
}

.sp-mold-cta__check-text a:hover {
  color: #127be9;
  text-decoration: none;
}

.sp-mold-cta__footer.is-error .sp-mold-cta__check-box {
  border-color: #ee443f;
}

.sp-mold-cta__submit {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 200px;
  height: 52px;
  padding: 14px 24px;
  border: 0;
  border-radius: 10px;
  background: #006ab5;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sp-mold-cta__submit:hover {
  background: #005a9a;
}

.sp-mold-cta__submit:disabled {
  opacity: 0.5;
  cursor: default;
}

.sp-mold-cta__panel.is-loading {
  pointer-events: none;
}

.sp-mold-cta__panel.is-loading .sp-mold-cta__submit {
  opacity: 0.5;
  cursor: wait;
}

.sp-mold-cta__success {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #fff;
}

.sp-mold-cta__success[hidden],
.sp-mold-cta__form[hidden] {
  display: none !important;
}

.sp-mold-cta__success-title {
  font-weight: 500;
  font-size: 32px;
  line-height: 40px;
}

.sp-mold-cta__success-text {
  font-weight: 400;
  font-size: 18px;
  line-height: 28px;
  color: rgba(255, 255, 255, 0.8);
}

.sp-mold-cta__errors {
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 20px;
  color: #ffb4b4;
}

.sp-mold-cta__captcha {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

@media (max-width: 1599px) {
  .sp-mold-cta__panel {
    gap: 0;
    padding: 0 64px;
  }

  .sp-mold-cta__media {
    width: min(506px, 36vw);
  }

  .sp-mold-cta__img {
    width: 100%;
    height: 100%;
  }
}

/* Планшет / узкий десктоп: стек (текст → форма → фото) */
@media (max-width: 1199px) {
  .sp-mold-cta {
    padding: 40px 16px;
  }

  .sp-mold-cta__panel {
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: 40px;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 40px 32px 0;
    border-radius: 24px;
    overflow: hidden;
  }

  .sp-mold-cta__copy {
    order: 1;
    width: 100%;
    max-width: none;
    height: auto;
    padding: 0;
    flex: none;
    gap: 16px;
  }

  .sp-mold-cta__title {
    font-size: 40px;
    line-height: 48px;
  }

  .sp-mold-cta__text {
    max-width: none;
    font-size: 16px;
    line-height: 24px;
  }

  .sp-mold-cta__text br {
    display: none;
  }

  .sp-mold-cta__form-wrap {
    order: 2;
    width: 100%;
    max-width: none;
    height: auto;
    padding: 0;
    flex: none;
    align-self: stretch;
  }

  .sp-mold-cta__form {
    gap: 20px;
  }

  .sp-mold-cta__fields {
    gap: 10px;
  }

  .sp-mold-cta__field input[type="text"],
  .sp-mold-cta__field input[type="tel"],
  .sp-mold-cta__field input[type="email"],
  .sp-mold-cta__field input.inputtext,
  .sp-mold-cta__field textarea {
    height: 48px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 16px;
    line-height: 24px;
  }

  .sp-mold-cta__footer {
    gap: 20px;
  }

  .sp-mold-cta__submit {
    min-width: 134px;
    width: auto;
    height: 48px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    line-height: 24px;
  }

  .sp-mold-cta__media {
    order: 3;
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
    width: 100%;
    height: 280px;
    margin: 0;
    overflow: hidden;
    pointer-events: none;
  }

  .sp-mold-cta__img {
    position: absolute;
    left: 50%;
    bottom: 0;
    top: auto;
    width: auto;
    height: 115%;
    max-width: none;
    margin: 0;
    display: block;
    transform: translateX(-50%);
    object-fit: contain;
    object-position: center bottom;
  }
}

/* Mobile — Figma Frame 2043683995: на весь контейнер */
@media (max-width: 776px) {
  .sp-mold-cta {
    padding: 40px 0;
  }

  .sp-mold-cta__shell {
    max-width: none;
  }

  .sp-mold-cta__panel {
    gap: 40px;
    padding: 24px 16px 0;
    border-radius: 24px;
  }

  .sp-mold-cta__copy {
    gap: 16px;
  }

  .sp-mold-cta__title {
    font-size: 32px;
    line-height: 40px;
  }

  .sp-mold-cta__text {
    font-size: 16px;
    line-height: 24px;
    color: rgba(255, 255, 255, 0.8);
  }

  .sp-mold-cta__form {
    gap: 20px;
  }

  .sp-mold-cta__fields {
    gap: 10px;
  }

  .sp-mold-cta__field input[type="text"],
  .sp-mold-cta__field input[type="tel"],
  .sp-mold-cta__field input[type="email"],
  .sp-mold-cta__field input.inputtext,
  .sp-mold-cta__field textarea {
    height: 48px;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 16px;
    line-height: 24px;
  }

  .sp-mold-cta__footer {
    gap: 20px;
  }

  .sp-mold-cta__check-text {
    font-size: 14px;
    line-height: 20px;
    color: #fff;
  }

  .sp-mold-cta__submit {
    align-self: flex-start;
    min-width: 134px;
    width: auto;
    height: 48px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    line-height: 24px;
  }

  .sp-mold-cta__media {
    height: 217px;
  }

  .sp-mold-cta__img {
    height: 120%;
    bottom: -1px;
  }
}

