html:has(.lead-dialog[open]) { overflow: hidden; }

.lead-dialog {
  --lead-text: #eceef2;
  --lead-muted: #bdc2cc;
  position: fixed;
  inset: var(--lead-top, 0px) 0 auto;
  width: 100%;
  height: var(--lead-height, 100dvh);
  max-width: none;
  max-height: none;
  margin: 0;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  border: 0;
  overflow: hidden;
  background: transparent;
  color: var(--lead-text);
  color-scheme: dark;
  overscroll-behavior: contain;
}

.lead-dialog[open] { display: grid; place-items: center; }
.lead-dialog::backdrop { background: #07080bbf; }
.lead-dialog[open]::backdrop { animation: lead-veil .42s ease-out; }

.lead-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  width: min(100%, 46rem);
  max-height: 100%;
  min-height: 0;
  border: 1px solid #bcc9da68;
  border-radius: 23px;
  background:
    radial-gradient(ellipse 73% 58% at 3% 0, #a3b2c222, transparent 88%),
    radial-gradient(ellipse 64% 48% at 100% 103%, #b78b5122, transparent 86%),
    linear-gradient(151deg, #282c33f7 0%, #191c22fc 43%, #14161afb 100%);
  box-shadow: inset 0 1px 0 #f5f8ff4a, inset 0 0 0 3px #c0c9da0c,
    0 0 33px #bbd3ef26, 0 0 80px #c7d1ea16, 0 28px 80px #0009;
}

.lead-panel::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid #c5cddd13;
  border-radius: 19px;
  pointer-events: none;
}

.lead-dialog[open] .lead-panel { animation: lead-approach .72s cubic-bezier(.22,.76,.22,1); }

@keyframes lead-approach {
  0% { opacity: 0; transform: perspective(1120px) translateZ(-1370px) rotateX(3deg); }
  36% { opacity: .76; transform: perspective(1120px) translateZ(-390px) rotateX(1deg); }
  100% { opacity: 1; transform: none; }
}

@keyframes lead-veil { from { opacity: 0; } }

.lead-header {
  position: relative;
  flex: none;
  padding: clamp(25px, 4vh, 39px) 51px 19px;
}

.lead-header h2 {
  color: var(--lead-text);
  font-size: clamp(1.52rem, 4.2vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: -.047em;
  text-align: center;
  outline: none;
}

.lead-close {
  position: absolute;
  inset: 10px 10px auto auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: #d9dce3;
  transition: background .2s, border-color .2s;
}
.lead-close svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 1.65; }
.lead-close:is(:hover, :focus-visible) { background: #ebefff10; border-color: #bec5d04d; }

.lead-body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #a7aebb #20232a;
  border-radius: 0 0 22px 22px;
}

.lead-form {
  display: grid;
  gap: 10px;
  width: min(100%, 39rem);
  margin-inline: auto;
  padding: 2px clamp(16px, 4vw, 33px) 22px;
}

.lead-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.lead-field { position: relative; min-width: 0; }
.lead-control {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid #bfcad240;
  border-radius: 10px;
  background: linear-gradient(158deg, #252930, #1b1e24 68%);
  box-shadow: inset 0 1px 0 #e0e9fd10, 0 2px 7px #03040525;
  color: var(--lead-text);
  font-size: 1rem;
  line-height: 1.35;
  transition: border-color .19s, box-shadow .19s;
}
.lead-control::placeholder { color: var(--lead-muted); opacity: 1; }
.lead-control:focus-visible, .lead-phone-control:focus-within {
  outline: none;
  border-color: #dbe3f3b5;
  box-shadow: 0 0 0 2px #b8c7e029;
}

.lead-phone > label {
  display: block;
  margin: 0 0 4px 2px;
  color: #d2d6df;
  font-size: .83rem;
}
.lead-phone-control {
  display: flex;
  align-items: stretch;
  padding: 0;
}
.lead-country {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 0;
  border-inline-end: 1px solid #bbc5da3a;
  border-radius: 9px 0 0 9px;
  background: #b8c5e00b;
  font-size: .83rem;
  font-variant-numeric: tabular-nums;
}
.lead-country:hover { background: #b8c5e020; }
.lead-country:focus-visible { outline-offset: -3px; }
.lead-flag { display: block; flex: none; width: 23px; height: 16px; border-radius: 2px; }
.lead-unresolved { width: 23px; text-align: center; color: var(--lead-muted); }
.lead-chevron {
  width: 7px;
  height: 7px;
  margin: -3px 2px 0;
  transform: rotate(45deg);
  border-inline-end: 1px solid currentColor;
  border-block-end: 1px solid currentColor;
}
.lead-phone-control input {
  width: 100%;
  min-width: 0;
  padding: 8px 12px;
  border: 0;
  border-radius: 0 9px 9px 0;
  outline: none;
  background: transparent;
  color: inherit;
  font-size: 1rem;
}

.lead-country-menu {
  position: absolute;
  z-index: 2;
  inset: calc(100% + 5px) 0 auto;
  padding: 7px;
  border: 1px solid #a9b5c66b;
  border-radius: 11px;
  background: #20232b;
  box-shadow: 0 12px 30px #07080abf;
  animation: lead-options .16s ease-out;
}
.lead-country-menu ul {
  max-height: clamp(90px, 29dvh, 210px);
  max-height: clamp(90px, calc(var(--lead-height, 100dvh) * .29), 210px);
  padding: 0;
  margin: 5px 0 0;
  overflow: auto;
  overscroll-behavior: contain;
  list-style: none;
  scrollbar-width: thin;
}
.lead-country-menu li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  min-height: 41px;
  padding: 6px 9px;
  border-radius: 5px;
  font-size: .92rem;
}
.lead-country-menu li span:last-child { color: var(--lead-muted); font-variant-numeric: tabular-nums; }
.lead-country-menu li:is(:hover,[data-active]) { background: #aebdd926; }
.lead-country-menu li[aria-selected=true] { box-shadow: inset 2px 0 #d9b37c; }
.lead-country-empty { margin: 6px 9px 2px; }
@keyframes lead-options { from { opacity: 0; } }

.lead-select select {
  appearance: none;
  padding-inline-end: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23c8ced7' stroke-width='1.25'/%3E%3C/svg%3E"),
    linear-gradient(158deg, #252930, #1b1e24 68%);
  background-position: right 13px center, center;
  background-repeat: no-repeat;
}
.lead-select select:invalid { color: var(--lead-muted); }
.lead-select option { color: var(--lead-text); background: #21242c; }
.lead-select option[value=""] { display: none; }
@supports (appearance: base-select) {
  .lead-select select, .lead-select select::picker(select) { appearance: base-select; }
  .lead-select select { white-space: normal; }
  .lead-select select::picker-icon { display: none; }
  .lead-select select::picker(select) {
    margin-block: 4px;
    border: 1px solid #a9b5c66b;
    border-radius: 9px;
    background: #20232b;
    box-shadow: 0 12px 28px #07080abf;
    animation: lead-options .16s ease-out;
    cursor: default;
  }
  .lead-select option { padding: 8px 12px; min-height: 41px; white-space: normal; cursor: default; }
  .lead-select option:is(:hover, :focus-visible) { background: #aebdd926; }
}

.lead-send {
  display: grid;
  place-items: center;
  min-height: 46px;
  margin-top: 2px;
  border: 1px solid #f3d59ca6;
  border-radius: 9px;
  background: linear-gradient(108deg, #ead4ad, #f3cd8e 36%, #eee5d5 70%, #c6cdd6);
  background-size: 175% 100%;
  background-position: 0 50%;
  box-shadow: inset 0 1px #fff4dc, 0 3px 0 #8d745161, 0 7px 19px #0005;
  color: #221c16;
  font-weight: 800;
  transition: background-position .38s ease, transform .19s var(--ease), box-shadow .19s;
}
@media (hover: hover) {
  .lead-send:enabled:hover {
    background-position: 100% 50%;
    transform: translateY(-2px);
    box-shadow: inset 0 1px #fff4dc, 0 4px 0 #aab3bc55, 0 5px 22px #d3dff12d;
  }
}
.lead-send:enabled:active { transform: translateY(1px); }
.lead-send:disabled { opacity: .76; }
.lead-privacy { color: var(--lead-muted); font-size: .82rem; line-height: 1.5; }
.lead-privacy summary {
  display: block;
  width: fit-content;
  margin-inline: auto;
  text-decoration: underline;
  text-underline-offset: .2em;
}
html:not(.pointer-on) .lead-privacy summary { cursor: pointer; }
.lead-privacy summary::-webkit-details-marker { display: none; }
.lead-privacy summary:is(:hover, :focus-visible) { color: var(--lead-text); }
.lead-privacy-copy {
  display: grid;
  gap: 9px;
  margin-block-start: 10px;
  padding: 12px 14px;
  border: 1px solid #bcc9da35;
  border-radius: 9px;
  overflow-wrap: anywhere;
}
.lead-privacy-copy a {
  text-decoration: underline;
  text-underline-offset: .2em;
}
.lead-status { max-width: none; text-align: center; font-size: .88rem; line-height: 1.45; }
.lead-status:empty { margin-top: -10px; }
.lead-status[data-kind=success] { color: #e7eae9; }
.lead-status[data-kind=success] span { margin-inline-end: .45em; color: #91d9a5; font-weight: 800; }
.lead-status[data-kind=error] { color: #ffd2c9; }

@media (max-width: 520px) {
  .lead-panel { border-radius: 17px; }
  .lead-panel::before { border-radius: 13px; }
  .lead-header { padding: 23px 37px 15px; }
  .lead-close { inset: 2px 2px auto auto; }
  .lead-form { gap: 8px; padding-bottom: 16px; }
  .lead-status:empty { margin-top: -8px; }
}
@media (max-height: 540px) {
  .lead-header { padding-block: 15px 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .lead-dialog[open] :is(.lead-panel, .lead-country-menu), .lead-dialog[open]::backdrop { animation: none; }
  .lead-send:enabled:is(:hover,:active) { transform: none; }
}
.motion-off .lead-dialog[open] :is(.lead-panel, .lead-country-menu),
.motion-off .lead-dialog[open]::backdrop { animation: none; }
.motion-off .lead-send:enabled:is(:hover,:active) { transform: none; }
