.lead-dialog {
  position: fixed;
  inset: 0;
  width: var(--lead-width);
  max-width: calc(100% - 36px);
  height: fit-content;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #161519;
  color: var(--ink);
  box-shadow: 0 24px 80px #0009;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.lead-dialog::backdrop { background: rgb(0 0 0 / 74%); }
.form-open { overflow: hidden; }
.dialog-panel { position: relative; }
.dialog-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #dedde1;
  background: transparent;
}
.dialog-close:hover, .dialog-close:focus-visible { color: white; background: #343239; }
.dialog-close:active { background: #48454b; }
@media (prefers-reduced-motion: no-preference) {
  .lead-dialog[open] { animation: dialog-enter .22s cubic-bezier(.2,.7,.2,1); }
  .lead-dialog[open]::backdrop { animation: backdrop-enter .2s ease-out; }
  @keyframes dialog-enter {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to { opacity: 1; transform: none; }
  }
  @keyframes backdrop-enter { from { opacity: 0; } to { opacity: 1; } }
}
@media (max-width: 730px), (pointer: coarse) and (max-height: 540px) {
  .lead-dialog {
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding-block: max(12px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-bottom));
    border-radius: 0;
  }
  .dialog-panel {
    width: min(var(--lead-width), calc(100% - clamp(36px, 9vw, 150px)));
    margin-inline: auto;
  }
  .lead-dialog #lead { border-color: transparent; }
  .lead-dialog input { scroll-margin-block: 16px; }
}
@media (max-width: 730px) {
  .dialog-panel { width: calc(100% - clamp(36px, 9vw, 150px)); }
}

#lead .iti { display: block; width: 100%; min-width: 0; font-weight: 400; }
#lead .iti input[type="tel"] { width: 100%; }
#lead .iti__flag-container { color: var(--ink); }
#lead .iti__selected-flag { border-radius: 5px 0 0 5px; }
#lead .iti__arrow { border-top-color: currentColor; }
#lead .iti__arrow--up { border-top-color: transparent; border-bottom-color: currentColor; }
#lead .iti__country-list { background: #242329; color: #fff; border-color: #56545c; font-size: 15px; line-height: 1.5; white-space: normal; z-index: 5; }
#lead .iti__country.iti__highlight { background: #44424b; }
#lead .iti__dial-code { color: #d4d1da; }
#lead .iti__country { display: flex; align-items: center; gap: 5px; }
#lead .iti__country-name { flex: 1; }
#lead input::placeholder { color: #a8a6ad; opacity: 1; }
#lead .form-status[data-phone-validation-type="error"] { color: #ffa4a6; }

#lead .phone-control { min-width: 0; }
#lead .phone-control > label { margin-bottom: 6px; }
