/* Isolated styles for Bailey's Tally form overlays. */
html.lead-form-open,
body.lead-form-open {
  overflow: hidden;
  overscroll-behavior: none;
}
.lead-form-dialog {
  width: min(760px, calc(100% - 32px));
  max-width: 760px;
  height: min(820px, calc(100vh - 32px));
  height: min(820px, calc(100dvh - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  margin: auto;
  overflow: hidden;
  border: 1px solid #d3dfea;
  border-radius: 22px;
  background: #fff;
  color: #102b4e;
  box-shadow: 0 28px 90px #102b4e40;
}
.lead-form-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.lead-form-dialog::backdrop {
  background: #102b4eb8;
  backdrop-filter: blur(4px);
}
.lead-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  border-bottom: 1px solid #d3dfea;
  background: #fff;
}
.lead-form-titles {
  min-width: 0;
}
.lead-form-brand {
  margin: 0 0 7px;
  color: #485c73;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .045em;
}
.lead-form-heading {
  margin: 0;
  color: #102b4e;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.lead-form-close {
  flex: 0 0 auto;
  min-width: 64px;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid #7187a0;
  border-radius: 999px;
  background: #fff;
  color: #102b4e;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.25;
}
.lead-form-close:hover {
  background: #e7f0fa;
}
.lead-form-body {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}
.lead-form-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0;
  background: #fff;
}
.lead-form-footer {
  padding: 14px 24px 16px;
  border-top: 1px solid #d3dfea;
  background: #f3f7fc;
}
.lead-form-status,
.lead-form-help {
  margin: 0;
  color: #485c73;
  font-size: .875rem;
  line-height: 1.5;
}
.lead-form-help {
  margin-top: 6px;
}
.lead-form-direct,
.lead-form-home {
  color: #102b4e;
  font-size: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.lead-form-direct:hover,
.lead-form-home:hover {
  color: #a32121;
}
.lead-form-confirmation {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: 32px;
}
.lead-form-success-heading {
  color: #102b4e;
  font-size: 1.6rem;
  line-height: 1.3;
  letter-spacing: -.025em;
}
.lead-form-success-copy {
  margin-top: 18px;
  color: #485c73;
  font-size: 1rem;
  line-height: 1.7;
}
.lead-form-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 26px;
  font-size: 1rem;
}
.lead-form-button {
  min-height: 48px;
  padding: 13px 20px;
  border: 1px solid #c62f2e;
  border-radius: 999px;
  background: #c62f2e;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}
.lead-form-button:hover {
  border-color: #a32121;
  background: #a32121;
}
.lead-form-dialog :focus-visible {
  outline: 3px solid #155dc2;
  outline-offset: 3px;
}
@media (max-width: 540px) {
  .lead-form-dialog {
    width: calc(100% - 16px);
    height: calc(100vh - 16px);
    height: calc(100dvh - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 16px;
  }
  .lead-form-header {
    gap: 12px;
    padding: 16px;
  }
  .lead-form-heading {
    font-size: 1.2rem;
  }
  .lead-form-brand {
    letter-spacing: 0;
  }
  .lead-form-footer {
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  }
  .lead-form-confirmation {
    padding: 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .lead-form-dialog,
  .lead-form-dialog::backdrop {
    animation: none;
    transition: none;
  }
}
