.bg-lead-form {
  --bg-form-black: #050505;
  --bg-form-line: #202020;
  --bg-form-muted: #777;
  --bg-form-soft: #a6a6a6;
  --bg-form-green: #27d17f;
  position: relative;
  color: #fff;
  font-family: inherit;
}

.bg-lead-form *,
.bg-lead-form *::before,
.bg-lead-form *::after {
  box-sizing: border-box;
}

.bg-lead-form .modal-bg,
.bg-lead-form .footer-wrap {
  width: min(100%, 460px);
  padding: 34px;
  border: 1px solid var(--bg-form-line);
  border-radius: 8px;
  background: #090909;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.bg-lead-form .modal-bg.wide {
  width: min(100%, 720px);
}

.bg-lead-form .badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  padding: 7px 10px;
  border: 1px solid #252525;
  border-radius: 999px;
  color: var(--bg-form-soft);
  font-size: 12px;
  line-height: 1.2;
}

.bg-lead-form .badge span:first-child {
  color: var(--bg-form-green);
  font-size: 9px;
}

.bg-lead-form .modal-title,
.bg-lead-form .ftitle {
  margin: 0;
  color: #fff;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: 0;
}

.bg-lead-form .modal-sub,
.bg-lead-form .fsub {
  margin-top: 10px;
  margin-bottom: 24px;
  color: var(--bg-form-muted);
  font-size: 15px;
  line-height: 1.45;
}

.bg-lead-form .fields-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.bg-lead-form .field {
  margin-bottom: 14px;
}

.bg-lead-form .field label {
  display: block;
  margin-bottom: 7px;
  color: #8b8b8b;
  font-size: 12px;
  line-height: 1.2;
}

.bg-lead-form input[type="text"],
.bg-lead-form input[type="tel"],
.bg-lead-form input[type="email"],
.bg-lead-form textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 13px 14px;
  border: 1px solid #2b2b2b;
  border-radius: 8px;
  outline: none;
  background: #111;
  color: #fff;
  font: inherit;
  font-size: 15px;
  line-height: 1.35;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.bg-lead-form textarea {
  min-height: 112px;
  resize: vertical;
}

.bg-lead-form input::placeholder,
.bg-lead-form textarea::placeholder {
  color: #4e4e4e;
}

.bg-lead-form input:focus,
.bg-lead-form textarea:focus {
  border-color: #555;
  background: #141414;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.bg-lead-form .consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 4px 0 18px;
}

.bg-lead-form .consent input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin: 1px 0 0;
  accent-color: #fff;
}

.bg-lead-form .consent-text {
  color: #777;
  font-size: 11px;
  line-height: 1.35;
}

.bg-lead-form .consent-text a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bg-lead-form .btn-submit,
.bg-lead-form [type="submit"].btn-submit {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  min-height: 50px !important;
  height: auto !important;
  padding: 14px 18px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #080808 !important;
  cursor: pointer;
  font: inherit !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.bg-lead-form .btn-submit:hover {
  transform: translateY(-1px);
}

.bg-lead-form .btn-submit:disabled,
.bg-lead-form.is-loading .btn-submit {
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

.bg-lead-form .close-hint {
  margin: 14px 0 0;
  color: #505050;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}

.bg-lead-form .bg-form-message {
  margin-top: 12px;
  color: #bdbdbd;
  font-size: 13px;
  line-height: 1.35;
}

.bg-lead-form .bg-form-message:empty {
  display: none;
}

.bg-lead-form .bg-form-message.is-error {
  color: #ff7b7b;
}

.bg-lead-form .bg-form-message.is-success {
  color: #83e0a8;
}

.bg-lead-form .footer-wrap {
  width: 100%;
}

.bg-lead-form .footer-top {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--bg-form-line);
}

.bg-lead-form .footer-top .fsub {
  margin-bottom: 0;
}

.bg-lead-form .footer-contacts {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-top: 3px;
}

.bg-lead-form .footer-contact {
  text-align: right;
}

.bg-lead-form .footer-contact a {
  display: block;
  color: #888;
  font-size: 13px;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}

.bg-lead-form .footer-contact--phone a {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.bg-lead-form .footer-contact span {
  display: block;
  margin-top: 2px;
  color: #555;
  font-size: 11px;
  line-height: 1.2;
}

.bg-lead-form .footer-separator {
  width: 1px;
  height: 32px;
  background: #2a2a2a;
}

.bg-lead-form .footer-body {
  padding-top: 22px;
}

.bg-lead-form .footer-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.bg-lead-form .footer-fields .field {
  margin-bottom: 0;
}

.bg-lead-form .footer-consent {
  margin-top: 10px;
  margin-bottom: 12px;
}

.bg-form-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.bg-form-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.bg-form-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
}

.bg-form-modal__dialog {
  position: relative;
  z-index: 1;
  width: auto;
  max-width: min(100%, 760px);
  max-height: min(92vh, 920px);
  overflow: auto;
}

.bg-form-modal__dialog .bg-lead-form {
  width: min(100%, 460px);
}

.bg-form-modal__dialog .bg-lead-form--consultation,
.bg-form-modal__dialog .bg-lead-form--quote {
  width: min(100%, 720px);
}

.bg-form-modal__dialog .bg-lead-form .modal-bg {
  width: 100%;
}

.bg-form-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid #2b2b2b;
  border-radius: 50%;
  background: #111;
  cursor: pointer;
}

.bg-form-modal__close::before,
.bg-form-modal__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 1px;
  background: #fff;
}

.bg-form-modal__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.bg-form-modal__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.bg-form-modal-open {
  overflow: hidden;
}

@media (max-width: 720px) {
  .bg-lead-form .modal-bg,
  .bg-lead-form .footer-wrap {
    padding: 24px;
  }

  .bg-lead-form .modal-title,
  .bg-lead-form .ftitle {
    font-size: 24px;
  }

  .bg-lead-form .fields-row,
  .bg-lead-form .footer-fields {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .bg-lead-form .footer-top,
  .bg-lead-form .footer-contacts {
    display: block;
  }

  .bg-lead-form .footer-contact {
    margin-top: 12px;
    text-align: left;
  }

  .bg-lead-form .footer-separator {
    display: none;
  }

  .bg-form-modal {
    padding: 14px;
    align-items: start;
    overflow: auto;
  }
}
