.form-field {
  display: grid;
  gap: var(--space-xs);
}

.form-field__label {
  font-weight: 600;
}

.form-field__input,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 16px;
}

.form-field textarea {
  min-height: 7rem;
  resize: vertical;
}

.form-field__input:focus-visible,
.form-field textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-color: var(--color-accent);
}

.form-field--consent {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-sm);
  min-height: 44px;
}

.form-field--consent .form-field__checkbox {
  width: 1.25rem;
  height: 1.25rem;
  min-width: 1.25rem;
  min-height: 1.25rem;
  margin-top: 0.2rem;
  flex: 0 0 auto;
  accent-color: var(--color-primary);
}

.form-field--consent span {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 0.15rem;
  line-height: 1.45;
}

.form-field--consent a {
  text-decoration: underline;
  text-underline-offset: 0.15em;
  white-space: nowrap;
}

.form-field--hp {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lead-form {
  display: grid;
  gap: var(--space-md);
  max-width: 32rem;
}

.lead-form > input {
  display: none;
}

.lead-form__fields {
  display: grid;
  gap: var(--space-md);
}

.lead-block--band .lead-form {
  max-width: none;
  margin-top: var(--space-xl);
}

.lead-block--band .lead-form > .btn {
  width: 100%;
  min-height: 48px;
}

@media (min-width: 720px) {
  .lead-block--band .lead-form__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lead-block--band .lead-form__fields .form-field:last-child {
    grid-column: 1 / -1;
  }

  .lead-block--band .lead-form > .btn {
    width: calc((100% - var(--space-md)) / 2);
    justify-self: start;
  }
}

@media (min-width: 1024px) {
  .lead-block--band .lead-form__fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .lead-block--band .lead-form__fields .form-field:last-child {
    grid-column: auto;
  }

  .lead-block--band .lead-form > .btn {
    width: calc((100% - (2 * var(--space-md))) / 3);
  }
}

.lead-success {
  font-size: var(--font-size-lg);
}

.form-field .errorlist {
  color: var(--color-error);
  font-size: var(--font-size-sm);
  list-style: none;
  padding: 0;
  margin: var(--space-xs) 0 0;
}

.lead-dialog {
  width: min(32rem, calc(100% - 2rem));
  max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 2rem);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--color-surface);
}

.lead-dialog::backdrop {
  background: rgb(29 57 104 / 0.55);
}

.lead-dialog__inner {
  padding: var(--space-lg);
  padding-bottom: calc(var(--space-lg) + var(--safe-bottom));
}

.lead-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.lead-dialog__close {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--color-primary);
  font-size: 1.5rem;
}

@supports (-webkit-touch-callout: none) {
  .lead-dialog {
    max-height: calc(100svh - var(--safe-top) - var(--safe-bottom) - 2rem);
  }
}

@media (min-width: 768px) {
  .lead-dialog__inner {
    padding: var(--space-xl);
  }

  .form-field--consent .form-field__checkbox {
    width: 1.35rem;
    height: 1.35rem;
    min-width: 1.35rem;
    min-height: 1.35rem;
  }
}
