.lead-form-lock {
  overflow: hidden;
}

.lead-form-host {
  min-width: 0;
}

.lead-form {
  display: grid;
  gap: 20px;
  width: 100%;
  color: var(--ink, #09172a);
}

.lead-form__header {
  display: grid;
  gap: 10px;
}

.lead-form__header h2,
.lead-form__header p {
  margin: 0;
}

.lead-form__header h2 {
  max-width: 620px;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.lead-form__description {
  max-width: 620px;
  color: var(--muted, #5d6b7c);
  line-height: 1.65;
}

.lead-form__time {
  color: var(--primary, #005ccb);
  font-size: 0.76rem;
  font-weight: 700;
}

.lead-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.lead-form__field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.lead-form__field--full {
  grid-column: 1 / -1;
}

.lead-form__field > label {
  color: var(--ink, #09172a);
  font-size: 0.82rem;
  font-weight: 700;
}

.lead-form__field :is(input, select, textarea) {
  width: 100%;
  min-height: 50px;
  padding: 13px 14px;
  border: 1px solid var(--line-strong, rgba(20, 70, 120, 0.22));
  border-radius: var(--ds-radius-sm, 8px);
  outline: 0;
  background: #fff;
  color: var(--ink, #09172a);
  font: inherit;
  font-size: 0.94rem;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.lead-form__field textarea {
  min-height: 104px;
  max-height: 190px;
  resize: vertical;
  line-height: 1.55;
}

.lead-form__field :is(input, select, textarea):hover {
  border-color: rgba(20, 121, 255, 0.42);
}

.lead-form__field :is(input, select, textarea):focus {
  border-color: var(--brand-blue, #1479ff);
  box-shadow: 0 0 0 3px rgba(20, 121, 255, 0.13);
}

.lead-form__field :is(input, select, textarea):disabled {
  cursor: not-allowed;
  background: #eef2f7;
  opacity: 0.72;
}

.lead-form__field :is(input, select, textarea)[aria-invalid="true"] {
  border-color: #b42318;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.08);
}

.lead-form__error {
  min-height: 18px;
  margin: 0;
  color: #9f2018;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1.4;
}

.lead-form__summary,
.lead-form__status {
  min-height: 20px;
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
}

.lead-form__summary {
  color: #9f2018;
  font-weight: 650;
}

.lead-form__status {
  color: var(--muted, #5d6b7c);
}

.lead-form__status[data-state="success"] {
  color: #157347;
  font-weight: 650;
}

.lead-form__status[data-state="error"] {
  color: #9f2018;
  font-weight: 650;
}

.lead-form__submit {
  width: 100%;
  min-height: 52px;
  justify-content: center;
}

.lead-form__submit[disabled] {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.lead-form__privacy {
  margin: -8px 0 0;
  color: var(--muted, #5d6b7c);
  font-size: 0.72rem;
  line-height: 1.5;
}

.lead-form__privacy a,
.lead-form__fallback {
  color: var(--primary, #005ccb);
  font-weight: 650;
}

.lead-form__fallback {
  width: fit-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
}

.lead-form__retry {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong, rgba(20, 70, 120, 0.22));
  border-radius: var(--ds-radius-sm, 8px);
  color: var(--primary, #005ccb);
  font-size: 0.82rem;
  font-weight: 700;
}

.lead-form__retry[hidden] {
  display: none;
}

.lead-form__honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.lead-form-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.lead-form-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 13, 27, 0.76);
  backdrop-filter: blur(8px);
}

.lead-form-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 720px);
  max-height: min(880px, calc(100dvh - 48px));
  overflow: auto;
  padding: clamp(28px, 4vw, 44px);
  border: 1px solid rgba(20, 121, 255, 0.17);
  border-radius: var(--ds-radius-lg, 20px);
  background: #fff;
  box-shadow: 0 34px 100px rgba(3, 13, 27, 0.32);
  overscroll-behavior: contain;
}

.lead-form-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line, rgba(20, 70, 120, 0.12));
  border-radius: 50%;
  background: #fff;
  color: var(--ink, #09172a);
  cursor: pointer;
  font: inherit;
  font-size: 1.3rem;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.lead-form-modal__close:hover {
  border-color: rgba(20, 121, 255, 0.34);
  background: #f5f9ff;
  transform: rotate(4deg);
}

.lead-form-modal__close:focus-visible,
.lead-form :is(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(20, 121, 255, 0.3);
  outline-offset: 3px;
}

.lead-form--inline {
  padding: clamp(26px, 4vw, 38px);
  border: 1px solid var(--line, rgba(20, 70, 120, 0.12));
  border-radius: var(--ds-radius-lg, 20px);
  background: #fff;
  box-shadow: var(--ds-shadow-sm, 0 10px 32px rgba(7, 20, 38, 0.05));
}

@media (max-width: 640px) {
  .lead-form-modal {
    align-items: end;
    padding: 8px;
  }

  .lead-form-modal__dialog {
    width: 100%;
    max-height: calc(100dvh - 8px);
    padding: 30px 20px 24px;
    border-radius: 20px 20px 10px 10px;
  }

  .lead-form__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .lead-form__field--full {
    grid-column: auto;
  }

  .lead-form--inline {
    padding: 24px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lead-form-modal__close,
  .lead-form__field :is(input, select, textarea) {
    transition: none;
  }
}
