.lead-dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 8px;
  background: #fefaee;
  color: #000053;
  box-shadow: 0 18px 60px rgba(0, 0, 30, 0.28);
}

.lead-dialog::backdrop {
  background: rgba(0, 0, 28, 0.68);
}

.lead-dialog-open {
  overflow: hidden;
}

.lead-dialog__surface {
  position: relative;
  max-height: calc(100dvh - 32px);
  padding: 44px 48px 40px;
  overflow-y: auto;
}

.lead-dialog__close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: #000053;
  font: 400 32px/1 Arial, sans-serif;
  cursor: pointer;
}

.lead-dialog__close:hover,
.lead-dialog__close:focus-visible {
  background: rgba(0, 0, 83, 0.08);
  outline: 2px solid transparent;
}

.lead-dialog__title {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: 0;
  text-align: center;
}

.lead-dialog__description {
  margin: 14px 0 28px;
  font: 400 15px/1.5 Montserrat, Arial, sans-serif;
  text-align: center;
}

.lead-form,
.lead-form__fields {
  display: grid;
  gap: 16px;
}

.lead-form__field {
  display: grid;
  gap: 7px;
}

.lead-form__label,
.lead-form__legend {
  font: 600 13px/1.3 Montserrat, Arial, sans-serif;
}

.lead-form__input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1px solid #000053;
  border-radius: 6px;
  background: #fffdf7;
  color: #000053;
  font: 400 15px/1.2 Montserrat, Arial, sans-serif;
  box-sizing: border-box;
}

.lead-form__input::placeholder {
  color: rgba(0, 0, 83, 0.52);
}

.lead-form__input:focus {
  border-color: #417a6b;
  outline: 3px solid rgba(65, 122, 107, 0.2);
}

.lead-form__messengers {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.lead-form__legend {
  margin-bottom: 8px;
}

.lead-form__segments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 44px;
  border: 1px solid rgba(0, 0, 83, 0.35);
  border-radius: 6px;
  overflow: hidden;
}

.lead-form__segment {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
  font: 600 12px/1.2 Montserrat, Arial, sans-serif;
  cursor: pointer;
}

.lead-form__segment + .lead-form__segment {
  border-left: 1px solid rgba(0, 0, 83, 0.25);
}

.lead-form__segment input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.lead-form__segment:has(input:checked) {
  background: #000053;
  color: #ffffff;
}

.lead-form__segment:has(input:focus-visible) {
  outline: 3px solid rgba(65, 122, 107, 0.45);
  outline-offset: -3px;
}

.lead-form__consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  font: 400 11px/1.45 Montserrat, Arial, sans-serif;
  cursor: pointer;
}

.lead-form__consent input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #000053;
}

.lead-form__consent a {
  color: inherit;
  text-decoration-color: #417a6b;
  text-underline-offset: 2px;
}

.lead-form__consent a:hover,
.lead-form__consent a:focus-visible {
  color: #417a6b;
}

.lead-form__submit {
  width: 100%;
  min-height: 50px;
  padding: 12px 20px;
  border: 0;
  border-radius: 6px;
  box-sizing: border-box;
  background: #000053;
  color: #ffffff;
  font: 600 14px/1.2 Montserrat, Arial, sans-serif;
  cursor: pointer;
}

.lead-form__submit:hover,
.lead-form__submit:focus-visible {
  background: #417a6b;
  outline: 3px solid rgba(65, 122, 107, 0.25);
}

.lead-form__submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.lead-form__status {
  margin: 0;
  padding: 10px 12px;
  border-radius: 6px;
  font: 500 13px/1.4 Montserrat, Arial, sans-serif;
}

.lead-form__status--error {
  background: #fff0f0;
  color: #8c1c1c;
}

.lead-form__success {
  padding: 26px 0 16px;
  text-align: center;
}

.lead-form__success h3 {
  margin: 0 0 10px;
  font: 700 24px/1.2 "Playfair Display", Georgia, serif;
}

.lead-form__success p {
  margin: 0;
  font: 400 15px/1.5 Montserrat, Arial, sans-serif;
}

.lead-form__honeypot {
  position: absolute;
  left: -10000px;
}

[hidden] {
  display: none !important;
}

@media screen and (max-width: 560px) {
  .lead-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
  }

  .lead-dialog__surface {
    max-height: calc(100dvh - 20px);
    padding: 42px 20px 28px;
  }

  .lead-dialog__title {
    font-size: 26px;
  }

  .lead-dialog__description {
    margin-bottom: 22px;
    font-size: 13px;
  }
}
